D8281: narrow: escape includepats/excludepats when sending over the wire (BC)
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Mar 13 15:17:56 UTC 2020
martinvonz added a comment.
In D8281#123659 <https://phab.mercurial-scm.org/D8281#123659>, @mharbison72 wrote:
> In D8281#123625 <https://phab.mercurial-scm.org/D8281#123625>, @spectral wrote:
>
>> In D8281#123621 <https://phab.mercurial-scm.org/D8281#123621>, @mharbison72 wrote:
>>
>>> The Windows path changes seem like a good idea.
>>> Would quoting paths with commas eliminate the need for custom escaping? I don't feel strongly about it, but custom escaping always feels weird to me. (I fact, a coworker did some homebrew escaping for CSV files a few days ago, but I forget how it ultimately ended up.)
>>
>> Let me play with that a bit, I think it'll work and be detectable on the server since the first character can't currently be a double-quote, so there wouldn't really be any BC issues aside from the pconvert (which wouldn't be as important anymore, but still probably a good idea?)
>
> I haven't played with narrow yet, so I'm not sure of the context. Are these user input paths that would end up being ignored/rejected if a Windows user used `path\to\file` when talking to a Unix server? Or are these stored in a tracked file? (Which I think could still cause problems.) I can't think of a good reason to stay inconsistent, and it is still experimental, so it still seems like a good idea while we still can fix it.
They are stored in .hg/store/narrowspec. They usually get into that file via `hg clone --narrow --include` and similar, but the server may also send them. We should ideally do the conversion early when the user provides them. I think the pconvert in this patch is to handle existing repos as well as possible.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8281/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8281
To: spectral, durin42, martinvonz, #hg-reviewers, marmoute
Cc: marmoute, mharbison72, mercurial-devel
More information about the Mercurial-devel
mailing list