This is an archive of the discontinued Mercurial Phabricator instance.

remotenames: add a function to return the vfs object
AbandonedPublic

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

Details

Reviewers
dlax
ryanmce
Group Reviewers
hg-reviewers
Summary

The statement was added at a lot of places and was going to be added at more
places. So before that, let's turn that into a function.

Also this is turned into a function so that we can plug in the support for
shared repositories in future which is supported by hgremotenames 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
dlax accepted this revision.Oct 5 2017, 4:08 AM
pulkit planned changes to this revision.Oct 6 2017, 5:15 PM
ryanmce requested changes to this revision.Oct 12 2017, 7:43 AM
ryanmce added a subscriber: ryanmce.
ryanmce added inline comments.
mercurial/remotenames.py
31

This is not a great name. It implies it's a vfs on a remote peer, which is definitely not what we want to imply.
We might just call it getvfs in this case -- it's already in the remotenames module so it's obvious what it is if it's used outside of the module.

After reading the description, I see that this is for shared usage in the future. You should add a comment here in the code explaining that.
Also, a better way to deal with that is to build a shared vfs in core -- but that's outside of the scope of this change.

32–33

nit: For single-line docblocks, please close the docblock on the same line:

"""returns a vfs object for .hg/remotenames/"""
pulkit abandoned this revision.Oct 17 2017, 7:20 PM

Will revisit after the freeze.