changeset 2847:a1805a65ce21

revset: bumped volatile set was deprecated Use phasedivergent volatile set instead. Match 07a76d4f2297 mercurial changeset.
author Boris Feld <boris.feld@octobus.net>
date Fri, 11 Aug 2017 12:20:56 +0200
parents 9c019996bce0
children 4b248aebc604
files hgext3rd/evolve/__init__.py hgext3rd/evolve/compat.py tests/test-inhibit.t
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py	Fri Aug 11 12:12:03 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Fri Aug 11 12:20:56 2017 +0200
@@ -490,7 +490,7 @@
     revset.getargs(x, 0, 0, 'troubled takes no arguments')
     troubled = set()
     troubled.update(getrevs(repo, 'orphan'))
-    troubled.update(getrevs(repo, 'bumped'))
+    troubled.update(getrevs(repo, 'phasedivergent'))
     troubled.update(getrevs(repo, 'contentdivergent'))
     troubled = revset.baseset(troubled)
     troubled.sort() # set is non-ordered, enforce order
@@ -760,14 +760,14 @@
     # This needs a better implementation but will probably wait for core.
     filtered = repo.changelog.filteredrevs
     priorunstables = len(set(getrevs(repo, 'orphan')) - filtered)
-    priorbumpeds = len(set(getrevs(repo, 'bumped')) - filtered)
+    priorbumpeds = len(set(getrevs(repo, 'phasedivergent')) - filtered)
     priordivergents = len(set(getrevs(repo, 'contentdivergent')) - filtered)
     ret = orig(ui, repo, *args, **kwargs)
     filtered = repo.changelog.filteredrevs
     newunstables = \
         len(set(getrevs(repo, 'orphan')) - filtered) - priorunstables
     newbumpeds = \
-        len(set(getrevs(repo, 'bumped')) - filtered) - priorbumpeds
+        len(set(getrevs(repo, 'phasedivergent')) - filtered) - priorbumpeds
     newdivergents = \
         len(set(getrevs(repo, 'contentdivergent')) - filtered) - priordivergents
     if newunstables > 0:
--- a/hgext3rd/evolve/compat.py	Fri Aug 11 12:12:03 2017 +0200
+++ b/hgext3rd/evolve/compat.py	Fri Aug 11 12:20:56 2017 +0200
@@ -158,3 +158,6 @@
 
 if not util.safehasattr(obsolete, '_computecontentdivergentset'):
     obsolete._computecontentdivergentset = obsolete.cachefor('contentdivergent')(obsolete._computedivergentset)
+
+if not util.safehasattr(obsolete, '_computephasedivergentset'):
+    obsolete._computephasedivergentset = obsolete.cachefor('phasedivergent')(obsolete._computebumpedset)
--- a/tests/test-inhibit.t	Fri Aug 11 12:12:03 2017 +0200
+++ b/tests/test-inhibit.t	Fri Aug 11 12:20:56 2017 +0200
@@ -159,6 +159,7 @@
   o  0:54ccbc537fc2 add cA
   
   $ hg phase --public 7
+  1 new bumped changesets
   $ hg strip 9
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory now at cf5c4f4554ce