##// END OF EJS Templates
rebase: add a 'revtodo' constant...
Pierre-Yves David -
r23490:102f144f default
parent child Browse files
Show More
@@ -23,6 +23,7 b' from mercurial.lock import release'
23 from mercurial.i18n import _
23 from mercurial.i18n import _
24 import os, errno
24 import os, errno
25
25
26 revtodo = -1
26 nullmerge = -2
27 nullmerge = -2
27 revignored = -3
28 revignored = -3
28
29
@@ -367,7 +368,7 b' def rebase(ui, repo, **opts):'
367 pos = 0
368 pos = 0
368 for rev in sortedstate:
369 for rev in sortedstate:
369 pos += 1
370 pos += 1
370 if state[rev] == -1:
371 if state[rev] == revtodo:
371 ui.progress(_("rebasing"), pos, ("%d:%s" % (rev, repo[rev])),
372 ui.progress(_("rebasing"), pos, ("%d:%s" % (rev, repo[rev])),
372 _('changesets'), total)
373 _('changesets'), total)
373 p1, p2, base = defineparents(repo, rev, target, state,
374 p1, p2, base = defineparents(repo, rev, target, state,
@@ -790,7 +791,7 b' def restorestatus(repo):'
790 if not collapse:
791 if not collapse:
791 seen = set([target])
792 seen = set([target])
792 for old, new in sorted(state.items()):
793 for old, new in sorted(state.items()):
793 if new != nullrev and new in seen:
794 if new != revtodo and new in seen:
794 skipped.add(old)
795 skipped.add(old)
795 seen.add(new)
796 seen.add(new)
796 repo.ui.debug('computed skipped revs: %s\n' %
797 repo.ui.debug('computed skipped revs: %s\n' %
@@ -882,7 +883,7 b' def buildstate(repo, dest, rebaseset, co'
882 return None
883 return None
883
884
884 repo.ui.debug('rebase onto %d starting from %s\n' % (dest, root))
885 repo.ui.debug('rebase onto %d starting from %s\n' % (dest, root))
885 state.update(dict.fromkeys(rebaseset, nullrev))
886 state.update(dict.fromkeys(rebaseset, revtodo))
886 # Rebase tries to turn <dest> into a parent of <root> while
887 # Rebase tries to turn <dest> into a parent of <root> while
887 # preserving the number of parents of rebased changesets:
888 # preserving the number of parents of rebased changesets:
888 #
889 #
General Comments 0
You need to be logged in to leave comments. Login now