Show More
@@ -18,7 +18,7 b' from mercurial import hg, util, repair, ' | |||
|
18 | 18 | from mercurial import extensions, patch, scmutil, phases, obsolete, error |
|
19 | 19 | from mercurial import copies |
|
20 | 20 | from mercurial.commands import templateopts |
|
21 | from mercurial.node import nullrev | |
|
21 | from mercurial.node import nullrev, nullid, hex | |
|
22 | 22 | from mercurial.lock import release |
|
23 | 23 | from mercurial.i18n import _ |
|
24 | 24 | import os, errno |
@@ -737,8 +737,12 b' def storestatus(repo, originalwd, target' | |||
|
737 | 737 | f.write('%s\n' % (activebookmark or '')) |
|
738 | 738 | for d, v in state.iteritems(): |
|
739 | 739 | oldrev = repo[d].hex() |
|
740 |
if v > |
|
|
740 | if v >= 0: | |
|
741 | 741 | newrev = repo[v].hex() |
|
742 | elif v == revtodo: | |
|
743 | # To maintain format compatibility, we have to use nullid. | |
|
744 | # Please do remove this special case when upgrading the format. | |
|
745 | newrev = hex(nullid) | |
|
742 | 746 | else: |
|
743 | 747 | newrev = v |
|
744 | 748 | f.write("%s:%s\n" % (oldrev, newrev)) |
@@ -780,6 +784,9 b' def restorestatus(repo):' | |||
|
780 | 784 | oldrev, newrev = l.split(':') |
|
781 | 785 | if newrev in (str(nullmerge), str(revignored)): |
|
782 | 786 | state[repo[oldrev].rev()] = int(newrev) |
|
787 | elif newrev == nullid: | |
|
788 | state[repo[oldrev].rev()] = revtodo | |
|
789 | # Legacy compat special case | |
|
783 | 790 | else: |
|
784 | 791 | state[repo[oldrev].rev()] = repo[newrev].rev() |
|
785 | 792 |
General Comments 0
You need to be logged in to leave comments.
Login now