Mercurial > evolve
changeset 3181:5db76f35efce
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.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 14 Nov 2017 18:35:25 +0100 |
parents | 85ab7d2d9fd6 |
children | 8f74cf219be3 |
files | hgext3rd/evolve/obshistory.py |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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):