Patchwork [04,of,11] filectx: add a rawflags method

login
register
mail settings
Submitter Jun Wu
Date May 10, 2017, 8:34 a.m.
Message ID <b022d125236c47e07db6.1494405263@x1c>
Download mbox | patch
Permalink /patch/20550/
State Accepted
Headers show

Comments

Jun Wu - May 10, 2017, 8:34 a.m.
# HG changeset patch
# User Jun Wu <quark@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.

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: