diff mercurial/repair.py @ 15456:abcaaf51d568

phases: handle unknown nodes in boundary We filter unknown node out of the boundary. No data is lost. A filtering is explicitly done after strip too
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 07 Nov 2011 13:20:22 +0100
parents 6051d8e7e133
children 73c4b3d0c711
line wrap: on
line diff
--- a/mercurial/repair.py	Mon Nov 07 12:27:25 2011 +0100
+++ b/mercurial/repair.py	Mon Nov 07 13:20:22 2011 +0100
@@ -6,7 +6,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-from mercurial import changegroup, bookmarks
+from mercurial import changegroup, bookmarks, phases
 from mercurial.node import short
 from mercurial.i18n import _
 import os
@@ -145,7 +145,9 @@
         for m in updatebm:
             bm[m] = repo['.'].node()
         bookmarks.write(repo)
-
+        # remove potential unknown phase
+        # XXX using to_strip data would be faster
+        phases.filterunknown(repo)
     except:
         if backupfile:
             ui.warn(_("strip failed, full bundle stored in '%s'\n")