# HG changeset patch # User FUJIWARA Katsunori # Date 1324721135 -32400 # Node ID 1581da01d5c45ede387cdbd61a3a3e878fe8f657 # Parent 417127af399677e16b0ed9e555480b1e521a94ca windows: use normalized path as path to subrepo path to subrepo is used to identify or check location of subrepo. it should be normalized (in "/" delimiter form), because it is also used with narrowmatcher which uses only normalized path even on Windows environment. this patch applies "util.pconvert()" on path to subrepo (called "subpath") to normalize it. for this patch, referers of below were checked. - subrepo.state() - subrepo.itersubrepos() - subrepo.subrepo() - context.sub() - context.substate() typical usecase is: for subpath in ctx.substate: sub = ctx.sub(subpath) ... ctx.substate[subpath] .... in this case, normalization has no side effect, because keys given from substate are used as key itself. other cases shown below also seem to require subpath to be normalized. - path components are joined by "/", in "commands.forget()": for subpath in ctx.substate: subforget[subpath + '/' + fsub] = (fsub, sub) - normalized "file" is used to check below condition, in "commands.revert()", "localrepository.commit()", and "localrepository._checknested()" file in ctx.substate - substate.keys() is passed to dirstate.walk()/status() which use only normalized pathes diff -r 417127af3996 -r 1581da01d5c4 mercurial/subrepo.py --- a/mercurial/subrepo.py Sat Dec 24 19:05:25 2011 +0900 +++ b/mercurial/subrepo.py Sat Dec 24 19:05:35 2011 +0900 @@ -92,7 +92,7 @@ src = remapped src = remap(src) - state[path] = (src.strip(), rev.get(path, ''), kind) + state[util.pconvert(path)] = (src.strip(), rev.get(path, ''), kind) return state