##// END OF EJS Templates
manifest: move checkforbidden to module-level...
Augie Fackler -
r22408:dc97e04c default
parent child Browse files
Show More
@@ -40,6 +40,15 b' class manifestdict(dict):'
40 def flagsdiff(self, d2):
40 def flagsdiff(self, d2):
41 return dicthelpers.diff(self._flags, d2._flags, "")
41 return dicthelpers.diff(self._flags, d2._flags, "")
42
42
43
44 def checkforbidden(l):
45 """Check filenames for illegal characters."""
46 for f in l:
47 if '\n' in f or '\r' in f:
48 raise error.RevlogError(
49 _("'\\n' and '\\r' disallowed in filenames: %r") % f)
50
51
43 class manifest(revlog.revlog):
52 class manifest(revlog.revlog):
44 def __init__(self, opener):
53 def __init__(self, opener):
45 # we expect to deal with not more than four revs at a time,
54 # we expect to deal with not more than four revs at a time,
@@ -152,12 +161,6 b' class manifest(revlog.revlog):'
152 + content for start, end, content in x)
161 + content for start, end, content in x)
153 return deltatext, newaddlist
162 return deltatext, newaddlist
154
163
155 def checkforbidden(l):
156 for f in l:
157 if '\n' in f or '\r' in f:
158 raise error.RevlogError(
159 _("'\\n' and '\\r' disallowed in filenames: %r") % f)
160
161 # if we're using the cache, make sure it is valid and
164 # if we're using the cache, make sure it is valid and
162 # parented by the same node we're diffing against
165 # parented by the same node we're diffing against
163 if not (changed and p1 and (p1 in self._mancache)):
166 if not (changed and p1 and (p1 in self._mancache)):
General Comments 0
You need to be logged in to leave comments. Login now