D6147: discovery: move cl.hasnode outside of the for-loop

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Wed Mar 27 15:37:14 EDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG19ccc6788a27: discovery: move cl.hasnode outside of the for-loop (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6147?vs=14539&id=14602

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

AFFECTED FILES
  mercurial/discovery.py

CHANGE DETAILS

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -212,14 +212,14 @@
     with remote.commandexecutor() as e:
         remotemap = e.callcommand('branchmap', {}).result()
 
+    knownnode = cl.hasnode # do not use nodemap until it is filtered
     # A. register remote heads of branches which are in outgoing set
     for branch, heads in remotemap.iteritems():
         # don't add head info about branches which we don't have locally
         if branch not in branches:
             continue
         known = []
         unsynced = []
-        knownnode = cl.hasnode # do not use nodemap until it is filtered
         for h in heads:
             if knownnode(h):
                 known.append(h)



To: pulkit, #hg-reviewers
Cc: lothiraldan, mercurial-devel


More information about the Mercurial-devel mailing list