Disable backing out merges?

Martin Geisler mg at lazybytes.net
Sat Oct 8 09:44:53 CDT 2011


Didly <didlybom at gmail.com> writes:

> On Fri, Oct 7, 2011 at 9:08 AM, Martin Geisler <mg at lazybytes.net> wrote:
>> Didly <didlybom at gmail.com> writes:
>>
>>> As the person unofficially in charge of mercurial at my company,
>>> this is something that I wish was built-in into mercurial (perhaps
>>> as an extension).
>>
>> There is such an extension:
>>
>>  http://mercurial.selenic.com/wiki/ProjrcExtension
>>
>> It lets you "radiate" options from a central repository to the
>> clones. It's been used in production some time now at a client of
>> mine.
>>
>> --
>> Martin Geisler
>
> Martin,
>
> this is _very_ cool! I think it works pretty much as I imagined such a
> thing should work :-D

Heh, thanks :)

> Is there a way to enable or disable this extension on a per repo
> basis? I ask because blindly taking someone else's configuration may
> be a bit unsafe. In particular hook configurations and enabled
> extensions may be a bit dangerous.

Yes, it's very unsafe to pull in a config file from someone like this.
So you should only enable the extension in repositories where it makes
sense.

It was of course made for a corporate setting where all repositories on
the server is trusted.

> It would be cool if it were possible to only accept .projectrc files
> from certain repos, or even to select which sections of the .projectrc
> file should be accepted automatically. Or perhaps the user could get a
> prompt whenever the .projectrc file changes, and be given a chance to
> review the new .projectrc file and accept or decline the new version?
>
> Conversely, is it possible for a target repo to somehow check if this
> (or some other) extension is enabled before accepting a push?

Not with this extension. Pushing generally works so that the clients ask
for the capabilities of the server and then adjusts their behavior
accordingly. So the server wont know the client version or capabilities.

For a push over HTTP, Sune tells me that you can inspect the HTTP
environment in a pretxncommit hook, so there it will be easy to
communicate values from client to server. There's not the same meta
channel for SSH.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/


More information about the Mercurial-devel mailing list