{"thread":{"id":"28945","subject":"Monotone to git mirroring ... how to do updates","startedAt":"2011-11-16T10:49:57Z","lastAt":"2011-11-16T10:49:57Z","messageCount":1,"participants":["Matěj Cepl"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"179580","messageId":"4EC39555.3060500@redhat.com","threadId":"28945","inReplyTo":null,"subject":"Monotone to git mirroring ... how to do updates","fromName":"Matěj Cepl","fromEmail":"mcepl@redhat.com","sentAt":"2011-11-16T10:49:57Z","receivedAt":"2011-11-16T10:49:57Z","isPatch":false,"sender":{"key":"mcepl@redhat.com","avatar":null},"body":"Hi,\n\nI am trying to make script to be run from crontab which would \nperiodically mirror pidgin monotone repo to my git one (using \nhttps://github.com/felipec/pidgin-git-import).\n\nThe main script in this repo is import:\n\n#!/bin/sh\n\nexport GIT_DIR=pidgin.git\n\ngit init\n\ngit_marks=\"marks-git.txt\"\nmtn_marks=\"marks-mtn.txt\"\n\ntouch $git_marks $mtn_marks\n\nmtn --db pidgin.mtn pull\nmtn git_export --db pidgin.mtn --authors-file=authors_map.txt \\\n     --branches-file=branches_map.txt \\\n     --refs=revs --import-marks=$mtn_marks --export-marks=$mtn_marks \\\n     --use-one-changelog | \\\n   git fast-import --import-marks=$git_marks --export-marks=$git_marks\n\nI can see what this script does on the first run (when creating new git \nrepo), but what it does when I try to update with it already existing \nrepo from updated pidgin.mtn database? Where I can see the new changes? \nProbably remote branches should be updated, right? (yes, I don't \nunderstand well what actually git fast-import does, that's the problem).\n\nAlso, if I get eventually new changes to the remote branches on the git \nrepo, how can I update (preferably by one command) 140+ branches at \nonce? Or do I have to do something in the tune of?\n\nfor remote_branch in $(git branches -r) ; do\n    local_branch=$(echo $remote_branch |sed -e 's/origin\\///')\n    git checkout $local_branch\n    git merge $remote_branch\ndone\n\nThank you in advance for any ideas,\n\nMatěj\n"}]}