Patchwork manifest: mark addlistdelta and checkforbidden as module-private

login
register
mail settings
Submitter Augie Fackler
Date Sept. 11, 2014, 2:14 p.m.
Message ID <8a351a796ac3c2acdd51.1410444890@arthedain.pit.corp.google.com>
Download mbox | patch
Permalink /patch/5799/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 11, 2014, 2:14 p.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1410444874 14400
#      Thu Sep 11 10:14:34 2014 -0400
# Node ID 8a351a796ac3c2acdd51989a6c0ec3ebb09e4c25
# Parent  be53282bd69c489b3ad8909be0391fb04d6b512a
manifest: mark addlistdelta and checkforbidden as module-private
Pierre-Yves David - Sept. 11, 2014, 2:41 p.m.
On 09/11/2014 04:14 PM, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <raf@durin42.com>
> # Date 1410444874 14400
> #      Thu Sep 11 10:14:34 2014 -0400
> # Node ID 8a351a796ac3c2acdd51989a6c0ec3ebb09e4c25
> # Parent  be53282bd69c489b3ad8909be0391fb04d6b512a
> manifest: mark addlistdelta and checkforbidden as module-private

sure, pushed to the clowncopter

Patch

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -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)