~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/uncommit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-02-24 14:43:00 UTC
  • mfrom: (1558.1.12 Aaron's integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060224144300-16a30ef3bb38fb7f
Actually apply alias and uncommit fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
        print '* file does not exist: %r' % filename
14
14
 
15
15
 
16
 
def uncommit(branch, dry_run=False, verbose=False, revno=None):
 
16
def uncommit(branch, dry_run=False, verbose=False, revno=None, tree=None):
17
17
    """Remove the last revision from the supplied branch.
18
18
 
19
19
    :param dry_run: Don't actually change anything
38
38
    # once we have removed at least one, all the rest are invalid.
39
39
    if not dry_run:
40
40
        new_rev_history.commit()
 
41
        if tree is not None:
 
42
            tree.set_last_revision(branch.last_revision())
41
43
    else:
42
44
        new_rev_history.abort()
43
45