Show More
@@ -119,16 +119,16 b' class manifest(revlog):' | |||||
119 | return "".join([struct.pack(">lll", d[0], d[1], len(d[2])) + d[2] |
|
119 | return "".join([struct.pack(">lll", d[0], d[1], len(d[2])) + d[2] | |
120 | for d in x ]) |
|
120 | for d in x ]) | |
121 |
|
121 | |||
122 |
def checkforbidden( |
|
122 | def checkforbidden(l): | |
123 |
|
|
123 | for f in l: | |
124 | raise RevlogError(_("'\\n' and '\\r' disallowed in filenames")) |
|
124 | if '\n' in f or '\r' in f: | |
|
125 | raise RevlogError(_("'\\n' and '\\r' disallowed in filenames")) | |||
125 |
|
126 | |||
126 | # if we're using the listcache, make sure it is valid and |
|
127 | # if we're using the listcache, make sure it is valid and | |
127 | # parented by the same node we're diffing against |
|
128 | # parented by the same node we're diffing against | |
128 | if not (changed and self.listcache and p1 and self.mapcache[0] == p1): |
|
129 | if not (changed and self.listcache and p1 and self.mapcache[0] == p1): | |
129 | files = util.sort(map) |
|
130 | files = util.sort(map) | |
130 |
|
|
131 | checkforbidden(files) | |
131 | checkforbidden(f) |
|
|||
132 |
|
132 | |||
133 | # if this is changed to support newlines in filenames, |
|
133 | # if this is changed to support newlines in filenames, | |
134 | # be sure to check the templates/ dir again (especially *-raw.tmpl) |
|
134 | # be sure to check the templates/ dir again (especially *-raw.tmpl) | |
@@ -139,8 +139,7 b' class manifest(revlog):' | |||||
139 | else: |
|
139 | else: | |
140 | addlist = self.listcache |
|
140 | addlist = self.listcache | |
141 |
|
141 | |||
142 |
|
|
142 | checkforbidden(changed[0]) | |
143 | checkforbidden(f) |
|
|||
144 | # combine the changed lists into one list for sorting |
|
143 | # combine the changed lists into one list for sorting | |
145 | work = [[x, 0] for x in changed[0]] |
|
144 | work = [[x, 0] for x in changed[0]] | |
146 | work[len(work):] = [[x, 1] for x in changed[1]] |
|
145 | work[len(work):] = [[x, 1] for x in changed[1]] |
General Comments 0
You need to be logged in to leave comments.
Login now