comparison hgext/obsolete.py @ 408:6b2f50c81967 stable

hook: work around insanely huge value in obsolete pushkey call The value is not that useful and make shell call explode.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 31 Jul 2012 15:04:59 +0200
parents 4a5488c01a66
children c4cc1d5eba7a
comparison
equal deleted inserted replaced
406:24762f1911ba 408:6b2f50c81967
1007 1007
1008 # /!\ api change in Hg 2.2 (97efd26eb9576f39590812ea9) /!\ 1008 # /!\ api change in Hg 2.2 (97efd26eb9576f39590812ea9) /!\
1009 if util.safehasattr(repo, '_journalfiles'): # Hg 2.2 1009 if util.safehasattr(repo, '_journalfiles'): # Hg 2.2
1010 o_journalfiles = repo._journalfiles 1010 o_journalfiles = repo._journalfiles
1011 o_writejournal = repo._writejournal 1011 o_writejournal = repo._writejournal
1012 o_hook = repo.hook
1012 1013
1013 1014
1014 class obsoletingrepo(repo.__class__): 1015 class obsoletingrepo(repo.__class__):
1016
1017 # workaround
1018 def hook(self, name, throw=False, **args):
1019 if 'pushkey' in name:
1020 args.pop('new')
1021 args.pop('old')
1022 return o_hook(name, throw=False, **args)
1015 1023
1016 ### Public method 1024 ### Public method
1017 def obsoletedby(self, node): 1025 def obsoletedby(self, node):
1018 """return the set of node that make <node> obsolete (obj)""" 1026 """return the set of node that make <node> obsolete (obj)"""
1019 others = set() 1027 others = set()