/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-03-08 14:31:23 UTC
  • mfrom: (1598 +trunk)
  • mto: (1685.1.1 bzr-encoding)
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: john@arbash-meinel.com-20060308143123-448308b0db4de410
[merge] bzr.dev 1573, lots of updates

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