From: "Matěj Cepl" <mcepl@redhat.com>
To: git@vger.kernel.org
Subject: Monotone to git mirroring ... how to do updates
Date: Wed, 16 Nov 2011 11:49:57 +0100 [thread overview]
Message-ID: <4EC39555.3060500@redhat.com> (raw)
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
reply other threads:[~2011-11-16 10:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC39555.3060500@redhat.com \
--to=mcepl@redhat.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.