changeset 22215:525cde5d954d

obsmarker: add a `flags` method We introduce a proper method to access the flag information.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 15 Aug 2014 09:41:30 -0700
parents 3f93eff1de57
children 9be81b86ca97
files mercurial/cmdutil.py mercurial/obsolete.py
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Fri Aug 15 14:19:15 2014 -0700
+++ b/mercurial/cmdutil.py	Fri Aug 15 09:41:30 2014 -0700
@@ -1184,7 +1184,7 @@
     for repl in marker.succnodes():
         ui.write(' ')
         ui.write(hex(repl))
-    ui.write(' %X ' % marker._data[2])
+    ui.write(' %X ' % marker.flags())
     ui.write('{%s}' % (', '.join('%r: %r' % t for t in
                                  sorted(marker.metadata().items()))))
     ui.write('\n')
--- a/mercurial/obsolete.py	Fri Aug 15 14:19:15 2014 -0700
+++ b/mercurial/obsolete.py	Fri Aug 15 09:41:30 2014 -0700
@@ -226,6 +226,10 @@
         parts = self.metadata()['date'].split(' ')
         return (float(parts[0]), int(parts[1]))
 
+    def flags(self):
+        """The flags field of the marker"""
+        return self._data[2]
+
 class obsstore(object):
     """Store obsolete markers