filelog: make parsemeta a public module function, to be used by censor module
authorMike Edgar <adgar@google.com>
Wed, 10 Sep 2014 00:18:15 -0400
changeset 22421 30a610424eff
parent 22420 4669e26747c3
child 22422 75bb7c702317
filelog: make parsemeta a public module function, to be used by censor module
mercurial/filelog.py
--- a/mercurial/filelog.py	Wed Sep 10 00:17:17 2014 -0400
+++ b/mercurial/filelog.py	Wed Sep 10 00:18:15 2014 -0400
@@ -9,7 +9,7 @@
 import re
 
 _mdre = re.compile('\1\n')
-def _parsemeta(text):
+def parsemeta(text):
     """return (metadatadict, keylist, metadatasize)"""
     # text can be buffer, so we can't use .startswith or .index
     if text[:2] != '\1\n':
@@ -50,7 +50,7 @@
         if self.parents(node)[0] != revlog.nullid:
             return False
         t = self.revision(node)
-        m = _parsemeta(t)[0]
+        m = parsemeta(t)[0]
         if m and "copy" in m:
             return (m["copy"], revlog.bin(m["copyrev"]))
         return False