HomePhabricator

subrepo: make -S work again on Windows for incoming/outgoing to remote repos

Authored by mharbison72.

Description

subrepo: make -S work again on Windows for incoming/outgoing to remote repos

While it worked fine for the top level repo, the remote path for the subrepo got
mangled to something like "https://server/prefix\repo\subrepo", which I've seen
result in both a 400 and a 404, depending on the server. We need to normpath
at least the subpath because of "http://user:***@localhost:$HGPORT/main/../sub"
in test-subrepo-relative-path.t. Keep the os.path flavor for handling
filesystem based remote repos, since this string is also displayed.

This is one case where the automatic substitution of '\' for '/' and rematching
done by the test runner is unfortunate- I don't see how to write a test to catch
this.

Differential Revision: https://phab.mercurial-scm.org/D11971