hg: added --ssh to specify which SSH binary to use

Perez-Gonzalez, Inaky inaky.perez-gonzalez at intel.com
Fri Aug 19 12:25:17 CDT 2005


>From: mercurial-bounces at selenic.com
[mailto:mercurial-bounces at selenic.com] On Behalf Of Thomas Arendsen Hein
>
>> Agreed, but multiply by twenty repos that you need to push to twenty
>> different locations, at one different key (and maybe host) each and
it
>> becomes a pain to handle manually. Having it redirected to a SSH
>> connector
>> file (the one that embeds the key on itself) eases management a lot.
>
>Remembering 20 different sshanoncvs commands given each time on the
>command line or added each time to each clone of a repo isn't very
>comfortable, too. Once you have your preferred setting in
>.ssh/config, you can just do copy&paste with only changing few
>parts without these (unfortunately needed) chmod tricks.

Come on! I am way more lazy than that! :) and remember I want to use
this
part in a cronjob, so I don't have to do it all the time--I usually name

it after the repo dir:

* */2 * * * REPO=whatever hg -R $REPO --ssh $REPO.ssh push -f
$DSTHOST/REPOS/$(basename $REPO)

The key here is that I have this little script that given a list of
repos,
for each it generates a dsa key and creates the .ssh file (with the 
embedded private key) and the authorized_keys data (with the publick
key), 
so the infrastructure is totally automatic--I just have to give my real
key
for the script to install the authorized_keys parts in the destination
hosts.

[soon to change to 'push -e $REPO.ssh...' by Matt's request]

To sum up: if we add it to the hgrc as a default, it is sweet, but it is
also
very useful to be able to override from the command line. I hope to have
it
ready next week.

-- Inaky



More information about the Mercurial mailing list