/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/uncommit.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-25 14:36:23 UTC
  • mto: This revision was merged to the branch mainline in revision 1957.
  • Revision ID: john@arbash-meinel.com-20060825143623-692295c004e1f4cf
Fix bug #57660: 'bzr uncommit' should preserve pending merges

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: