/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

Got uncommit working properly with checkouts

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