diff mercurial/revset.py @ 33796:f078d7358e90

revset: remane divergent into contentdivergent Don't touch divergent 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/D251
author Boris Feld <boris.feld@octobus.net>
date Thu, 03 Aug 2017 14:01:51 +0200
parents 9dcc3529e002
children ed99d3afef88
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Aug 03 13:48:39 2017 +0200
+++ b/mercurial/revset.py	Thu Aug 03 14:01:51 2017 +0200
@@ -711,11 +711,19 @@
 
 @predicate('divergent()', safe=True)
 def divergent(repo, subset, x):
+    msg = ("'divergent()' is deprecated, "
+           "use 'contentdivergent()'")
+    repo.ui.deprecwarn(msg, '4.4')
+
+    return contentdivergent(repo, subset, x)
+
+@predicate('contentdivergent()', safe=True)
+def contentdivergent(repo, subset, x):
     """
     Final successors of changesets with an alternative set of final successors.
     """
-    # i18n: "divergent" is a keyword
-    getargs(x, 0, 0, _("divergent takes no arguments"))
+    # i18n: "contentdivergent" is a keyword
+    getargs(x, 0, 0, _("contentdivergent takes no arguments"))
     divergent = obsmod.getrevs(repo, 'divergent')
     return subset & divergent