Page MenuHomePhabricator

share: store relative share paths with '/' separators

Authored by mharbison72 on Thu, Apr 8, 7:52 PM.



I created a relative share in Windows and tried to use it in WSL, and it failed:

abort: .hg/sharedpath points to nonexistent directory

Use normpath on the read side so that the code has the usual Windows style
paths it always had (I don't think that matters much), but it also eliminates
the directory escaping path components in the case where the path is printed.

This will not fix repositories that have already been created, but it's trivial
enough to hand edit the file to correct it.

Diff Detail

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

Event Timeline

mharbison72 created this revision.Thu, Apr 8, 7:52 PM
Alphare added subscribers: SimonSapin, Alphare.EditedFri, Apr 9, 4:29 AM
Alphare accepted this revision.

@SimonSapin This is something we'd want to do in the Rust implementation. Right now is too soon, but I wonder if we need to have a policy of at least adding TODOs or identity functions to help a Windows (or MacOS, etc.) compat endeavor.

This patch affects creation of new shared repositories, right? At the moment we don’t have any Rust code doing that.

For the more general point, right now we don’t have such an establish policy. We could make one.

marmoute accepted this revision.Fri, Apr 9, 5:54 AM
pulkit accepted this revision.Sun, Apr 11, 5:28 PM
This revision is now accepted and ready to land.Sun, Apr 11, 5:28 PM