changeset 33777:d4b7496f7d0b

obsolete: rename unstable volatile set into orphan volatile set The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D253
author Boris Feld <boris.feld@octobus.net>
date Fri, 04 Aug 2017 19:27:39 +0200
parents ed99d3afef88
children f3f06c260e9e
files mercurial/context.py mercurial/obsolete.py mercurial/revset.py
diffstat 3 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Thu Aug 03 14:08:39 2017 +0200
+++ b/mercurial/context.py	Fri Aug 04 19:27:39 2017 +0200
@@ -211,7 +211,7 @@
 
     def orphan(self):
         """True if the changeset is not obsolete but it's ancestor are"""
-        return self.rev() in obsmod.getrevs(self._repo, 'unstable')
+        return self.rev() in obsmod.getrevs(self._repo, 'orphan')
 
     def bumped(self):
         msg = ("'context.bumped' is deprecated, "
--- a/mercurial/obsolete.py	Thu Aug 03 14:08:39 2017 +0200
+++ b/mercurial/obsolete.py	Fri Aug 04 19:27:39 2017 +0200
@@ -908,6 +908,14 @@
 
 @cachefor('unstable')
 def _computeunstableset(repo):
+    msg = ("'unstable' volatile set is deprecated, "
+           "use 'orphan'")
+    repo.ui.deprecwarn(msg, '4.4')
+
+    return _computeorphanset(repo)
+
+@cachefor('orphan')
+def _computeorphanset(repo):
     """the set of non obsolete revisions with obsolete parents"""
     pfunc = repo.changelog.parentrevs
     mutable = _mutablerevs(repo)
@@ -926,7 +934,7 @@
 @cachefor('suspended')
 def _computesuspendedset(repo):
     """the set of obsolete parents with non obsolete descendants"""
-    suspended = repo.changelog.ancestors(getrevs(repo, 'unstable'))
+    suspended = repo.changelog.ancestors(getrevs(repo, 'orphan'))
     return set(r for r in getrevs(repo, 'obsolete') if r in suspended)
 
 @cachefor('extinct')
--- a/mercurial/revset.py	Thu Aug 03 14:08:39 2017 +0200
+++ b/mercurial/revset.py	Fri Aug 04 19:27:39 2017 +0200
@@ -1947,8 +1947,8 @@
     """
     # i18n: "orphan" is a keyword
     getargs(x, 0, 0, _("orphan takes no arguments"))
-    unstables = obsmod.getrevs(repo, 'unstable')
-    return subset & unstables
+    orphan = obsmod.getrevs(repo, 'orphan')
+    return subset & orphan
 
 
 @predicate('user(string)', safe=True)