# HG changeset patch # User Boris Feld # Date 1510680925 -3600 # Node ID 5db76f35efcebcf2ae3a066ce9e31aae2c9432d9 # Parent 85ab7d2d9fd6ca9c533bc55cdde0adf8bcafcb9f 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. diff -r 85ab7d2d9fd6 -r 5db76f35efce hgext3rd/evolve/obshistory.py --- 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):