[PATCH] dispatch: avoid double backslashes in error message

golubdr at gmail.com golubdr at gmail.com
Thu Jul 21 15:04:10 CDT 2011


# HG changeset patch
# User David Golub <davidg at fogcreek.com>
# Date 1311278554 14400
# Branch stable
# Node ID f83df0fa2108e108a672c648d72012eb38f1d94a
# Parent  95ced9f5bf2972bfb1d42fd963cbaf1e6f14df45
dispatch: avoid double backslashes in error message

The use of %r in the format string caused Python to display Windows paths with
double backslashes.

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -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:


More information about the Mercurial-devel mailing list