dispatch: avoid double backslashes in error message stable
authorDavid Golub <davidg@fogcreek.com>
Thu, 21 Jul 2011 16:02:34 -0400
branchstable
changeset 14914 41c3a71c318d
parent 14903 a934b9249574
child 14915 28edd65000d9
dispatch: avoid double backslashes in error message The use of %r in the format string caused Python to display Windows paths with double backslashes.
mercurial/dispatch.py
tests/test-i18n.t
--- a/mercurial/dispatch.py	Thu Jul 21 15:39:37 2011 -0500
+++ b/mercurial/dispatch.py	Thu Jul 21 16:02:34 2011 -0400
@@ -658,7 +658,7 @@
                             req.args = ['--repository', guess] + fullargs
                             return _dispatch(req)
                     if not path:
-                        raise error.RepoError(_("no repository found in %r"
+                        raise error.RepoError(_("no repository found in '%s'"
                                                 " (.hg not found)") % os.getcwd())
                     raise
         if repo:
--- a/tests/test-i18n.t	Thu Jul 21 15:39:37 2011 -0500
+++ b/tests/test-i18n.t	Thu Jul 21 16:02:34 2011 -0400
@@ -8,17 +8,17 @@
 using the "replace" error handler:
 
   $ LANGUAGE=pt_BR hg tip
-  abortado: n?o foi encontrado um reposit?rio em '$TESTTMP' (.hg n?o encontrado)!
+  abortado: no repository found in '$TESTTMP' (.hg not found)!
   [255]
 
 Using a more accomodating encoding:
 
   $ HGENCODING=UTF-8 LANGUAGE=pt_BR hg tip
-  abortado: n\xc3\xa3o foi encontrado um reposit\xc3\xb3rio em '$TESTTMP' (.hg n\xc3\xa3o encontrado)! (esc)
+  abortado: no repository found in '$TESTTMP' (.hg not found)!
   [255]
 
 Different encoding:
 
   $ HGENCODING=Latin-1 LANGUAGE=pt_BR hg tip
-  abortado: n\xe3o foi encontrado um reposit\xf3rio em '$TESTTMP' (.hg n\xe3o encontrado)! (esc)
+  abortado: no repository found in '$TESTTMP' (.hg not found)!
   [255]