changeset 1580:b915e0d54db0

evolve: duplicate evolution summary entries (issue5014) Since we added summary entries for trouble changesets in core we don't need to display it anymore in evolve for the version of hg with the change. Tested with 3.6.1 and 3.6.2.
author Laurent Charignon <lcharignon@fb.com>
date Mon, 04 Jan 2016 08:39:58 -0800
parents 4f83b2d2d20d
children 54f75dc48887
files hgext/evolve.py
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Sun Jan 03 16:47:57 2016 +0100
+++ b/hgext/evolve.py	Mon Jan 04 08:39:58 2016 -0800
@@ -765,12 +765,17 @@
         else:
             ui.note(s)
 
-    nbunstable = len(getrevs(repo, 'unstable'))
-    nbbumped = len(getrevs(repo, 'bumped'))
-    nbdivergent = len(getrevs(repo, 'divergent'))
-    write('unstable: %i changesets\n', nbunstable)
-    write('bumped: %i changesets\n', nbbumped)
-    write('divergent: %i changesets\n', nbdivergent)
+    # util.versiontuple was introduced in 3.6.2
+    if not util.safehasattr(util, 'versiontuple'):
+        nbunstable = len(getrevs(repo, 'unstable'))
+        nbbumped = len(getrevs(repo, 'bumped'))
+        nbdivergent = len(getrevs(repo, 'divergent'))
+        write('unstable: %i changesets\n', nbunstable)
+        write('bumped: %i changesets\n', nbbumped)
+        write('divergent: %i changesets\n', nbdivergent)
+    else:
+        # In 3.6.2, summary in core gained this feature, no need to display it
+        pass
 
 @eh.extsetup
 def obssummarysetup(ui):