changeset 22415:65ec6c5c0fb3

manifest: mark addlistdelta and checkforbidden as module-private
author Augie Fackler <raf@durin42.com>
date Thu, 11 Sep 2014 10:14:34 -0400
parents 299eaa09b41b
children 810d37485e85
files mercurial/manifest.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/manifest.py	Wed Sep 10 10:52:00 2014 -0400
+++ b/mercurial/manifest.py	Thu Sep 11 10:14:34 2014 -0400
@@ -41,7 +41,7 @@
         return dicthelpers.diff(self._flags, d2._flags, "")
 
 
-def checkforbidden(l):
+def _checkforbidden(l):
     """Check filenames for illegal characters."""
     for f in l:
         if '\n' in f or '\r' in f:
@@ -51,7 +51,7 @@
 
 # apply the changes collected during the bisect loop to our addlist
 # return a delta suitable for addrevision
-def addlistdelta(addlist, x):
+def _addlistdelta(addlist, x):
     # for large addlist arrays, building a new array is cheaper
     # than repeatedly modifying the existing one
     currentposition = 0
@@ -166,7 +166,7 @@
         # parented by the same node we're diffing against
         if not (changed and p1 and (p1 in self._mancache)):
             files = sorted(map)
-            checkforbidden(files)
+            _checkforbidden(files)
 
             # if this is changed to support newlines in filenames,
             # be sure to check the templates/ dir again (especially *-raw.tmpl)
@@ -179,7 +179,7 @@
             added, removed = changed
             addlist = self._mancache[p1][1]
 
-            checkforbidden(added)
+            _checkforbidden(added)
             # combine the changed lists into one list for sorting
             work = [(x, False) for x in added]
             work.extend((x, True) for x in removed)
@@ -223,7 +223,7 @@
             if dstart is not None:
                 delta.append([dstart, dend, "".join(dline)])
             # apply the delta to the addlist, and get a delta for addrevision
-            deltatext, addlist = addlistdelta(addlist, delta)
+            deltatext, addlist = _addlistdelta(addlist, delta)
             cachedelta = (self.rev(p1), deltatext)
             arraytext = addlist
             text = util.buffer(arraytext)