Patchwork [1,of,3] obsolete: introduce a troubled method on context

login
register
mail settings
Submitter Pierre-Yves David
Date Dec. 17, 2012, 2:41 p.m.
Message ID <3e51efedc357cc451eee.1355755277@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/152/
State Accepted
Commit dc526561111c4f01e6a8ae545770c61ee10f61e2
Headers show

Comments

Pierre-Yves David - Dec. 17, 2012, 2:41 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1355753175 -3600
# Node ID 3e51efedc357cc451eee807e861efb905de00331
# Parent  8c9a52492d426741ab24392d49f44a1d4f23613e
obsolete: introduce a troubled method on context

Allows to quickly check if a changeset is affected by any troubles.
(troubles are: unstable, bumped and divergent)
Bryan O'Sullivan - Dec. 17, 2012, 9:41 p.m.
On Mon, Dec 17, 2012 at 6:41 AM, <pierre-yves.david at logilab.fr> wrote:

> obsolete: introduce a troubled method on context
>
> Allows to quickly check if a changeset is affected by any troubles.
> (troubles are: unstable, bumped and divergent)
>

Where would I look to find out what any of this means?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20121217/96cad648/attachment.html>
Pierre-Yves David - Dec. 17, 2012, 9:55 p.m.
On 17 d?c. 2012, at 22:41, Bryan O'Sullivan wrote:

> On Mon, Dec 17, 2012 at 6:41 AM, <pierre-yves.david at logilab.fr> wrote:
> obsolete: introduce a troubled method on context
> 
> Allows to quickly check if a changeset is affected by any troubles.
> (troubles are: unstable, bumped and divergent)
> 
> Where would I look to find out what any of this means?

right above:

http://hg.intevation.org/mercurial/crew/file/3d1dc7aeca39/mercurial/context.py#l245

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -258,10 +258,14 @@  class changectx(object):
 
         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.unstable() or self.bumped() or self.divergent()
+
     def _fileinfo(self, path):
         if '_manifest' in self.__dict__:
             try:
                 return self._manifest[path], self._manifest.flags(path)
             except KeyError: