Answer the question
In order to leave comments, you need to log in
Mirror Subversion (svn) -> Mercurial (hg)?
There is a constantly (two or three times a day) updated third-party svn repository (on Google Code), I want to have for myself (and the people) its hg mirror (on BitBucket). Not necessarily automatically, but with the ability to initiate mirroring from any machine, even under Windows :) (meaning without installing a bunch of software like hg, svn, python, bindings, etc. and constant conversion).
All day I was tormented with XP and Google, but I did not find a sensible solution. The only thing spinning in my head is creating a script that runs on VDS via ssh (via putty under Windows) or cron, which does something like:
hg convert <a href="http://code.google.com/<repo">code.google.com/<repo</a>> /tmp/<repo>-hg<br/>
cd /tmp/<repo>-hg<br/>
hg push ssh://[email protected]/VolCh/<repo><br/>
cd /<br/>
rm -r /tmp/<repo><br/>
Answer the question
In order to leave comments, you need to log in
Well, in order not to pull everything every time, you can use hgsubversion. But a better option doesn't come to mind :)
As far as I remember, hg convert
it can work incrementally - when it is restarted with the same repositories, it takes only new revisions from the source.
I once made a stupid script:
the main idea
at the beginning is to do
svn co code.google.com/ /home/user/google_code_repo
and then push the script into crontab:
cd /home/user/google_code_repo
svn up
hg addremove ./*
hg commit -m "auto commit from svn"
hg push ssh://[email protected]/VolCh/ if you don't need an exact match of revisions and their comments, then this option is quite convenient
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question