revset: unstable volatile set was deprecated
authorBoris Feld <boris.feld@octobus.net>
Fri, 11 Aug 2017 11:55:07 +0200
changeset 2845 9fc6a4615ae5
parent 2844 9688988472da
child 2846 9c019996bce0
revset: unstable volatile set was deprecated Use orphan volatile set instead. Match 5579864798c6 mercurial changeset.
hgext3rd/evolve/__init__.py
hgext3rd/evolve/compat.py
--- a/hgext3rd/evolve/__init__.py	Fri Aug 11 11:43:57 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Fri Aug 11 11:55:07 2017 +0200
@@ -489,7 +489,7 @@
     """
     revset.getargs(x, 0, 0, 'troubled takes no arguments')
     troubled = set()
-    troubled.update(getrevs(repo, 'unstable'))
+    troubled.update(getrevs(repo, 'orphan'))
     troubled.update(getrevs(repo, 'bumped'))
     troubled.update(getrevs(repo, 'divergent'))
     troubled = revset.baseset(troubled)
@@ -759,13 +759,13 @@
     # part of the troubled stuff may be filtered (stash ?)
     # This needs a better implementation but will probably wait for core.
     filtered = repo.changelog.filteredrevs
-    priorunstables = len(set(getrevs(repo, 'unstable')) - filtered)
+    priorunstables = len(set(getrevs(repo, 'orphan')) - filtered)
     priorbumpeds = len(set(getrevs(repo, 'bumped')) - filtered)
     priordivergents = len(set(getrevs(repo, 'divergent')) - filtered)
     ret = orig(ui, repo, *args, **kwargs)
     filtered = repo.changelog.filteredrevs
     newunstables = \
-        len(set(getrevs(repo, 'unstable')) - filtered) - priorunstables
+        len(set(getrevs(repo, 'orphan')) - filtered) - priorunstables
     newbumpeds = \
         len(set(getrevs(repo, 'bumped')) - filtered) - priorbumpeds
     newdivergents = \
--- a/hgext3rd/evolve/compat.py	Fri Aug 11 11:43:57 2017 +0200
+++ b/hgext3rd/evolve/compat.py	Fri Aug 11 11:55:07 2017 +0200
@@ -152,3 +152,6 @@
         return self.precursors
 
     obsolete.obsstore.predecessors = predecessors
+
+if not util.safehasattr(obsolete, '_computeorphanset'):
+    obsolete._computeorphanset = obsolete.cachefor('orphan')(obsolete._computeunstableset)