[PATCH 1 of 2] windows: add a method to convert Unix style command lines to Windows style

Yuya Nishihara yuya at tcha.org
Thu Jun 28 11:49:42 UTC 2018


On Wed, 27 Jun 2018 08:44:26 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1529817189 14400
> #      Sun Jun 24 01:13:09 2018 -0400
> # Node ID 7ac9de5a8826fc95864ee4ba844eb8b5c9e71332
> # Parent  2c2e82469b8915c8153979cd89a970b7317f882d
> windows: add a method to convert Unix style command lines to Windows style

Queued, thanks.

> +        elif c == b'\\' and index + 1 < pathlen and path[index + 1] == b'$':
> +            # Skip '\', but only if it is escaping $
> +            res += b'$'
> +            index += 1

\-escape might be confusing since \ is the directory separator on Windows,
and a hook command is likely to contain backslashes.



More information about the Mercurial-devel mailing list