Submitter | phabricator |
---|---|
Date | Aug. 7, 2017, 10:08 a.m. |
Message ID | <differential-rev-PHID-DREV-7rc7v66cqzmt5nru6noz-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/22701/ |
State | Superseded |
Headers | show |
Comments
indygreg requested changes to this revision. indygreg added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > context.py:227 > + self._repo.ui.deprecwarn(msg, '4.4') > + return self.orphan() > + This should be `self.contentdivergent()` no? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D240 To: lothiraldan, #hg-reviewers, indygreg Cc: indygreg, mercurial-devel
lothiraldan added inline comments. INLINE COMMENTS > indygreg wrote in context.py:227 > This should be `self.contentdivergent()` no? Damn it you are right, good catch! REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D240 To: lothiraldan, #hg-reviewers, indygreg Cc: indygreg, mercurial-devel
lothiraldan added inline comments. INLINE COMMENTS > lothiraldan wrote in context.py:227 > Damn it you are right, good catch! Sorry for the tone of my comment, I was only angry against myself, I thought I have fixed this code too many times due to merge conflicts. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D240 To: lothiraldan, #hg-reviewers, indygreg Cc: indygreg, mercurial-devel
Patch
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.orphan() + + 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