summaryrefslogtreecommitdiff
path: root/t/t9151/make-svnmerge-dump
blob: 7e3da75f8602621f0f202fc812fad2feefccda28 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/sh
#
# this script sets up a Subversion repository for Makefile in the
# first ever git merge, as if it were done with svnmerge (SVN 1.5+)
#

rm -rf foo.svn foo
set -e

mkdir foo.svn
svnadmin create foo.svn
svn co file://`pwd`/foo.svn foo

cd foo
mkdir trunk
mkdir branches
svn add trunk branches
svn commit -m "Setup trunk and branches"
cd trunk

git cat-file blob 6683463e:Makefile > Makefile
svn add Makefile 

echo "Committing ANCESTOR"
svn commit -m "ancestor"
cd ..
svn cp trunk branches/left

echo "Committing BRANCH POINT"
svn commit -m "make left branch"
svn cp trunk branches/right

echo "Committing other BRANCH POINT"
svn commit -m "make right branch"
cd branches/left/

#$sm init
#svn commit -m "init svnmerge"

git cat-file blob 5873b67e:Makefile > Makefile
echo "Committing BRANCH UPDATE 1"
svn commit -m "left update 1"
cd ../..

cd trunk
git cat-file blob 75118b13:Makefile > Makefile
echo "Committing TRUNK UPDATE"
svn commit -m "trunk update"

cd ../branches/left
git cat-file blob ff5ebe39:Makefile > Makefile
echo "Committing BRANCH UPDATE 2"
svn commit -m "left update 2"

git cat-file blob b5039db6:Makefile > Makefile
echo "Committing BRANCH UPDATE 3"
svn commit -m "left update 3"

# merge to trunk

cd ../..
svn update
cd trunk

svn merge ../branches/left --accept postpone

git cat-file blob b51ad431:Makefile > Makefile

svn resolved Makefile

svn commit -m "Merge trunk 1"

# create commits on both branches

cd ../branches/left
git cat-file blob ff5ebe39:Makefile > Makefile
echo "Committing BRANCH UPDATE 4"
svn commit -m "left update 4"

cd ../right
git cat-file blob b5039db6:Makefile > Makefile
echo "Committing other BRANCH UPDATE 1"
svn commit -m "right update 1"

# merge to trun again

cd ../..
svn update
cd trunk

svn merge ../branches/left --accept postpone

git cat-file blob b51ad431:Makefile > Makefile

svn resolved Makefile

svn commit -m "Merge trunk 2"

cd ../..

svnadmin dump foo.svn > svn-mergeinfo.dump

rm -rf foo foo.svn