D255: obsolete: rename bumped volatile set into phasedivergent volatile set

2017-08-11 Thread lothiraldan (Boris Feld)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9fa874fb34e1: obsolete: rename bumped volatile set into 
phasedivergent volatile set (authored by lothiraldan).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D255?vs=600=809

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

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

CHANGE DETAILS

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -473,8 +473,8 @@
 """
 # i18n: "phasedivergent" is a keyword
 getargs(x, 0, 0, _("phasedivergent takes no arguments"))
-bumped = obsmod.getrevs(repo, 'bumped')
-return subset & bumped
+phasedivergent = obsmod.getrevs(repo, 'phasedivergent')
+return subset & phasedivergent
 
 @predicate('bundle()', safe=True)
 def bundle(repo, subset, x):
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -942,9 +942,16 @@
 """the set of obsolete parents without non obsolete descendants"""
 return getrevs(repo, 'obsolete') - getrevs(repo, 'suspended')
 
-
 @cachefor('bumped')
 def _computebumpedset(repo):
+msg = ("'bumped' volatile set is deprecated, "
+   "use 'phasedivergent'")
+repo.ui.deprecwarn(msg, '4.4')
+
+return _computephasedivergentset(repo)
+
+@cachefor('phasedivergent')
+def _computephasedivergentset(repo):
 """the set of revs trying to obsolete public revisions"""
 bumped = set()
 # util function (avoid attribute lookup in the loop)
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -224,7 +224,7 @@
 
 Only non-public and non-obsolete changesets may be bumped.
 """
-return self.rev() in obsmod.getrevs(self._repo, 'bumped')
+return self.rev() in obsmod.getrevs(self._repo, 'phasedivergent')
 
 def divergent(self):
 msg = ("'context.divergent' is deprecated, "



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D255: obsolete: rename bumped volatile set into phasedivergent volatile set

2017-08-07 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The renaming is done according to
  https://www.mercurial-scm.org/wiki/CEDVocabulary.

REPOSITORY
  rHG Mercurial

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

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

CHANGE DETAILS

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -473,8 +473,8 @@
 """
 # i18n: "phasedivergent" is a keyword
 getargs(x, 0, 0, _("phasedivergent takes no arguments"))
-bumped = obsmod.getrevs(repo, 'bumped')
-return subset & bumped
+phasedivergent = obsmod.getrevs(repo, 'phasedivergent')
+return subset & phasedivergent
 
 @predicate('bundle()', safe=True)
 def bundle(repo, subset, x):
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -942,9 +942,16 @@
 """the set of obsolete parents without non obsolete descendants"""
 return getrevs(repo, 'obsolete') - getrevs(repo, 'suspended')
 
-
 @cachefor('bumped')
 def _computebumpedset(repo):
+msg = ("'bumped' volatile set is deprecated, "
+   "use 'phasedivergent'")
+repo.ui.deprecwarn(msg, '4.4')
+
+return _computephasedivergentset(repo)
+
+@cachefor('phasedivergent')
+def _computephasedivergentset(repo):
 """the set of revs trying to obsolete public revisions"""
 bumped = set()
 # util function (avoid attribute lookup in the loop)
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -224,7 +224,7 @@
 
 Only non-public and non-obsolete changesets may be bumped.
 """
-return self.rev() in obsmod.getrevs(self._repo, 'bumped')
+return self.rev() in obsmod.getrevs(self._repo, 'phasedivergent')
 
 def divergent(self):
 msg = ("'context.divergent' is deprecated, "



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel