Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 80:f772a6cc2f67
Make a plain Windows UNC path into a file: URL for HGpath and friends.
Within Mercurial they are normalized to plain Windows UNC paths.
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Fri, 23 Feb 2018 12:48:25 +0100 |
| parents | 53c9f2f6a13e |
| children | e02aceb91a9b |
| files | extensions/kwarchive.py |
| diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/kwarchive.py Fri Feb 23 09:49:10 2018 +0100 +++ b/extensions/kwarchive.py Fri Feb 23 12:48:25 2018 +0100 @@ -353,6 +353,9 @@ raise error.Abort(_('repository %s not found') % hgpath) else: path_uri = repo.root + # Make an URL from a Windows UNC path + if path_uri.startswith(b"\\\\"): + path_uri = b"file:///" + path_uri.replace(b'\\', b'/') keywords = { "HGpath": path_uri, "HGrevision": ctx.hex(),
