Patchwork D3940: rebase: reduce scope of a variable

login
register
mail settings
Submitter phabricator
Date July 13, 2018, 12:23 p.m.
Message ID <81efa63edb26005894c346b92d1c1d3e@localhost.localdomain>
Download mbox | patch
Permalink /patch/32829/
State Not Applicable
Headers show

Comments

phabricator - July 13, 2018, 12:23 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG99ed6e2f6606: rebase: reduce scope of a variable (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3940?vs=9577&id=9583

REVISION DETAIL
  https://phab.mercurial-scm.org/D3940

AFFECTED FILES
  hgext/rebase.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -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