/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

Change all callers of set_last_revision to use set_parent_trees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
            if verbose:
68
68
                print 'Removing revno %d: %s' % (len(rh)+1, rev_id)
69
69
 
70
 
 
71
70
        # Committing before we start removing files, because
72
71
        # once we have removed at least one, all the rest are invalid.
73
72
        if not dry_run:
75
74
                master.set_revision_history(rh)
76
75
            branch.set_revision_history(rh)
77
76
            if tree is not None:
78
 
                tree.set_last_revision(branch.last_revision())
79
 
                pending_merges.reverse()
80
 
                tree.set_pending_merges(pending_merges)
 
77
                branch_tip = branch.last_revision()
 
78
                if branch_tip is not None:
 
79
                    parents = [branch.last_revision()]
 
80
                else:
 
81
                    parents = []
 
82
                parents.extend(reversed(pending_merges))
 
83
                parent_trees = [
 
84
                    (parent, branch.repository.revision_tree(parent))
 
85
                    for parent in parents]
 
86
                tree.set_parent_trees(parent_trees)
81
87
    finally:
82
88
        for item in reversed(unlockable):
83
89
            item.unlock()