I'm looking into the viability of switching from svn to mercurial for my organization, but there's one hangup I can't seem to find a solution for.
Is there any way to pull and update a repo and all subrepos without manually pulling and updating each one?
I'd like to switch to mercurial, but if that's not possible then it's a no-go for us.
Edit: Good god I must be tired today... two questions on SO for which I find the answers minutes after asking...
Somehow missed this, and found it right after asking the question: https://www.mercurial-scm.org/wiki/OnsubExtension
You can define a simple shell alias like the following
alias hgsub='find . -name ".hg" -type d | grep -v "\./\.hg" | \
xargs -n1 dirname | xargs -n1 -iREPO hg -R REPO '
and then do
hgsub tip
hgsub pull -u
As an alterantive, a batch script might help:
@echo off
for /D %%d in (*) do (
if exist %%d\.hg (
echo Verzeichnis %%d
cd %%d
hg pull -u
echo ----------------------------------------------
cd ..
)
)
pause
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With