##// END OF EJS Templates
dirstate: improve error message on file/directory clash
Bryan O'Sullivan -
r5045:8b1ee1f5 default
parent child Browse files
Show More
@@ -191,13 +191,14 b' class dirstate(object):'
191 raise util.Abort(_("'\\n' and '\\r' disallowed in filenames"))
191 raise util.Abort(_("'\\n' and '\\r' disallowed in filenames"))
192 # shadows
192 # shadows
193 if f in self._dirs:
193 if f in self._dirs:
194 raise util.Abort(_('directory named %r already in dirstate') % f)
194 raise util.Abort(_('directory %r already in dirstate') % f)
195 for c in strutil.rfindall(f, '/'):
195 for c in strutil.rfindall(f, '/'):
196 d = f[:c]
196 d = f[:c]
197 if d in self._dirs:
197 if d in self._dirs:
198 break
198 break
199 if d in self._map:
199 if d in self._map:
200 raise util.Abort(_('file named %r already in dirstate') % d)
200 raise util.Abort(_('file %r in dirstate clashes with %r') %
201 (d, f))
201 self._incpath(f)
202 self._incpath(f)
202
203
203 def normal(self, f):
204 def normal(self, f):
General Comments 0
You need to be logged in to leave comments. Login now