Moving fb extensions to core.
Durham Goode
durham at fb.com
Wed Jul 5 14:24:59 EDT 2017
On 7/5/17 11:13 AM, Pulkit Goyal wrote:
> Hey,
>
> I am responsible to move some of facebook's extension to core. The
> first easy ones which I need to move are commitextras, morestatus,
> copytrace, pushvars.
>
> This mail is to ask how the community wants them in core.
>
> commitextras: This extension adds a flag to add "extras" values to a
> commit from command line terminal. I think that this can be moved to
> core by marking the flag marked as ADVANCED and making sure we allow
> users to use extras' keys which we use internally. I have a patch for
> that already in the list.
To provide more context, this extension is useful when automation wants
to make Mercurial commits and embed extra information in the commit
metadata, without having to write a custom Mercurial extension.
> morsestatus: This extension wraps the status command to show more
> things about the current state of the repo by showing if histedit,
> bisect, graft, unshelve, rebase or merge is going on and show how to
> continue and abort that state. I personally think adding a --more flag
> will be good.
Whatever the initial path is, long term I think we want to aim for
having this enabled by default. In our testing, it's been the only thing
that has actually made users aware of the pending state they are in and
how to get out of it.
> pushvars: This one adds a flag to push command to send environment
> variables which hooks can read. This one adds a new bundle2 part. I
> think we should have this as an extension in core as I am not sure
> directly adding this to core is a good option.
Our primary use for this is allowing users to bypass certain hooks. We
have an extremely common pattern where we use hooks to prevent certain
mistakes (like non-forward bookmark movements, or checking in large
binary files) but we also want to grant the user the ability to bypass
the hook if they are trying to do a legitimate operation. I'd imagine
this is a common usecase in the wild as well, so it might be nice to
have in core eventually.
> copytrace: This patch speeds up the copy tracing by a file based
> heuristics. I am not sure about the way to go with this.
I'd put this in core and behind a config flag. Just like we have
aggressive merge deltas behind a config flag, this is an optimization
that is useful for some, is awkward to do via an extension, and could
end up replacing the current copy tracing logic in the future if we
iterate on it enough.
More information about the Mercurial-devel
mailing list