D1974: narrow: import experimental extension from narrowhg revision cb51d673e9c5

idlsoft (Sandu Turcan) phabricator at mercurial-scm.org
Thu Feb 8 13:52:31 EST 2018


idlsoft added inline comments.

INLINE COMMENTS

> indygreg wrote in narrowbundle2.py:336
> We may want to remove this feature for the time being, as it is very Google specific. I'm happy to provide a mechanism for extensions to hook in here to enforce ACLs. But there's nothing in core that deals with path-based access control and I think things should remain that way in order to keep the code simple.
> 
> For the time being at least. I do acknowledge value in the feature and it is something I'd like to see in core some day. I just think we should stabilize the partial clone functionality first before we start forcing people to think about path-based access control.

I've contributed the ACL code originally.
It's a relatively trivial piece of code, at least compared to the rest of the codebase, and it is called conditionally. 
I hope it can stay, my company is about to migrate from git to hg because of it.

> indygreg wrote in narrowbundle2.py:378-380
> Silently adding a repo requirement during a pull or unbundle operation doesn't feel right to me. At least not at this juncture. For at least as long as the feature is experimental, I think we should refuse to apply (or fetch) a narrow bundle if the repo isn't already narrow. We can provide an `hg debug*` command to add the requirement to make people's lives easier.

This was added to support seamless clone from an ACLed repo. The user doesn't know ahead of time about server-side narrowing.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1974

To: durin42, #hg-reviewers
Cc: idlsoft, martinvonz, indygreg, mercurial-devel


More information about the Mercurial-devel mailing list