This is an archive of the discontinued Mercurial Phabricator instance.

urlutil: add a new `get_unique_push_path`
ClosedPublic

Authored by marmoute on Apr 14 2021, 7:37 PM.

Details

Summary

This function is dedicated to call that needs a single destination. Currently
most caller actually need that since few actually support multiple destinations
(the most importants hg push and hg outgoing do). So having a clear API
point for that will be important when the time comes to have a single [paths]
alias resolving to multiple urls.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

marmoute created this revision.Apr 14 2021, 7:37 PM
pulkit requested changes to this revision.Apr 15 2021, 7:49 AM
pulkit added a subscriber: pulkit.

This needs a better commit message and description.

This revision now requires changes to proceed.Apr 15 2021, 7:49 AM

This needs a better commit message and description.

woops, looks like I forgot that one while writing description.

marmoute retitled this revision from get_unique_push_path to urlutil: add a new `get_unique_push_path`.Apr 15 2021, 10:37 AM
marmoute edited the summary of this revision. (Show Details)
marmoute updated this revision to Diff 26942.

This should be fixed

pulkit accepted this revision.Apr 15 2021, 11:07 AM
pulkit added inline comments.
mercurial/utils/urlutil.py
489

AssertionError does not look friendly here. Can you follow up with error.Abort() or something else here?

This revision is now accepted and ready to land.Apr 15 2021, 11:07 AM
marmoute added inline comments.Apr 16 2021, 5:15 AM
mercurial/utils/urlutil.py
489

This is made into a proper error late down the stack. When this get in an actual risk of being multiple value.

This revision was automatically updated to reflect the committed changes.