D239: context: rename unstable into orphan

2017-08-09 Thread lothiraldan (Boris Feld)
This revision was automatically updated to reflect the committed changes.
lothiraldan marked an inline comment as done.
Closed by commit rHGf163edb45c47: context: rename unstable into orphan 
(authored by lothiraldan).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D239?vs=623&id=695

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

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
@@ -204,6 +204,12 @@
 return self.rev() in obsmod.getrevs(self._repo, 'extinct')
 
 def unstable(self):
+msg = ("'context.unstable' is deprecated, "
+   "use 'context.orphan'")
+self._repo.ui.deprecwarn(msg, '4.4')
+return self.orphan()
+
+def orphan(self):
 """True if the changeset is not obsolete but it's ancestor are"""
 return self.rev() in obsmod.getrevs(self._repo, 'unstable')
 
@@ -223,7 +229,7 @@
 
 def troubled(self):
 """True if the changeset is either unstable, bumped or divergent"""
-return self.unstable() or self.bumped() or self.divergent()
+return self.orphan() or self.bumped() or self.divergent()
 
 def troubles(self):
 """Keep the old version around in order to avoid breaking extensions
@@ -234,7 +240,7 @@
 self._repo.ui.deprecwarn(msg, '4.4')
 
 troubles = []
-if self.unstable():
+if self.orphan():
 troubles.append('orphan')
 if self.bumped():
 troubles.append('bumped')
@@ -251,7 +257,7 @@
 - content-divergent.
 """
 instabilities = []
-if self.unstable():
+if self.orphan():
 instabilities.append('orphan')
 if self.bumped():
 instabilities.append('phase-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


D239: context: rename unstable into orphan

2017-08-08 Thread lothiraldan (Boris Feld)
lothiraldan marked an inline comment as done.
lothiraldan added inline comments.

INLINE COMMENTS

> indygreg wrote in context.py:208
> Typo. Can be fixed in flight if you don't submit a new series.

I have made the fix as I sent another series

REPOSITORY
  rHG Mercurial

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

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


D239: context: rename unstable into orphan

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

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D239?vs=584&id=623

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

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
@@ -204,6 +204,12 @@
 return self.rev() in obsmod.getrevs(self._repo, 'extinct')
 
 def unstable(self):
+msg = ("'context.unstable' is deprecated, "
+   "use 'context.orphan'")
+self._repo.ui.deprecwarn(msg, '4.4')
+return self.orphan()
+
+def orphan(self):
 """True if the changeset is not obsolete but it's ancestor are"""
 return self.rev() in obsmod.getrevs(self._repo, 'unstable')
 
@@ -223,7 +229,7 @@
 
 def troubled(self):
 """True if the changeset is either unstable, bumped or divergent"""
-return self.unstable() or self.bumped() or self.divergent()
+return self.orphan() or self.bumped() or self.divergent()
 
 def troubles(self):
 """Keep the old version around in order to avoid breaking extensions
@@ -234,7 +240,7 @@
 self._repo.ui.deprecwarn(msg, '4.4')
 
 troubles = []
-if self.unstable():
+if self.orphan():
 troubles.append('orphan')
 if self.bumped():
 troubles.append('bumped')
@@ -251,7 +257,7 @@
 - content-divergent.
 """
 instabilities = []
-if self.unstable():
+if self.orphan():
 instabilities.append('orphan')
 if self.bumped():
 instabilities.append('phase-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


D239: context: rename unstable into orphan

2017-08-07 Thread indygreg (Gregory Szorc)
indygreg accepted this revision.
indygreg added inline comments.
This revision is now accepted and ready to land.

INLINE COMMENTS

> context.py:208
> +msg = ("'context.unstable' is deprecated, "
> +   "use 'context.oprhan'")
> +self._repo.ui.deprecwarn(msg, '4.4')

Typo. Can be fixed in flight if you don't submit a new series.

REPOSITORY
  rHG Mercurial

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

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


D239: context: rename unstable into orphan

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 unstable context method into orphan and add a deprecation
  warning on unstable.
  
  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/D239

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
@@ -204,6 +204,12 @@
 return self.rev() in obsmod.getrevs(self._repo, 'extinct')
 
 def unstable(self):
+msg = ("'context.unstable' is deprecated, "
+   "use 'context.oprhan'")
+self._repo.ui.deprecwarn(msg, '4.4')
+return self.orphan()
+
+def orphan(self):
 """True if the changeset is not obsolete but it's ancestor are"""
 return self.rev() in obsmod.getrevs(self._repo, 'unstable')
 
@@ -223,7 +229,7 @@
 
 def troubled(self):
 """True if the changeset is either unstable, bumped or divergent"""
-return self.unstable() or self.bumped() or self.divergent()
+return self.orphan() or self.bumped() or self.divergent()
 
 def troubles(self):
 """Keep the old version around in order to avoid breaking extensions
@@ -234,7 +240,7 @@
 self._repo.ui.deprecwarn(msg, '4.4')
 
 troubles = []
-if self.unstable():
+if self.orphan():
 troubles.append('orphan')
 if self.bumped():
 troubles.append('bumped')
@@ -251,7 +257,7 @@
 - content-divergent.
 """
 instabilities = []
-if self.unstable():
+if self.orphan():
 instabilities.append('orphan')
 if self.bumped():
 instabilities.append('phase-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