This is an archive of the discontinued Mercurial Phabricator instance.

remotenames: move utility functions to join and split names to core
AbandonedPublic

Authored by pulkit on Oct 4 2017, 5:53 PM.

Details

Reviewers
ryanmce
Group Reviewers
hg-reviewers
Summary

The functions splitremotename and joinremotename are moved to core from
remotenames extension.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Oct 4 2017, 5:53 PM
ryanmce requested changes to this revision.Oct 12 2017, 8:31 AM
ryanmce added a subscriber: ryanmce.
ryanmce added inline comments.
mercurial/remotenames.py
10–19

As you mentioned when we chatted, this doesn't work great because the remote path can have a / character in it, eg:

$ hg paths
com/mon = https://www.mercurial-scm.org/repo/hg-committed/

And then this whole thing breaks. So we need to think about a better storage mechanism.

I would suggest JSON as one possibility since it already takes care of all encoding problems, and allows nested information that's straightforward to manipulate.

This revision now requires changes to proceed.Oct 12 2017, 8:31 AM
pulkit abandoned this revision.Oct 17 2017, 7:19 PM

Will revisit after the freeze.