Synchronizing a collection of Mercurial repositories

青春壹個敷衍的年華 提交于 2019-12-06 01:14:50

To my knowledge nothing like this exists. The safest way to move changesets back and forth between repositories is always hg push and hg pull and none of those command operate on more than one source or destination repository.

For backup purposes I've done something like this before:

for thedir in $(find . -type d -name .hg) ; do
   repopath=$(dirname $thedir)
   hg push $repopath ssh://mybackupserver//path/to/backups/$(basename $repopath)
done

which pushes all local repos to off site backups. In theory you could do both push and pull and if necessary a init/clone, but you'll start running into edge ccases pretty quickly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!