Patchwork [2,of,3] context: add obsoletestr

login
register
mail settings
Submitter Romain DEP.
Date Jan. 6, 2015, 9:47 a.m.
Message ID <76d3ce984a461e7c95a8.1420537656@ultas>
Download mbox | patch
Permalink /patch/7328/
State Rejected
Headers show

Comments

Romain DEP. - Jan. 6, 2015, 9:47 a.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1420411181 -3600
#      Sun Jan 04 23:39:41 2015 +0100
# Node ID 76d3ce984a461e7c95a83840f8012210b8c9b531
# Parent  7a73c8aa23c3d403008b7327de082567fc5705d2
context: add obsoletestr

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -187,6 +187,11 @@ 
         """True if the changeset is obsolete"""
         return self.rev() in obsmod.getrevs(self._repo, 'obsolete')
 
+    def obsoletestr(self):
+        if self.obsolete():
+            return 'obsolete'
+        return 'nonobsolete'
+
     def extinct(self):
         """True if the changeset is extinct"""
         return self.rev() in obsmod.getrevs(self._repo, 'extinct')