Is it possible to synchronize local/remote repositories without any interaction (i.e. by script)?
Chris Green
cl at isbd.net
Sun Aug 12 14:00:12 UTC 2018
I am a 'single user' developer (retired Software Engineer) and I use
mercurial to keep track of software I write mostly for my own use.
It's an excellent tool, much more intuitive than git for me anyway.
I would like to be able to keep some repositories on remote systems
in step with a 'master' repository on my home desktop machine. This
is all on Linux (Debian or derivatives) systems. All the systems have
ssh access to each other but in the main this requires a password or
key/passphrase for authentication.
Firstly, is there a straightforward sequence of commands that one can
issue to 'synchronize' two repositories? Since I am almost certainly
the only user and I'm unlikely to edit the same file on two different
systems (without committing changes in between) no file merges should
be required. I'm happy for a script to ask for input if it does
detect that some sort of merge is required.
So, I've cloned a repository on a remote system somewhere:-
hg clone ssh://my.home.system.com/repo1
I have two use cases:-
1 - I've changed something on the home system and I want the
change to be copied to the remote system by a script called from
.bash_login (i.e. automatically at login).
2 - After logging in on the remote system via ssh I change
something there and I want the change copied back to the home
system by the .bash_logout script (i.e. automatically at logout).
These need to be as far as possible silent scripts, as noted above I'm
happy to have them talk to me if there's a conflict of some sort but
otherwise I want quietness. I can probably manage to make the ssh
access password/key-less but how easy is it to automate the mercurial
bits?
--
Chris Green
More information about the Mercurial
mailing list