changeset 4431:f109917f5c28

evolvecmd: compatibility with older geteffectflag() that took a tuple Before bae6f1418a95 the function took a tuple of 2 arguments instead of these 2 arguments directly.
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 06 Mar 2019 21:47:08 +0800
parents 461b9a91b662
children 5da1d162ad50
files hgext3rd/evolve/evolvecmd.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Wed Mar 06 21:42:32 2019 +0800
+++ b/hgext3rd/evolve/evolvecmd.py	Wed Mar 06 21:47:08 2019 +0800
@@ -670,7 +670,11 @@
         if saveeffectflag:
             # The effect flag is saved in a versioned field name for
             # future evolution
-            effectflag = obsutil.geteffectflag(prec, (succ,))
+            try:
+                effectflag = obsutil.geteffectflag(prec, (succ,))
+            except TypeError:
+                # hg <= 4.7
+                effectflag = obsutil.geteffectflag((prec, (succ,)))
             metadata[obsutil.EFFECTFLAGFIELD] = "%d" % effectflag
 
         # create markers