D241: context: rename bumped into phasedivergent

2017-08-09 Thread lothiraldan (Boris Feld)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8413cbeae275: context: rename bumped into phasedivergent 
(authored by lothiraldan).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D241?vs=622=697

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

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
@@ -214,6 +214,12 @@
 return self.rev() in obsmod.getrevs(self._repo, 'unstable')
 
 def bumped(self):
+msg = ("'context.bumped' is deprecated, "
+   "use 'context.phasedivergent'")
+self._repo.ui.deprecwarn(msg, '4.4')
+return self.phasedivergent()
+
+def phasedivergent(self):
 """True if the changeset try to be a successor of a public changeset
 
 Only non-public and non-obsolete changesets may be bumped.
@@ -235,7 +241,7 @@
 
 def troubled(self):
 """True if the changeset is either unstable, bumped or divergent"""
-return self.orphan() or self.bumped() or self.contentdivergent()
+return self.orphan() or self.phasedivergent() or 
self.contentdivergent()
 
 def troubles(self):
 """Keep the old version around in order to avoid breaking extensions
@@ -248,7 +254,7 @@
 troubles = []
 if self.orphan():
 troubles.append('orphan')
-if self.bumped():
+if self.phasedivergent():
 troubles.append('bumped')
 if self.contentdivergent():
 troubles.append('divergent')
@@ -265,7 +271,7 @@
 instabilities = []
 if self.orphan():
 instabilities.append('orphan')
-if self.bumped():
+if self.phasedivergent():
 instabilities.append('phase-divergent')
 if self.contentdivergent():
 instabilities.append('content-divergent')



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


D241: context: rename bumped into phasedivergent

2017-08-08 Thread lothiraldan (Boris Feld)
lothiraldan updated this revision to Diff 622.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D241?vs=586=622

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

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
@@ -214,6 +214,12 @@
 return self.rev() in obsmod.getrevs(self._repo, 'unstable')
 
 def bumped(self):
+msg = ("'context.bumped' is deprecated, "
+   "use 'context.phasedivergent'")
+self._repo.ui.deprecwarn(msg, '4.4')
+return self.phasedivergent()
+
+def phasedivergent(self):
 """True if the changeset try to be a successor of a public changeset
 
 Only non-public and non-obsolete changesets may be bumped.
@@ -235,7 +241,7 @@
 
 def troubled(self):
 """True if the changeset is either unstable, bumped or divergent"""
-return self.orphan() or self.bumped() or self.contentdivergent()
+return self.orphan() or self.phasedivergent() or 
self.contentdivergent()
 
 def troubles(self):
 """Keep the old version around in order to avoid breaking extensions
@@ -248,7 +254,7 @@
 troubles = []
 if self.orphan():
 troubles.append('orphan')
-if self.bumped():
+if self.phasedivergent():
 troubles.append('bumped')
 if self.contentdivergent():
 troubles.append('divergent')
@@ -265,7 +271,7 @@
 instabilities = []
 if self.orphan():
 instabilities.append('orphan')
-if self.bumped():
+if self.phasedivergent():
 instabilities.append('phase-divergent')
 if self.contentdivergent():
 instabilities.append('content-divergent')



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


D241: context: rename bumped into phasedivergent

2017-08-08 Thread lothiraldan (Boris Feld)
lothiraldan added inline comments.

INLINE COMMENTS

> indygreg wrote in context.py:220
> Shouldn't this be `self.phasedivergent()`?

Yes definitely, thanks for the catch

REPOSITORY
  rHG Mercurial

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

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


D241: context: rename bumped into phasedivergent

2017-08-07 Thread indygreg (Gregory Szorc)
indygreg requested changes to this revision.
indygreg added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> context.py:220
> +self._repo.ui.deprecwarn(msg, '4.4')
> +return self.orphan()
> +

Shouldn't this be `self.phasedivergent()`?

REPOSITORY
  rHG Mercurial

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

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


D241: context: rename bumped into phasedivergent

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
  Rename bumped context method into phasedivergent and add a deprecation warning
  on bumped.
  
  Only update all callers to keep the patch straightforward.
  
  The renaming is done according to
  https://www.mercurial-scm.org/wiki/CEDVocabulary.

REPOSITORY
  rHG Mercurial

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

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
@@ -214,6 +214,12 @@
 return self.rev() in obsmod.getrevs(self._repo, 'unstable')
 
 def bumped(self):
+msg = ("'context.bumped' is deprecated, "
+   "use 'context.phasedivergent'")
+self._repo.ui.deprecwarn(msg, '4.4')
+return self.orphan()
+
+def phasedivergent(self):
 """True if the changeset try to be a successor of a public changeset
 
 Only non-public and non-obsolete changesets may be bumped.
@@ -235,7 +241,7 @@
 
 def troubled(self):
 """True if the changeset is either unstable, bumped or divergent"""
-return self.orphan() or self.bumped() or self.contentdivergent()
+return self.orphan() or self.phasedivergent() or 
self.contentdivergent()
 
 def troubles(self):
 """Keep the old version around in order to avoid breaking extensions
@@ -248,7 +254,7 @@
 troubles = []
 if self.orphan():
 troubles.append('orphan')
-if self.bumped():
+if self.phasedivergent():
 troubles.append('bumped')
 if self.contentdivergent():
 troubles.append('divergent')
@@ -265,7 +271,7 @@
 instabilities = []
 if self.orphan():
 instabilities.append('orphan')
-if self.bumped():
+if self.phasedivergent():
 instabilities.append('phase-divergent')
 if self.contentdivergent():
 instabilities.append('content-divergent')



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