comparison 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
comparison
equal deleted inserted replaced
15455:c6f87bdab2a1 15456:abcaaf51d568
4 # Copyright 2007 Matt Mackall 4 # Copyright 2007 Matt Mackall
5 # 5 #
6 # This software may be used and distributed according to the terms of the 6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2 or any later version. 7 # GNU General Public License version 2 or any later version.
8 8
9 from mercurial import changegroup, bookmarks 9 from mercurial import changegroup, bookmarks, phases
10 from mercurial.node import short 10 from mercurial.node import short
11 from mercurial.i18n import _ 11 from mercurial.i18n import _
12 import os 12 import os
13 13
14 def _bundle(repo, bases, heads, node, suffix, compress=True): 14 def _bundle(repo, bases, heads, node, suffix, compress=True):
143 os.unlink(chgrpfile) 143 os.unlink(chgrpfile)
144 144
145 for m in updatebm: 145 for m in updatebm:
146 bm[m] = repo['.'].node() 146 bm[m] = repo['.'].node()
147 bookmarks.write(repo) 147 bookmarks.write(repo)
148 148 # remove potential unknown phase
149 # XXX using to_strip data would be faster
150 phases.filterunknown(repo)
149 except: 151 except:
150 if backupfile: 152 if backupfile:
151 ui.warn(_("strip failed, full bundle stored in '%s'\n") 153 ui.warn(_("strip failed, full bundle stored in '%s'\n")
152 % backupfile) 154 % backupfile)
153 elif saveheads: 155 elif saveheads: