changeset 14914:41c3a71c318d stable

dispatch: avoid double backslashes in error message The use of %r in the format string caused Python to display Windows paths with double backslashes.
author David Golub <davidg@fogcreek.com>
date Thu, 21 Jul 2011 16:02:34 -0400
parents a934b9249574
children 28edd65000d9
files mercurial/dispatch.py tests/test-i18n.t
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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]