effect-flag: fix obsfate verb hooking
Mercurial core commit b81ad5b78a81 renamed a the function we hooked on and
update its signature. Update the code to detect that, which fixes tests
errors.
--- a/hgext3rd/evolve/obshistory.py Tue Nov 07 14:07:19 2017 +0100
+++ b/hgext3rd/evolve/obshistory.py Tue Nov 14 18:35:25 2017 +0100
@@ -787,8 +787,15 @@
verb = 'split'
return {'verb': verb}
+# Use a more advanced version of obsfateverb that uses effect-flag
+if util.safehasattr(obsutil, 'obsfateverb'):
+
+ @eh.wrapfunction(obsutil, 'obsfateverb')
+ def obsfateverb(orig, *args, **kwargs):
+ return _successorsetverb(*args, **kwargs)['verb']
+
# Hijack callers of successorsetverb
-if util.safehasattr(obsutil, 'obsfateprinter'):
+elif util.safehasattr(obsutil, 'obsfateprinter'):
@eh.wrapfunction(obsutil, 'obsfateprinter')
def obsfateprinter(orig, successors, markers, ui):