fix issue with strip() for revlog with non-monotonic linkrevs (issue1342)
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sat, 18 Oct 2008 20:25:45 +0200
changeset 7134 cb6395fc16a9
parent 7133 42db22108d85
child 7135 06ca03380190
fix issue with strip() for revlog with non-monotonic linkrevs (issue1342) extra nodes should always be included, do the call after the pruning
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Sat Oct 18 20:23:46 2008 +0200
+++ b/mercurial/localrepo.py	Sat Oct 18 20:25:45 2008 +0200
@@ -1808,8 +1808,7 @@
                 for fname in extranodes:
                     if isinstance(fname, int):
                         continue
-                    add_extra_nodes(fname,
-                                    msng_filenode_set.setdefault(fname, {}))
+                    msng_filenode_set.setdefault(fname, {})
                     changedfiles[fname] = 1
             # Go through all our files in order sorted by name.
             for fname in util.sort(changedfiles):
@@ -1820,6 +1819,7 @@
                 # missing.
                 if fname in msng_filenode_set:
                     prune_filenodes(fname, filerevlog)
+                    add_extra_nodes(fname, msng_filenode_set[fname])
                     msng_filenode_lst = msng_filenode_set[fname].keys()
                 else:
                     msng_filenode_lst = []