evolve: provide cache argument to obsutil.successorssets() correctly stable
authorAnton Shestakov <av6@dwimlabs.net>
Fri, 03 Jan 2020 23:12:19 +0700
branchstable
changeset 5048 3947964a4ce7
parent 5034 1015a1dbaf7c
child 5074 47f9ba943bb1
evolve: provide cache argument to obsutil.successorssets() correctly After 68f3e819d41d (4.3) the 3rd argument to that function is `closest`.
hgext3rd/evolve/evolvecmd.py
hgext3rd/evolve/rewind.py
--- a/hgext3rd/evolve/evolvecmd.py	Thu Dec 26 12:22:49 2019 +0700
+++ b/hgext3rd/evolve/evolvecmd.py	Fri Jan 03 23:12:19 2020 +0700
@@ -990,7 +990,7 @@
         if not ctx.obsolete():
             continue
 
-        successors = obsutil.successorssets(repo, ctx.node(), cache)
+        successors = obsutil.successorssets(repo, ctx.node(), cache=cache)
 
         # We can't make any assumptions about how to update the hash if the
         # cset in question was split or diverged.
@@ -1495,7 +1495,7 @@
         if n == ctx.node():
             # a node can't be a base for divergence with itself
             continue
-        nsuccsets = obsutil.successorssets(repo, n, cache)
+        nsuccsets = obsutil.successorssets(repo, n, cache=cache)
         for nsuccset in nsuccsets:
             if ctx.node() in nsuccset:
                 # we are only interested in *other* successor sets
--- a/hgext3rd/evolve/rewind.py	Thu Dec 26 12:22:49 2019 +0700
+++ b/hgext3rd/evolve/rewind.py	Fri Jan 03 23:12:19 2020 +0700
@@ -90,7 +90,7 @@
         if not opts['as_divergence']:
             for rev in rewinded:
                 ctx = unfi[rev]
-                ssets = obsutil.successorssets(repo, ctx.node(), sscache)
+                ssets = obsutil.successorssets(repo, ctx.node(), cache=sscache)
                 if 1 < len(ssets):
                     msg = _(b'rewind confused by divergence on %s') % ctx
                     hint = _(b'solve divergence first or use "--as-divergence"')