hook: work around insanely huge value in obsolete pushkey call stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 31 Jul 2012 15:04:59 +0200
branchstable
changeset 408 6b2f50c81967
parent 406 24762f1911ba
child 409 c4cc1d5eba7a
hook: work around insanely huge value in obsolete pushkey call The value is not that useful and make shell call explode.
hgext/obsolete.py
--- a/hgext/obsolete.py	Tue Jul 31 12:45:45 2012 +0200
+++ b/hgext/obsolete.py	Tue Jul 31 15:04:59 2012 +0200
@@ -1009,10 +1009,18 @@
     if util.safehasattr(repo, '_journalfiles'): # Hg 2.2
         o_journalfiles = repo._journalfiles
     o_writejournal = repo._writejournal
+    o_hook = repo.hook
 
 
     class obsoletingrepo(repo.__class__):
 
+        # workaround
+        def hook(self, name, throw=False, **args):
+            if 'pushkey' in name:
+                args.pop('new')
+                args.pop('old')
+            return o_hook(name, throw=False, **args)
+
         ### Public method
         def obsoletedby(self, node):
             """return the set of node that make <node> obsolete (obj)"""