Page MenuHomePhabricator

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

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



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

Diff Detail

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