inhibit: fix compatibility with changes in rebase
Because we compute the obsolete revisions before calling
_computeobsoletenotrebased lifting the inhibition stopped working
since 8a8ee8338e6 in core. This patch makes it work again.
--- a/hgext/inhibit.py Sun Jan 10 10:52:24 2016 -0800
+++ b/hgext/inhibit.py Thu Jan 14 12:02:38 2016 -0800
@@ -190,11 +190,11 @@
finally:
lockmod.release(tr, lock)
-def _computeobsoletenotrebasedwrap(orig, repo, rebasesetrevs, dest):
+def _filterobsoleterevswrap(orig, repo, rebasesetrevs, *args, **kwargs):
repo._notinhibited = rebasesetrevs
try:
repo.invalidatevolatilesets()
- r = orig(repo, rebasesetrevs, dest)
+ r = orig(repo, rebasesetrevs, *args, **kwargs)
finally:
del repo._notinhibited
repo.invalidatevolatilesets()
@@ -258,9 +258,10 @@
try:
rebase = extensions.find('rebase')
if rebase:
- extensions.wrapfunction(rebase,
- '_computeobsoletenotrebased',
- _computeobsoletenotrebasedwrap)
+ if util.safehasattr(rebase, '_filterobsoleterevs'):
+ extensions.wrapfunction(rebase,
+ '_filterobsoleterevs',
+ _filterobsoleterevswrap)
except KeyError:
pass
# There are two ways to save bookmark changes during a transation, we