# HG changeset patch # User Patrick Mezard # Date 1189460161 -7200 # Node ID 23651848d63898ccc2ba64fa84651ee1c2f73973 # Parent ed6df6b1c29af317bf130c65bb51c09989a809d0 extdiff: avoid repr() doubling paths backslashes under Windows diff -r ed6df6b1c29a -r 23651848d638 hgext/extdiff.py --- a/hgext/extdiff.py Fri Sep 07 17:38:52 2007 +0200 +++ b/hgext/extdiff.py Mon Sep 10 23:36:01 2007 +0200 @@ -174,17 +174,17 @@ '''use closure to save diff command to use''' def mydiff(ui, repo, *pats, **opts): return dodiff(ui, repo, path, diffopts, pats, opts) - mydiff.__doc__ = '''use %(path)r to diff repository (or selected files) + mydiff.__doc__ = '''use %(path)s to diff repository (or selected files) Show differences between revisions for the specified - files, using the %(path)r program. + files, using the %(path)s program. When two revision arguments are given, then changes are shown between those revisions. If only one revision is specified then that revision is compared to the working directory, and, when no revisions are specified, the working directory files are compared to its parent.''' % { - 'path': path, + 'path': util.uirepr(path), } return mydiff cmdtable[cmd] = (save(cmd, path, diffopts), diff -r ed6df6b1c29a -r 23651848d638 mercurial/util.py --- a/mercurial/util.py Fri Sep 07 17:38:52 2007 +0200 +++ b/mercurial/util.py Mon Sep 10 23:36:01 2007 +0200 @@ -1628,3 +1628,7 @@ if path.startswith('//'): path = path[2:] return path + +def uirepr(s): + # Avoid double backslash in Windows path repr() + return repr(s).replace('\\\\', '\\')