aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/mtn2git/update-script.example
blob: 7638cc297708949f05bb63eabdeab5c12e14cb89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash

export PATH=/home/zecke/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

cd $HOME/mtn2git-scm/oe-convert/

# Update monotone
mtn --db ../OE.mtn pull monotone.linuxtogo.org "org.openembedded.*"

OLD_OE_DIR=openembedded-git.$$.$RANDOM

git-clone -l openembedded-git $OLD_OE_DIR
cp git-import-marks2 $OLD_OE_DIR/
cp mtn2git-status.v2 $OLD_OE_DIR/
cp mtn2git-marks     $OLD_OE_DIR/

cd openembedded-git
# Convert (this could fail as our marks are not complete...) and we hardcode the revision
#../../mtn2git/mtn2git.py --db ../../OE.mtn --marks=../mtn2git-marks --status=../mtn2git-status.v2 2> /dev/null | git-fast-import --date-format=rfc2822 --import-marks=../git-import-marks2 --export-marks=../git-import-marks2
../../mtn2git/mtn2git.py --db ../../OE.mtn --marks=../mtn2git-marks --status=../mtn2git-status.v2 | git-fast-import --date-format=rfc2822 --import-marks=../git-import-marks2 --export-marks=../git-import-marks2



# Push all changes to the server, update the master tag as well
for branch in `mtn --db ../../OE.mtn ls branches`;
do
    git-push --force git+ssh://zecke2@repo.or.cz/srv/git/org.openembedded.dev.git $branch;
done

#dev is our master
git-push --force git+ssh://ABC@repo.or.cz/srv/git/org.openembedded.dev.git org.openembedded.dev:master;