diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -197,7 +197,8 @@ class dirstate(object): def _incpathcheck(self, f): if '\r' in f or '\n' in f: - raise util.Abort(_("'\\n' and '\\r' disallowed in filenames")) + raise util.Abort(_("'\\n' and '\\r' disallowed in filenames: %r") + % f) # shadows if f in self._dirs: raise util.Abort(_('directory %r already in dirstate') % f) diff --git a/tests/test-issue352.out b/tests/test-issue352.out --- a/tests/test-issue352.out +++ b/tests/test-issue352.out @@ -1,13 +1,13 @@ adding he llo -abort: '\n' and '\r' disallowed in filenames +abort: '\n' and '\r' disallowed in filenames: 'he\rllo' adding he llo -abort: '\n' and '\r' disallowed in filenames +abort: '\n' and '\r' disallowed in filenames: 'he\rllo' adding hell o -abort: '\n' and '\r' disallowed in filenames +abort: '\n' and '\r' disallowed in filenames: 'hell\no' adding hell o -abort: '\n' and '\r' disallowed in filenames +abort: '\n' and '\r' disallowed in filenames: 'hell\no' f he llo he llo f hell o hell