~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/uncommit.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-23 23:21:12 UTC
  • mfrom: (1953 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1955.
  • Revision ID: john@arbash-meinel.com-20060823232112-f755378d583374a8
[merge] bzr.dev 1953

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""
19
19
 
20
20
import os
21
 
 
22
21
from bzrlib.errors import BoundBranchOutOfDate
23
22
 
 
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
 
24
29
 
25
30
def uncommit(branch, dry_run=False, verbose=False, revno=None, tree=None):
26
31
    """Remove the last revision from the supplied branch.
39
44
        unlockable.append(branch)
40
45
 
41
46
        pending_merges = []
42
 
        if tree is not None:
43
 
            pending_merges = tree.pending_merges()
44
47
 
45
48
        master = branch.get_master_branch()
46
49
        if master is not None: