rebase: reduce scope of a variable
Differential Revision: https://phab.mercurial-scm.org/D3940
--- a/hgext/rebase.py Thu Jul 12 08:22:28 2018 -0700
+++ b/hgext/rebase.py Wed Jul 11 15:03:39 2018 -0700
@@ -1858,7 +1858,6 @@
extinctnodes = set(cl.node(r) for r in repo.revs('extinct()'))
for srcrev in rebaseobsrevs:
srcnode = cl.node(srcrev)
- destnode = cl.node(destmap[srcrev])
# XXX: more advanced APIs are required to handle split correctly
successors = set(obsutil.allsuccessors(repo.obsstore, [srcnode]))
# obsutil.allsuccessors includes node itself
@@ -1870,6 +1869,7 @@
# no successor
obsoletenotrebased[srcrev] = None
else:
+ destnode = cl.node(destmap[srcrev])
for succnode in successors:
if succnode not in nodemap:
continue