comparison mercurial/manifest.py @ 8077:d051342f1ad1

manifest: improve error message about newlines in filenames Include the offending filenames in the error message. Now this error message is consistent with the same error issued by dirstate.py (although there is still duplicate code).
author Greg Ward <greg-hg@gerg.ca>
date Sat, 18 Apr 2009 09:48:59 -0400
parents 14a4337a9b9b
children a1a5a57efe90
comparison
equal deleted inserted replaced
8073:e8a28556a0a8 8077:d051342f1ad1
123 123
124 def checkforbidden(l): 124 def checkforbidden(l):
125 for f in l: 125 for f in l:
126 if '\n' in f or '\r' in f: 126 if '\n' in f or '\r' in f:
127 raise error.RevlogError( 127 raise error.RevlogError(
128 _("'\\n' and '\\r' disallowed in filenames")) 128 _("'\\n' and '\\r' disallowed in filenames: %r") % f)
129 129
130 # if we're using the listcache, make sure it is valid and 130 # if we're using the listcache, make sure it is valid and
131 # parented by the same node we're diffing against 131 # parented by the same node we're diffing against
132 if not (changed and self.listcache and p1 and self.mapcache[0] == p1): 132 if not (changed and self.listcache and p1 and self.mapcache[0] == p1):
133 files = util.sort(map) 133 files = util.sort(map)