[PATCH] Per-host remotecmd option in .hgrc

timeless timeless at gmail.com
Mon Oct 3 09:43:32 UTC 2011


If I want to share settings for multiple hosts, what do I do?

C+P is painful :)

On 9/30/11, Augie Fackler <durin42 at gmail.com> wrote:
>
> On Sep 30, 2011, at 8:14 PM, Matt Mackall wrote:
>
>> On Sat, 2011-10-01 at 01:11 +0200, Mads Kiilerich wrote:
>>> Matt Mackall wrote, On 09/30/2011 09:36 PM:
>>>> On Thu, 2011-09-29 at 22:25 +0400, Dmitry Samersoff wrote:
>>>>> dsamersoff: Per-host remotecmd option in .hgrc (issue359)
>>>>>
>>>>> Patch below allows user to setup per-host remotecmd in the .hgrc file
>>>>> in the form:
>>>>>
>>>>> [ui]
>>>>> remotecmd = /opt/bin/hg
>>>>> remotecmd.mircat.net =/opt/csw/bin/hg
>>>> Well I can't think of a better solution short of adding a bunch of
>>>> per-host sections.
>>>
>>> This adds another way of doing host-specifc configuration, different
>>> from what we already have for hostfingerprints and auth.
>>
>> Agreed, we should aim for some uniformity here.
>>
>>> I think it
>>> would be slightly better to add a remotecmd section. That could perhaps
>>> simplye be "implemented" by documenting it as
>>> [ui.remotecmd]
>>> mircat.net = ...
>>
>> Hmm, that's not especially appealing. And it sort of implies a similar
>> trick can be done for all ui settings.
>>
>> The various sections existing per-host settings look like this:
>>
>> [auth]
>> foo.prefix = example.com/path
>> foo.username = bob
>> foo.schemes = http https
>>
>> [hostfingerprints]
>> example.com = 38:76:52:7c:87:26:9a:8f:4a:f8:d3:de:08:45:3b:ea:d6:4b:ee:cc
>>
>> ..so it's already a bit late to be consistent unless we do something
>> more drastic.
>>
>> Also, we probably want to specify ui.ssh in a consistent fashion.
>>
>> I think we should seriously consider replacing this mess with a
>> consistent per-host schema of some sort.
>
> [hosts] # Not actually thrilled with this name on account of it working for
> local paths too, but oh well?
> foo.prefix = example.com/path
> foo.username = alice
> foo.fingerprint =
> 38:76:52:7c:87:26:9a:8f:4a:f8:d3:de:08:45:3b:ea:d6:4b:ee:cc
> foo.remotecmd = /we/put/hg/over/here/hg
>
> Seems perfectly reasonable to me. Could probably even write a contrib script
> to suggest the right results based on the user's current config. Anything
> I'm missing that we should consider?
>
>>
>> --
>> Mathematics is the supreme nostalgia of our time.
>>
>>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial-devel
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

-- 
Sent from my mobile device



More information about the Mercurial-devel mailing list