# HG changeset patch # User Matt Harbison # Date 2018-12-03 17:48:42 # Node ID 151aec6494a8c8566e098443189dd4d17c56b575 # Parent 01c335afc997e79d674fad0bbe623ffac6472722 extdiff: avoid double backslashes in the displayed tool path on Windows This shows the tool path in the help, and changed in 67b180c0e263. uirepr() already does the same thing, but that undoes the mangling in its call to repr(). diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -383,8 +383,9 @@ class savedcmd(object): def __init__(self, path, cmdline): # We can't pass non-ASCII through docstrings (and path is - # in an unknown encoding anyway) - docpath = stringutil.escapestr(path) + # in an unknown encoding anyway), but avoid double separators on + # Windows + docpath = stringutil.escapestr(path).replace(b'\\\\', b'\\') self.__doc__ %= {r'path': pycompat.sysstr(stringutil.uirepr(docpath))} self._cmdline = cmdline