~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/uncommit.py

  • Committer: Robey Pointer
  • Date: 2006-09-03 00:28:18 UTC
  • mfrom: (1981 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1996.
  • Revision ID: robey@lag.net-20060903002818-71ca5c7bfea93a26
merge from bzr.dev

Show diffs side-by-side

added added

removed removed

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