Mercurial > hg4j
diff src/org/tmatesoft/hg/internal/Internals.java @ 409:0f5696623512 smartgit3
Support glob path pattern rewrite to facilitate use of globs with Windows path separator
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 16 Mar 2012 20:14:47 +0100 |
parents | 30922c728341 |
children | 464b4404e75d |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/Internals.java Fri Mar 16 15:06:44 2012 +0100 +++ b/src/org/tmatesoft/hg/internal/Internals.java Fri Mar 16 20:14:47 2012 +0100 @@ -83,18 +83,7 @@ public PathRewrite buildNormalizePathRewrite() { if (runningOnWindows()) { - return new PathRewrite() { - - public CharSequence rewrite(CharSequence p) { - // TODO handle . and .. (although unlikely to face them from GUI client) - String path = p.toString(); - path = path.replace('\\', '/').replace("//", "/"); - if (path.startsWith("/")) { - path = path.substring(1); - } - return path; - } - }; + return new WinToNixPathRewrite(); } else { return new PathRewrite.Empty(); // or strip leading slash, perhaps? }