This is an archive of the discontinued Mercurial Phabricator instance.

rhg: Fall back to Python on --repository with an URL
ClosedPublic

Authored by SimonSapin on Mar 3 2021, 1:24 PM.

Details

Summary

A low-hanging fruit to improve on this would be to properly parse
and handle file: URLs. But other Python-based hg supports
some other URL schemes for features that rhg does not support yet.

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.

Event Timeline

SimonSapin created this revision.Mar 3 2021, 1:24 PM
baymax updated this revision to Diff 26075.Mar 4 2021, 8:00 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

Alphare added a subscriber: Alphare.Mar 5 2021, 4:00 AM

Maybe I'm trying too hard, but is looking for : in the repo bytes too wide to detect an URL? I know actual URL parsing is out of the question right now, but maybe we can do a little bit more since : is allowed in filenames on many platforms. What do you think?

SimonSapin updated this revision to Diff 26168.Mar 9 2021, 4:39 AM

I’ve switched to using a regex that the Python code uses to find an URL’s "scheme".

baymax updated this revision to Diff 26186.Mar 9 2021, 8:39 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

marmoute accepted this revision.Mar 9 2021, 1:06 PM
SimonSapin edited the summary of this revision. (Show Details)Mar 12 2021, 5:06 PM
SimonSapin updated this revision to Diff 26288.
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.