[PATCH 04 of 11] filectx: add a rawflags method

Jun Wu quark at fb.com
Wed May 10 04:34:23 EDT 2017


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1494372852 25200
#      Tue May 09 16:34:12 2017 -0700
# Node ID b022d125236c47e07db6209e4de648bb70a8de65
# Parent  86e994114f0e5971007b92af1aa7322c91c4cd16
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r b022d125236c
filectx: add a rawflags method

The new method returns the low-level revlog flag. We already have "rawdata"
so a "rawflags" makes sense.

Both "rawflags" and "rawdata" will be used in a later patch.

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1142,4 +1142,8 @@ class filectx(basefilectx):
         return self._filelog.revision(self._filenode, raw=True)
 
+    def rawflags(self):
+        """low-level revlog flags"""
+        return self._filelog.flags(self._filerev)
+
     def data(self):
         try:


More information about the Mercurial-devel mailing list