changeset 33776:ed99d3afef88

revset: rename bumped into phasedivergent Don't touch bumped volatile set name, only the revset name. The volatile set name will be updated in a later patch. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D252
author Boris Feld <boris.feld@octobus.net>
date Thu, 03 Aug 2017 14:08:39 +0200
parents f078d7358e90
children d4b7496f7d0b
files mercurial/commands.py mercurial/revset.py tests/test-obsolete.t
diffstat 3 files changed, 19 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Aug 03 14:01:51 2017 +0200
+++ b/mercurial/commands.py	Thu Aug 03 14:08:39 2017 +0200
@@ -4992,13 +4992,13 @@
         ui.status(_('phases: %s\n') % ', '.join(t))
 
     if obsolete.isenabled(repo, obsolete.createmarkersopt):
-        for trouble in ("orphan", "contentdivergent", "bumped"):
+        for trouble in ("orphan", "contentdivergent", "phasedivergent"):
             numtrouble = len(repo.revs(trouble + "()"))
             # We write all the possibilities to ease translation
             troublemsg = {
                "orphan": _("orphan: %d changesets"),
                "contentdivergent": _("content-divergent: %d changesets"),
-               "bumped": _("phase-divergent: %d changesets"),
+               "phasedivergent": _("phase-divergent: %d changesets"),
             }
             if numtrouble > 0:
                 ui.status(troublemsg[trouble] % numtrouble + "\n")
--- a/mercurial/revset.py	Thu Aug 03 14:01:51 2017 +0200
+++ b/mercurial/revset.py	Thu Aug 03 14:08:39 2017 +0200
@@ -459,12 +459,20 @@
 
 @predicate('bumped()', safe=True)
 def bumped(repo, subset, x):
+    msg = ("'bumped()' is deprecated, "
+           "use 'phasedivergent()'")
+    repo.ui.deprecwarn(msg, '4.4')
+
+    return phasedivergent(repo, subset, x)
+
+@predicate('phasedivergent()', safe=True)
+def phasedivergent(repo, subset, x):
     """Mutable changesets marked as successors of public changesets.
 
-    Only non-public and non-obsolete changesets can be `bumped`.
+    Only non-public and non-obsolete changesets can be `phasedivergent`.
     """
-    # i18n: "bumped" is a keyword
-    getargs(x, 0, 0, _("bumped takes no arguments"))
+    # i18n: "phasedivergent" is a keyword
+    getargs(x, 0, 0, _("phasedivergent takes no arguments"))
     bumped = obsmod.getrevs(repo, 'bumped')
     return subset & bumped
 
--- a/tests/test-obsolete.t	Thu Aug 03 14:01:51 2017 +0200
+++ b/tests/test-obsolete.t	Thu Aug 03 14:08:39 2017 +0200
@@ -223,7 +223,7 @@
 note that the bumped changeset (5:5601fb93a350) is not a direct successor of
 the public changeset
 
-  $ hg log --hidden -r 'bumped()'
+  $ hg log --hidden -r 'phasedivergent()'
   5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
 
 And that we can't push bumped changeset
@@ -261,7 +261,7 @@
   created new head
   $ hg debugobsolete -d '1338 0' --flags 1 `getid new_3_c` `getid n3w_3_c`
   obsoleted 1 changesets
-  $ hg log -r 'bumped()'
+  $ hg log -r 'phasedivergent()'
   $ hg log -G
   @  6:6f9641995072 (draft) [tip ] add n3w_3_c
   |
@@ -910,7 +910,7 @@
   $ hg debugobsolete `getid obsolete_e`
   obsoleted 1 changesets
   $ hg debugobsolete `getid original_c` `getid babar`
-  $ hg log --config ui.logtemplate= -r 'bumped() and orphan()'
+  $ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()'
   changeset:   7:50c51b361e60
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -925,12 +925,12 @@
 
 test the "troubles" templatekw
 
-  $ hg log -r 'bumped() and orphan()'
+  $ hg log -r 'phasedivergent() and orphan()'
   7:50c51b361e60 (draft orphan phase-divergent) [ ] add babar
 
 test the default cmdline template
 
-  $ hg log -T default -r 'bumped()'
+  $ hg log -T default -r 'phasedivergent()'
   changeset:   7:50c51b361e60
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -947,7 +947,7 @@
 
 test summary output
 
-  $ hg up -r 'bumped() and orphan()'
+  $ hg up -r 'phasedivergent() and orphan()'
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg summary
   parent: 7:50c51b361e60  (orphan, phase-divergent)