~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/uncommit.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""
19
19
 
20
20
import os
 
21
 
21
22
from bzrlib.errors import BoundBranchOutOfDate
22
23
 
23
 
def test_remove(filename):
24
 
    if os.path.exists(filename):
25
 
        os.remove(filename)
26
 
    else:
27
 
        print '* file does not exist: %r' % filename
28
 
 
29
24
 
30
25
def uncommit(branch, dry_run=False, verbose=False, revno=None, tree=None):
31
26
    """Remove the last revision from the supplied branch.
44
39
        unlockable.append(branch)
45
40
 
46
41
        pending_merges = []
 
42
        if tree is not None:
 
43
            pending_merges = tree.pending_merges()
47
44
 
48
45
        master = branch.get_master_branch()
49
46
        if master is not None: