Page MenuHomePhabricator

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

Authored by mharbison72 on Jan 10 2022, 11:51 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.