* Monotone to git mirroring ... how to do updates
@ 2011-11-16 10:49 Matěj Cepl
0 siblings, 0 replies; only message in thread
From: Matěj Cepl @ 2011-11-16 10:49 UTC (permalink / raw)
To: git
Hi,
I am trying to make script to be run from crontab which would
periodically mirror pidgin monotone repo to my git one (using
https://github.com/felipec/pidgin-git-import).
The main script in this repo is import:
#!/bin/sh
export GIT_DIR=pidgin.git
git init
git_marks="marks-git.txt"
mtn_marks="marks-mtn.txt"
touch $git_marks $mtn_marks
mtn --db pidgin.mtn pull
mtn git_export --db pidgin.mtn --authors-file=authors_map.txt \
--branches-file=branches_map.txt \
--refs=revs --import-marks=$mtn_marks --export-marks=$mtn_marks \
--use-one-changelog | \
git fast-import --import-marks=$git_marks --export-marks=$git_marks
I can see what this script does on the first run (when creating new git
repo), but what it does when I try to update with it already existing
repo from updated pidgin.mtn database? Where I can see the new changes?
Probably remote branches should be updated, right? (yes, I don't
understand well what actually git fast-import does, that's the problem).
Also, if I get eventually new changes to the remote branches on the git
repo, how can I update (preferably by one command) 140+ branches at
once? Or do I have to do something in the tune of?
for remote_branch in $(git branches -r) ; do
local_branch=$(echo $remote_branch |sed -e 's/origin\///')
git checkout $local_branch
git merge $remote_branch
done
Thank you in advance for any ideas,
Matěj
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-16 10:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16 10:49 Monotone to git mirroring ... how to do updates Matěj Cepl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.