Mercurial > evolve
diff hgext3rd/topic/__init__.py @ 5608:d9ee2706487f stable
compat: add support for upstream rename of merge.update() to _update()
The function was renamed in Mercurial commit 2c86b9587740.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 25 Sep 2020 09:13:57 -0700 |
parents | 3e23bedf8d38 |
children | eb326644dc29 |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Mon Oct 12 12:33:18 2020 +0200 +++ b/hgext3rd/topic/__init__.py Fri Sep 25 09:13:57 2020 -0700 @@ -353,7 +353,11 @@ _(b"topic to push"), _(b'TOPIC'))) extensions.wrapfunction(cmdutil, 'buildcommittext', committextwrap) - extensions.wrapfunction(merge, 'update', mergeupdatewrap) + if util.safehasattr(merge, '_update'): + extensions.wrapfunction(merge, '_update', mergeupdatewrap) + else: + # hg <= 5.5 (2c86b9587740) + extensions.wrapfunction(merge, 'update', mergeupdatewrap) # We need to check whether t0 or b0 or s0 is passed to override the default update # behaviour of changing topic and I can't find a better way # to do that as scmutil.revsingle returns the rev number and hence we can't