*/
public static HgIgnore newHgIgnore(Reader source, PathRewrite globPathRewrite) throws IOException {
if (globPathRewrite == null) {
// shall match that of HgRepository#getIgnore() (Internals#buildNormalizePathRewrite())
if (Internals.runningOnWindows()) {
globPathRewrite = new WinToNixPathRewrite();
} else {
globPathRewrite = new PathRewrite.Empty();
}
}
HgIgnore hgIgnore = new HgIgnore(globPathRewrite);