~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/uncommit.py

  • Committer: Vincent Ladeuil
  • Date: 2007-07-15 11:24:18 UTC
  • mfrom: (2617 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070715112418-9nn4n6esxv60ny4b
merge bzr.dev@1617

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import os
22
22
 
 
23
from bzrlib import revision as _mod_revision
23
24
from bzrlib.branch import Branch
24
25
from bzrlib.errors import BoundBranchOutOfDate
25
26
 
76
77
            if master is not None:
77
78
                master.set_revision_history(rh)
78
79
            branch.set_revision_history(rh)
79
 
            new_tip = branch.last_revision()
 
80
            new_tip = _mod_revision.ensure_null(branch.last_revision())
80
81
            if master is None:
81
82
                hook_local = None
82
83
                hook_master = branch
84
85
                hook_local = branch
85
86
                hook_master = master
86
87
            for hook in Branch.hooks['post_uncommit']:
 
88
                hook_new_tip = new_tip
 
89
                if hook_new_tip == _mod_revision.NULL_REVISION:
 
90
                    hook_new_tip = None
87
91
                hook(hook_local, hook_master, old_revno, old_tip, new_revno,
88
 
                    new_tip)
 
92
                     hook_new_tip)
89
93
            if tree is not None:
90
 
                if new_tip is not None:
 
94
                if not _mod_revision.is_null(new_tip):
91
95
                    parents = [new_tip]
92
96
                else:
93
97
                    parents = []