changeset 2547:3c594000844b stable

debugobsstorestat: adds static about actually obsolete changeses
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 05 Jun 2017 10:15:00 +0100
parents abe6dfbdc744
children 3fd4b0dca16c
files hgext3rd/evolve/debugcmd.py tests/test-evolve.t tests/test-prune.t
diffstat 3 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/debugcmd.py	Tue Jun 06 15:10:13 2017 -0700
+++ b/hgext3rd/evolve/debugcmd.py	Mon Jun 05 10:15:00 2017 +0100
@@ -91,7 +91,10 @@
         fc = (frozenset(c[0]), frozenset(c[1]))
         for n in fc[0]:
             pclustersmap[n] = fc
-    ui.write(('    for known precursors:   %9i\n' % known))
+    numobs = len(unfi.revs('obsolete()'))
+    numtotal = len(unfi)
+    ui.write(('    for known precursors:   %9i' % known))
+    ui.write((' (%i/%i obsolete changesets)\n' % (numobs, numtotal)))
     ui.write(('    with parents data:      %9i\n' % parentsdata))
     # successors data
     ui.write(('markers with no successors: %9i\n' % sucscount[0]))
--- a/tests/test-evolve.t	Tue Jun 06 15:10:13 2017 -0700
+++ b/tests/test-evolve.t	Mon Jun 05 10:15:00 2017 +0100
@@ -785,7 +785,7 @@
 
   $ hg debugobsstorestat
   markers total:                     10
-      for known precursors:          10
+      for known precursors:          10 (10/13 obsolete changesets)
       with parents data:              0
   markers with no successors:         0
                 1 successors:        10
--- a/tests/test-prune.t	Tue Jun 06 15:10:13 2017 -0700
+++ b/tests/test-prune.t	Mon Jun 05 10:15:00 2017 +0100
@@ -346,7 +346,7 @@
 
   $ hg debugobsstorestat
   markers total:                      7
-      for known precursors:           7
+      for known precursors:           7 (7/15 obsolete changesets)
       with parents data:              [04] (re)
   markers with no successors:         7
                 1 successors:         0