D240: context: rename divergent into contentdivergent
lothiraldan (Boris Feld)
phabricator at mercurial-scm.org
Wed Aug 9 15:36:25 UTC 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8b2d7684407b: context: rename divergent into contentdivergent (authored by lothiraldan).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D240?vs=621&id=696
REVISION DETAIL
https://phab.mercurial-scm.org/D240
AFFECTED FILES
mercurial/context.py
CHANGE DETAILS
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -221,15 +221,21 @@
return self.rev() in obsmod.getrevs(self._repo, 'bumped')
def divergent(self):
+ msg = ("'context.divergent' is deprecated, "
+ "use 'context.contentdivergent'")
+ self._repo.ui.deprecwarn(msg, '4.4')
+ return self.contentdivergent()
+
+ def contentdivergent(self):
"""Is a successors of a changeset with multiple possible successors set
Only non-public and non-obsolete changesets may be divergent.
"""
return self.rev() in obsmod.getrevs(self._repo, 'divergent')
def troubled(self):
"""True if the changeset is either unstable, bumped or divergent"""
- return self.orphan() or self.bumped() or self.divergent()
+ return self.orphan() or self.bumped() or self.contentdivergent()
def troubles(self):
"""Keep the old version around in order to avoid breaking extensions
@@ -244,7 +250,7 @@
troubles.append('orphan')
if self.bumped():
troubles.append('bumped')
- if self.divergent():
+ if self.contentdivergent():
troubles.append('divergent')
return troubles
@@ -261,7 +267,7 @@
instabilities.append('orphan')
if self.bumped():
instabilities.append('phase-divergent')
- if self.divergent():
+ if self.contentdivergent():
instabilities.append('content-divergent')
return instabilities
To: lothiraldan, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list