evolve: add progress for the obsmarkers discovery parts
authortimeless@mozdev.org
Wed, 09 Sep 2015 19:43:14 -0400
changeset 1494 aca2495425a6
parent 1493 083220acba01
child 1495 625b75a01196
evolve: add progress for the obsmarkers discovery parts
README
hgext/evolve.py
--- a/README	Wed Sep 09 19:40:54 2015 -0400
+++ b/README	Wed Sep 09 19:43:14 2015 -0400
@@ -51,9 +51,10 @@
 Changelog
 =========
 
-5.2.0 --
+5.3.0 --
 
 - split: add a new command to split changesets
+- add some progress data during changesets discovery
 
 5.2.0 -- 2015-06-25
 
--- a/hgext/evolve.py	Wed Sep 09 19:40:54 2015 -0400
+++ b/hgext/evolve.py	Wed Sep 09 19:43:14 2015 -0400
@@ -3022,6 +3022,8 @@
     missing = set()
     common = set()
     undecided = set(probeset)
+    totalnb = len(undecided)
+    ui.progress("comparing with other", 0, total=totalnb)
     _takefullsample = setdiscovery._takefullsample
     if remote.capable('_evoext_obshash_1'):
         getremotehash = remote.evoext_obshash1
@@ -3039,6 +3041,8 @@
             sample = _takefullsample(dag, undecided, size=fullsamplesize)
 
         roundtrips += 1
+        ui.progress("comparing with other", totalnb - len(undecided),
+                    total=totalnb)
         ui.debug("query %i; still undecided: %i, sample size is: %i\n"
                  % (roundtrips, len(undecided), len(sample)))
         # indices between sample and externalized version must match
@@ -3058,6 +3062,7 @@
         undecided.difference_update(common)
 
 
+    ui.progress("comparing with other", None, total=totalnb)
     result = dag.headsetofconnecteds(common)
     ui.debug("%d total queries\n" % roundtrips)