Patchwork D7737: ancestor: drop another unused variable assignment

login
register
mail settings
Submitter phabricator
Date Dec. 27, 2019, 9:16 p.m.
Message ID <differential-rev-PHID-DREV-evw52267h3gzllk37hza-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44066/
State Superseded
Headers show

Comments

phabricator - Dec. 27, 2019, 9:16 p.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Also caught by PyCharm.  The only time this is used is immediately after another
  assignment below this.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/ancestor.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/ancestor.py b/mercurial/ancestor.py
--- a/mercurial/ancestor.py
+++ b/mercurial/ancestor.py
@@ -108,12 +108,12 @@ 
                 if p == nullrev:
                     continue
                 dp = depth[p]
-                nsp = sp = seen[p]
+                sp = seen[p]
                 if dp <= dv:
                     depth[p] = dv + 1
                     if sp != sv:
                         interesting[sv] += 1
-                        nsp = seen[p] = sv
+                        seen[p] = sv
                         if sp:
                             interesting[sp] -= 1
                             if interesting[sp] == 0: