comparison hgext/bookmarks.py @ 13032:e41e2b79883d

dirstate: warn on invalid parents rather than aborting This allows more graceful recovery from some mangled dirstates
author Matt Mackall <mpm@selenic.com>
date Mon, 22 Nov 2010 12:43:31 -0600
parents 3da456d0c885
children e298cca2d53a
comparison
equal deleted inserted replaced
13031:3da456d0c885 13032:e41e2b79883d
346 ' failed!\n') % k) 346 ' failed!\n') % k)
347 347
348 return result 348 return result
349 349
350 def addchangegroup(self, *args, **kwargs): 350 def addchangegroup(self, *args, **kwargs):
351 parents = self.dirstate.parents()
352
353 result = super(bookmark_repo, self).addchangegroup(*args, **kwargs) 351 result = super(bookmark_repo, self).addchangegroup(*args, **kwargs)
354 if result > 1: 352 if result > 1:
355 # We have more heads than before 353 # We have more heads than before
356 return result 354 return result
357 node = self.changelog.tip() 355 node = self.changelog.tip()
358 356 parents = self.dirstate.parents()
359 self._bookmarksupdate(parents, node) 357 self._bookmarksupdate(parents, node)
360 return result 358 return result
361 359
362 def _findtags(self): 360 def _findtags(self):
363 """Merge bookmarks with normal tags""" 361 """Merge bookmarks with normal tags"""