##// END OF EJS Templates
phases: use nodemap to check for missing nodes
Sune Foldager -
r15902:4252d9f0 default
parent child Browse files
Show More
@@ -141,8 +141,9 b' def filterunknown(repo, phaseroots=None)'
141 """
141 """
142 if phaseroots is None:
142 if phaseroots is None:
143 phaseroots = repo._phaseroots
143 phaseroots = repo._phaseroots
144 nodemap = repo.changelog.nodemap # to filter unknown nodes
144 for phase, nodes in enumerate(phaseroots):
145 for phase, nodes in enumerate(phaseroots):
145 missing = [node for node in nodes if node not in repo]
146 missing = [node for node in nodes if node not in nodemap]
146 if missing:
147 if missing:
147 for mnode in missing:
148 for mnode in missing:
148 msg = _('Removing unknown node %(n)s from %(p)i-phase boundary')
149 msg = _('Removing unknown node %(n)s from %(p)i-phase boundary')
@@ -266,7 +267,7 b' def analyzeremotephases(repo, subset, ro'
266 """
267 """
267 # build list from dictionary
268 # build list from dictionary
268 draftroots = []
269 draftroots = []
269 nm = repo.changelog.nodemap # to filter unknown node
270 nodemap = repo.changelog.nodemap # to filter unknown nodes
270 for nhex, phase in roots.iteritems():
271 for nhex, phase in roots.iteritems():
271 if nhex == 'publishing': # ignore data related to publish option
272 if nhex == 'publishing': # ignore data related to publish option
272 continue
273 continue
@@ -277,7 +278,7 b' def analyzeremotephases(repo, subset, ro'
277 msg = _('ignoring inconsistense public root from remote: %s')
278 msg = _('ignoring inconsistense public root from remote: %s')
278 repo.ui.warn(msg, nhex)
279 repo.ui.warn(msg, nhex)
279 elif phase == 1:
280 elif phase == 1:
280 if node in nm:
281 if node in nodemap:
281 draftroots.append(node)
282 draftroots.append(node)
282 else:
283 else:
283 msg = _('ignoring unexpected root from remote: %i %s')
284 msg = _('ignoring unexpected root from remote: %i %s')
@@ -556,6 +556,7 b' Copy and show added kwfiles'
556 Commit and show expansion in original and copy
556 Commit and show expansion in original and copy
557
557
558 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
558 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
559 invalidating branch cache (tip differs)
559 c
560 c
560 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
561 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
561 overwriting c expanding keywords
562 overwriting c expanding keywords
General Comments 0
You need to be logged in to leave comments. Login now