diff mercurial/context.py @ 30743:2df983125d37

revlog: add 'raw' argument to revision and _addrevision This patch introduces a new 'raw' argument (defaults to False) to revlog's revision() and _addrevision() methods. When the 'raw' argument is set to True, it indicates the revision data should be handled as raw data by the flagprocessor. Note: Given revlog.addgroup() calls are restricted to changegroup generation, we can always set raw to True when calling revlog._addrevision() from revlog.addgroup().
author Remi Chaintron <remi@fb.com>
date Thu, 05 Jan 2017 17:16:07 +0000
parents ce662ee40d2d
children 6e1d54be7588
line wrap: on
line diff
--- a/mercurial/context.py	Tue Jan 10 06:59:49 2017 +0800
+++ b/mercurial/context.py	Thu Jan 05 17:16:07 2017 +0000
@@ -1110,6 +1110,9 @@
         return filectx(self._repo, self._path, fileid=fileid,
                        filelog=self._filelog, changeid=changeid)
 
+    def rawdata(self):
+        return self._filelog.revision(self._filenode, raw=True)
+
     def data(self):
         try:
             return self._filelog.read(self._filenode)