Patchwork D253: obsolete: rename unstable volatile set into orphan volatile set

login
register
mail settings
Submitter phabricator
Date Aug. 11, 2017, 8:04 p.m.
Message ID <69289cfcde698fa802beef132af9b504@localhost.localdomain>
Download mbox | patch
Permalink /patch/22905/
State Not Applicable
Headers show

Comments

phabricator - Aug. 11, 2017, 8:04 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd4b7496f7d0b: obsolete: rename unstable volatile set into orphan volatile set (authored by lothiraldan).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D253?vs=598&id=807

REVISION DETAIL
  https://phab.mercurial-scm.org/D253

AFFECTED FILES
  mercurial/context.py
  mercurial/obsolete.py
  mercurial/revset.py

CHANGE DETAILS




To: lothiraldan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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)
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -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')
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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, "