Show More
@@ -1,81 +1,81 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 |
|
|
3 | . "$TESTDIR/bzr-definitions" | |
4 |
|
4 | |||
5 | echo % create and rename on the same file in the same step |
|
5 | echo % create and rename on the same file in the same step | |
6 | mkdir test-createandrename |
|
6 | mkdir test-createandrename | |
7 | cd test-createandrename |
|
7 | cd test-createandrename | |
8 | bzr init -q source |
|
8 | bzr init -q source | |
9 | cd source |
|
9 | cd source | |
10 | echo a > a |
|
10 | echo a > a | |
11 | bzr add -q a |
|
11 | bzr add -q a | |
12 | bzr commit -q -m 'Initial add: a' |
|
12 | bzr commit -q -m 'Initial add: a' | |
13 | bzr mv a b |
|
13 | bzr mv a b | |
14 | echo a2 >> a |
|
14 | echo a2 >> a | |
15 | bzr add -q a |
|
15 | bzr add -q a | |
16 | bzr commit -q -m 'rename a into b, create a' |
|
16 | bzr commit -q -m 'rename a into b, create a' | |
17 | cd .. |
|
17 | cd .. | |
18 | hg convert source source-hg |
|
18 | hg convert source source-hg | |
19 | glog -R source-hg |
|
19 | glog -R source-hg | |
20 | echo "% test --rev option" |
|
20 | echo "% test --rev option" | |
21 | hg convert -r 1 source source-1-hg |
|
21 | hg convert -r 1 source source-1-hg | |
22 | glog -R source-1-hg |
|
22 | glog -R source-1-hg | |
23 | cd .. |
|
23 | cd .. | |
24 |
|
24 | |||
25 | echo % merge |
|
25 | echo % merge | |
26 | mkdir test-merge |
|
26 | mkdir test-merge | |
27 | cd test-merge |
|
27 | cd test-merge | |
28 |
|
28 | |||
29 | cat > helper.py <<EOF |
|
29 | cat > helper.py <<EOF | |
30 | import sys |
|
30 | import sys | |
31 | from bzrlib import workingtree |
|
31 | from bzrlib import workingtree | |
32 | wt = workingtree.WorkingTree.open('.') |
|
32 | wt = workingtree.WorkingTree.open('.') | |
33 |
|
33 | |||
34 | message, stamp = sys.argv[1:] |
|
34 | message, stamp = sys.argv[1:] | |
35 | wt.commit(message, timestamp=int(stamp)) |
|
35 | wt.commit(message, timestamp=int(stamp)) | |
36 | EOF |
|
36 | EOF | |
37 |
|
37 | |||
38 | bzr init -q source |
|
38 | bzr init -q source | |
39 | cd source |
|
39 | cd source | |
40 | echo content > a |
|
40 | echo content > a | |
41 | echo content2 > b |
|
41 | echo content2 > b | |
42 | bzr add -q a b |
|
42 | bzr add -q a b | |
43 | bzr commit -q -m 'Initial add' |
|
43 | bzr commit -q -m 'Initial add' | |
44 | cd .. |
|
44 | cd .. | |
45 | bzr branch -q source source-improve |
|
45 | bzr branch -q source source-improve | |
46 | cd source |
|
46 | cd source | |
47 | echo more >> a |
|
47 | echo more >> a | |
48 | python ../helper.py 'Editing a' 100 |
|
48 | python ../helper.py 'Editing a' 100 | |
49 | cd ../source-improve |
|
49 | cd ../source-improve | |
50 | echo content3 >> b |
|
50 | echo content3 >> b | |
51 | python ../helper.py 'Editing b' 200 |
|
51 | python ../helper.py 'Editing b' 200 | |
52 | cd ../source |
|
52 | cd ../source | |
53 | bzr merge -q ../source-improve |
|
53 | bzr merge -q ../source-improve | |
54 | bzr commit -q -m 'Merged improve branch' |
|
54 | bzr commit -q -m 'Merged improve branch' | |
55 | cd .. |
|
55 | cd .. | |
56 | hg convert --datesort source source-hg |
|
56 | hg convert --datesort source source-hg | |
57 | glog -R source-hg |
|
57 | glog -R source-hg | |
58 | cd .. |
|
58 | cd .. | |
59 |
|
59 | |||
60 | echo % symlinks and executable files |
|
60 | echo % symlinks and executable files | |
61 | mkdir test-symlinks |
|
61 | mkdir test-symlinks | |
62 | cd test-symlinks |
|
62 | cd test-symlinks | |
63 | bzr init -q source |
|
63 | bzr init -q source | |
64 | cd source |
|
64 | cd source | |
65 | touch program |
|
65 | touch program | |
66 | chmod +x program |
|
66 | chmod +x program | |
67 | ln -s program altname |
|
67 | ln -s program altname | |
68 | bzr add -q altname program |
|
68 | bzr add -q altname program | |
69 | bzr commit -q -m 'Initial setup' |
|
69 | bzr commit -q -m 'Initial setup' | |
70 | touch newprog |
|
70 | touch newprog | |
71 | chmod +x newprog |
|
71 | chmod +x newprog | |
72 | rm altname |
|
72 | rm altname | |
73 | ln -s newprog altname |
|
73 | ln -s newprog altname | |
74 | chmod -x program |
|
74 | chmod -x program | |
75 | bzr add -q newprog |
|
75 | bzr add -q newprog | |
76 | bzr commit -q -m 'Symlink changed, x bits changed' |
|
76 | bzr commit -q -m 'Symlink changed, x bits changed' | |
77 | cd .. |
|
77 | cd .. | |
78 | hg convert source source-hg |
|
78 | hg convert source source-hg | |
79 | manifest source-hg 0 |
|
79 | manifest source-hg 0 | |
80 | manifest source-hg tip |
|
80 | manifest source-hg tip | |
81 | cd .. |
|
81 | cd .. |
@@ -1,93 +1,93 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 |
|
|
3 | . "$TESTDIR/bzr-definitions" | |
4 |
|
4 | |||
5 | echo % empty directory |
|
5 | echo % empty directory | |
6 | mkdir test-empty |
|
6 | mkdir test-empty | |
7 | cd test-empty |
|
7 | cd test-empty | |
8 | bzr init -q source |
|
8 | bzr init -q source | |
9 | cd source |
|
9 | cd source | |
10 | echo content > a |
|
10 | echo content > a | |
11 | bzr add -q a |
|
11 | bzr add -q a | |
12 | bzr commit -q -m 'Initial add' |
|
12 | bzr commit -q -m 'Initial add' | |
13 | mkdir empty |
|
13 | mkdir empty | |
14 | bzr add -q empty |
|
14 | bzr add -q empty | |
15 | bzr commit -q -m 'Empty directory added' |
|
15 | bzr commit -q -m 'Empty directory added' | |
16 | echo content > empty/something |
|
16 | echo content > empty/something | |
17 | bzr add -q empty/something |
|
17 | bzr add -q empty/something | |
18 | bzr commit -q -m 'Added file into directory' |
|
18 | bzr commit -q -m 'Added file into directory' | |
19 | cd .. |
|
19 | cd .. | |
20 | hg convert source source-hg |
|
20 | hg convert source source-hg | |
21 | manifest source-hg 1 |
|
21 | manifest source-hg 1 | |
22 | manifest source-hg tip |
|
22 | manifest source-hg tip | |
23 | cd .. |
|
23 | cd .. | |
24 |
|
24 | |||
25 | echo % directory renames |
|
25 | echo % directory renames | |
26 | mkdir test-dir-rename |
|
26 | mkdir test-dir-rename | |
27 | cd test-dir-rename |
|
27 | cd test-dir-rename | |
28 | bzr init -q source |
|
28 | bzr init -q source | |
29 | cd source |
|
29 | cd source | |
30 | mkdir tpyo |
|
30 | mkdir tpyo | |
31 | echo content > tpyo/something |
|
31 | echo content > tpyo/something | |
32 | bzr add -q tpyo |
|
32 | bzr add -q tpyo | |
33 | bzr commit -q -m 'Added directory' |
|
33 | bzr commit -q -m 'Added directory' | |
34 | bzr mv tpyo typo |
|
34 | bzr mv tpyo typo | |
35 | bzr commit -q -m 'Oops, typo' |
|
35 | bzr commit -q -m 'Oops, typo' | |
36 | cd .. |
|
36 | cd .. | |
37 | hg convert source source-hg |
|
37 | hg convert source source-hg | |
38 | manifest source-hg 0 |
|
38 | manifest source-hg 0 | |
39 | manifest source-hg tip |
|
39 | manifest source-hg tip | |
40 | cd .. |
|
40 | cd .. | |
41 |
|
41 | |||
42 | echo % nested directory renames |
|
42 | echo % nested directory renames | |
43 | mkdir test-nested-dir-rename |
|
43 | mkdir test-nested-dir-rename | |
44 | cd test-nested-dir-rename |
|
44 | cd test-nested-dir-rename | |
45 | bzr init -q source |
|
45 | bzr init -q source | |
46 | cd source |
|
46 | cd source | |
47 | mkdir -p firstlevel/secondlevel/thirdlevel |
|
47 | mkdir -p firstlevel/secondlevel/thirdlevel | |
48 | echo content > firstlevel/secondlevel/file |
|
48 | echo content > firstlevel/secondlevel/file | |
49 | echo this_needs_to_be_there_too > firstlevel/secondlevel/thirdlevel/stuff |
|
49 | echo this_needs_to_be_there_too > firstlevel/secondlevel/thirdlevel/stuff | |
50 | bzr add -q firstlevel |
|
50 | bzr add -q firstlevel | |
51 | bzr commit -q -m 'Added nested directories' |
|
51 | bzr commit -q -m 'Added nested directories' | |
52 | bzr mv firstlevel/secondlevel secondlevel |
|
52 | bzr mv firstlevel/secondlevel secondlevel | |
53 | bzr commit -q -m 'Moved secondlevel one level up' |
|
53 | bzr commit -q -m 'Moved secondlevel one level up' | |
54 | cd .. |
|
54 | cd .. | |
55 | hg convert source source-hg |
|
55 | hg convert source source-hg | |
56 | manifest source-hg tip |
|
56 | manifest source-hg tip | |
57 | cd .. |
|
57 | cd .. | |
58 |
|
58 | |||
59 | echo % directory remove |
|
59 | echo % directory remove | |
60 | mkdir test-dir-remove |
|
60 | mkdir test-dir-remove | |
61 | cd test-dir-remove |
|
61 | cd test-dir-remove | |
62 | bzr init -q source |
|
62 | bzr init -q source | |
63 | cd source |
|
63 | cd source | |
64 | mkdir src |
|
64 | mkdir src | |
65 | echo content > src/sourcecode |
|
65 | echo content > src/sourcecode | |
66 | bzr add -q src |
|
66 | bzr add -q src | |
67 | bzr commit -q -m 'Added directory' |
|
67 | bzr commit -q -m 'Added directory' | |
68 | bzr rm -q src |
|
68 | bzr rm -q src | |
69 | bzr commit -q -m 'Removed directory' |
|
69 | bzr commit -q -m 'Removed directory' | |
70 | cd .. |
|
70 | cd .. | |
71 | hg convert source source-hg |
|
71 | hg convert source source-hg | |
72 | manifest source-hg 0 |
|
72 | manifest source-hg 0 | |
73 | manifest source-hg tip |
|
73 | manifest source-hg tip | |
74 | cd .. |
|
74 | cd .. | |
75 |
|
75 | |||
76 | echo % directory replace |
|
76 | echo % directory replace | |
77 | mkdir test-dir-replace |
|
77 | mkdir test-dir-replace | |
78 | cd test-dir-replace |
|
78 | cd test-dir-replace | |
79 | bzr init -q source |
|
79 | bzr init -q source | |
80 | cd source |
|
80 | cd source | |
81 | mkdir first second |
|
81 | mkdir first second | |
82 | echo content > first/file |
|
82 | echo content > first/file | |
83 | echo morecontent > first/dummy |
|
83 | echo morecontent > first/dummy | |
84 | echo othercontent > second/something |
|
84 | echo othercontent > second/something | |
85 | bzr add -q first second |
|
85 | bzr add -q first second | |
86 | bzr commit -q -m 'Initial layout' |
|
86 | bzr commit -q -m 'Initial layout' | |
87 | bzr mv first/file second/file |
|
87 | bzr mv first/file second/file | |
88 | bzr mv first third |
|
88 | bzr mv first third | |
89 | bzr commit -q -m 'Some conflicting moves' |
|
89 | bzr commit -q -m 'Some conflicting moves' | |
90 | cd .. |
|
90 | cd .. | |
91 | hg convert source source-hg |
|
91 | hg convert source source-hg | |
92 | manifest source-hg tip |
|
92 | manifest source-hg tip | |
93 | cd .. |
|
93 | cd .. |
@@ -1,27 +1,27 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 |
|
|
3 | . "$TESTDIR/bzr-definitions" | |
4 |
|
4 | |||
5 | cat > ghostcreator.py <<EOF |
|
5 | cat > ghostcreator.py <<EOF | |
6 | import sys |
|
6 | import sys | |
7 | from bzrlib import workingtree |
|
7 | from bzrlib import workingtree | |
8 | wt = workingtree.WorkingTree.open('.') |
|
8 | wt = workingtree.WorkingTree.open('.') | |
9 |
|
9 | |||
10 | message, ghostrev = sys.argv[1:] |
|
10 | message, ghostrev = sys.argv[1:] | |
11 | wt.set_parent_ids(wt.get_parent_ids() + [ghostrev]) |
|
11 | wt.set_parent_ids(wt.get_parent_ids() + [ghostrev]) | |
12 | wt.commit(message) |
|
12 | wt.commit(message) | |
13 | EOF |
|
13 | EOF | |
14 |
|
14 | |||
15 | echo % ghost revisions |
|
15 | echo % ghost revisions | |
16 | mkdir test-ghost-revisions |
|
16 | mkdir test-ghost-revisions | |
17 | cd test-ghost-revisions |
|
17 | cd test-ghost-revisions | |
18 | bzr init -q source |
|
18 | bzr init -q source | |
19 | cd source |
|
19 | cd source | |
20 | echo content > somefile |
|
20 | echo content > somefile | |
21 | bzr add -q somefile |
|
21 | bzr add -q somefile | |
22 | bzr commit -q -m 'Initial layout setup' |
|
22 | bzr commit -q -m 'Initial layout setup' | |
23 | echo morecontent >> somefile |
|
23 | echo morecontent >> somefile | |
24 | python ../../ghostcreator.py 'Commit with ghost revision' ghostrev |
|
24 | python ../../ghostcreator.py 'Commit with ghost revision' ghostrev | |
25 | cd .. |
|
25 | cd .. | |
26 | hg convert source source-hg |
|
26 | hg convert source source-hg | |
27 | glog -R source-hg |
|
27 | glog -R source-hg |
@@ -1,37 +1,37 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 |
|
|
3 | . "$TESTDIR/bzr-definitions" | |
4 |
|
4 | |||
5 | echo % test multiple merges at once |
|
5 | echo % test multiple merges at once | |
6 | mkdir test-multimerge |
|
6 | mkdir test-multimerge | |
7 | cd test-multimerge |
|
7 | cd test-multimerge | |
8 | bzr init -q source |
|
8 | bzr init -q source | |
9 | cd source |
|
9 | cd source | |
10 | echo content > file |
|
10 | echo content > file | |
11 | bzr add -q file |
|
11 | bzr add -q file | |
12 | bzr commit -q -m 'Initial add' |
|
12 | bzr commit -q -m 'Initial add' | |
13 | cd .. |
|
13 | cd .. | |
14 | bzr branch -q source source-branch1 |
|
14 | bzr branch -q source source-branch1 | |
15 | cd source-branch1 |
|
15 | cd source-branch1 | |
16 | echo morecontent >> file |
|
16 | echo morecontent >> file | |
17 | echo evenmorecontent > file-branch1 |
|
17 | echo evenmorecontent > file-branch1 | |
18 | bzr add -q file-branch1 |
|
18 | bzr add -q file-branch1 | |
19 | bzr commit -q -m 'Added branch1 file' |
|
19 | bzr commit -q -m 'Added branch1 file' | |
20 | cd ../source |
|
20 | cd ../source | |
21 | echo content > file-parent |
|
21 | echo content > file-parent | |
22 | bzr add -q file-parent |
|
22 | bzr add -q file-parent | |
23 | bzr commit -q -m 'Added parent file' |
|
23 | bzr commit -q -m 'Added parent file' | |
24 | cd .. |
|
24 | cd .. | |
25 | bzr branch -q source source-branch2 |
|
25 | bzr branch -q source source-branch2 | |
26 | cd source-branch2 |
|
26 | cd source-branch2 | |
27 | echo somecontent > file-branch2 |
|
27 | echo somecontent > file-branch2 | |
28 | bzr add -q file-branch2 |
|
28 | bzr add -q file-branch2 | |
29 | bzr commit -q -m 'Added brach2 file' |
|
29 | bzr commit -q -m 'Added brach2 file' | |
30 | cd ../source |
|
30 | cd ../source | |
31 | bzr merge -q ../source-branch1 |
|
31 | bzr merge -q ../source-branch1 | |
32 | bzr merge -q --force ../source-branch2 |
|
32 | bzr merge -q --force ../source-branch2 | |
33 | bzr commit -q -m 'Merged branches' |
|
33 | bzr commit -q -m 'Merged branches' | |
34 | cd .. |
|
34 | cd .. | |
35 | hg convert --datesort source source-hg |
|
35 | hg convert --datesort source source-hg | |
36 | glog -R source-hg |
|
36 | glog -R source-hg | |
37 | manifest source-hg tip |
|
37 | manifest source-hg tip |
@@ -1,26 +1,26 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 |
|
|
3 | . "$TESTDIR/bzr-definitions" | |
4 |
|
4 | |||
5 | cat > treeset.py <<EOF |
|
5 | cat > treeset.py <<EOF | |
6 | import sys |
|
6 | import sys | |
7 | from bzrlib import workingtree |
|
7 | from bzrlib import workingtree | |
8 | wt = workingtree.WorkingTree.open('.') |
|
8 | wt = workingtree.WorkingTree.open('.') | |
9 |
|
9 | |||
10 | message, rootid = sys.argv[1:] |
|
10 | message, rootid = sys.argv[1:] | |
11 | wt.set_root_id('tree_root-%s' % rootid) |
|
11 | wt.set_root_id('tree_root-%s' % rootid) | |
12 | wt.commit(message) |
|
12 | wt.commit(message) | |
13 | EOF |
|
13 | EOF | |
14 |
|
14 | |||
15 | echo % change the id of the tree root |
|
15 | echo % change the id of the tree root | |
16 | mkdir test-change-treeroot-id |
|
16 | mkdir test-change-treeroot-id | |
17 | cd test-change-treeroot-id |
|
17 | cd test-change-treeroot-id | |
18 | bzr init -q source |
|
18 | bzr init -q source | |
19 | cd source |
|
19 | cd source | |
20 | echo content > file |
|
20 | echo content > file | |
21 | bzr add -q file |
|
21 | bzr add -q file | |
22 | bzr commit -q -m 'Initial add' |
|
22 | bzr commit -q -m 'Initial add' | |
23 | python ../../treeset.py 'Changed root' new |
|
23 | python ../../treeset.py 'Changed root' new | |
24 | cd .. |
|
24 | cd .. | |
25 | hg convert source source-hg |
|
25 | hg convert source source-hg | |
26 | manifest source-hg tip |
|
26 | manifest source-hg tip |
General Comments 0
You need to be logged in to leave comments.
Login now