obsdiscovery: simply some of the missing computation
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Sat, 11 Mar 2017 08:46:21 -0800
changeset 2085 6d61c5ed3bfa
parent 2084 b1f029dcf573
child 2086 28241509ff6f
obsdiscovery: simply some of the missing computation
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Sun Mar 12 08:15:14 2017 -0700
+++ b/hgext3rd/evolve/obsdiscovery.py	Sat Mar 11 08:46:21 2017 -0800
@@ -230,9 +230,6 @@
 def findmissingrange(ui, local, remote, probeset,
                      initialsamplesize=100,
                      fullsamplesize=200):
-    cl = local.changelog
-    n = cl.node
-
     missing = set()
 
     heads = local.revs('heads(%ld)', probeset)
@@ -305,7 +302,7 @@
             if remotehash == entry.obshash:
                 continue
             elif 1 == len(entry):
-                missing.update(entry._revs)
+                missing.add(entry.node)
             else:
                 for new in entry.subranges():
                     addentry(new)
@@ -313,7 +310,7 @@
         querycount += 1
         ui.progress(_("comparing obsmarker with other"), querycount)
     ui.progress(_("comparing obsmarker with other"), None)
-    return [n(r) for r in missing]
+    return sorted(missing)
 
 def _queryrange(ui, repo, remote, allentries):
     mapping = {}