##// END OF EJS Templates
tests: show added/modified/removed files when logging repos converted from bzr...
Matt Harbison -
r39256:7a88643b default
parent child Browse files
Show More
@@ -1,16 +1,16 b''
1 # this file holds the definitions that are used in various bzr tests
1 # this file holds the definitions that are used in various bzr tests
2
2
3 TERM=dumb; export TERM
3 TERM=dumb; export TERM
4 echo '[extensions]' >> $HGRCPATH
4 echo '[extensions]' >> $HGRCPATH
5 echo 'convert = ' >> $HGRCPATH
5 echo 'convert = ' >> $HGRCPATH
6
6
7 glog()
7 glog()
8 {
8 {
9 hg log -G --template '{rev}@{branch} "{desc|firstline}" files: {files}\n' "$@"
9 hg log -G --template '{rev}@{branch} "{desc|firstline}" files+: [{file_adds}], files-: [{file_dels}], files: [{file_mods}]\n' "$@"
10 }
10 }
11
11
12 manifest()
12 manifest()
13 {
13 {
14 echo "% manifest of $2"
14 echo "% manifest of $2"
15 hg -R $1 manifest -v -r $2
15 hg -R $1 manifest -v -r $2
16 }
16 }
@@ -1,39 +1,39 b''
1 #require bzr
1 #require bzr
2
2
3 $ . "$TESTDIR/bzr-definitions"
3 $ . "$TESTDIR/bzr-definitions"
4 $ cat > ghostcreator.py <<EOF
4 $ cat > ghostcreator.py <<EOF
5 > import sys
5 > import sys
6 > from bzrlib import workingtree
6 > from bzrlib import workingtree
7 > wt = workingtree.WorkingTree.open('.')
7 > wt = workingtree.WorkingTree.open('.')
8 >
8 >
9 > message, ghostrev = sys.argv[1:]
9 > message, ghostrev = sys.argv[1:]
10 > wt.set_parent_ids(wt.get_parent_ids() + [ghostrev])
10 > wt.set_parent_ids(wt.get_parent_ids() + [ghostrev])
11 > wt.commit(message)
11 > wt.commit(message)
12 > EOF
12 > EOF
13
13
14 ghost revisions
14 ghost revisions
15
15
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 initializing destination source-hg repository
27 initializing destination source-hg repository
28 scanning source...
28 scanning source...
29 sorting...
29 sorting...
30 converting...
30 converting...
31 1 Initial layout setup
31 1 Initial layout setup
32 0 Commit with ghost revision
32 0 Commit with ghost revision
33 $ glog -R source-hg
33 $ glog -R source-hg
34 o 1@source "Commit with ghost revision" files: somefile
34 o 1@source "Commit with ghost revision" files+: [], files-: [], files: [somefile]
35 |
35 |
36 o 0@source "Initial layout setup" files: somefile
36 o 0@source "Initial layout setup" files+: [somefile], files-: [], files: []
37
37
38
38
39 $ cd ..
39 $ cd ..
@@ -1,141 +1,143 b''
1 #require bzr
1 #require bzr
2
2
3 N.B. bzr 1.13 has a bug that breaks this test. If you see this
3 N.B. bzr 1.13 has a bug that breaks this test. If you see this
4 test fail, check your bzr version. Upgrading to bzr 1.13.1
4 test fail, check your bzr version. Upgrading to bzr 1.13.1
5 should fix it.
5 should fix it.
6
6
7 $ . "$TESTDIR/bzr-definitions"
7 $ . "$TESTDIR/bzr-definitions"
8
8
9 test multiple merges at once
9 test multiple merges at once
10
10
11 $ mkdir test-multimerge
11 $ mkdir test-multimerge
12 $ cd test-multimerge
12 $ cd test-multimerge
13 $ bzr init -q source
13 $ bzr init -q source
14 $ cd source
14 $ cd source
15 $ echo content > file
15 $ echo content > file
16 $ bzr add -q file
16 $ bzr add -q file
17 $ bzr commit -q -m 'Initial add' '--commit-time=2009-10-10 08:00:00 +0100'
17 $ bzr commit -q -m 'Initial add' '--commit-time=2009-10-10 08:00:00 +0100'
18 $ cd ..
18 $ cd ..
19 $ bzr branch -q source source-branch1
19 $ bzr branch -q source source-branch1
20 $ cd source-branch1
20 $ cd source-branch1
21 $ echo morecontent >> file
21 $ echo morecontent >> file
22 $ echo evenmorecontent > file-branch1
22 $ echo evenmorecontent > file-branch1
23 $ bzr add -q file-branch1
23 $ bzr add -q file-branch1
24 $ bzr commit -q -m 'Added branch1 file' '--commit-time=2009-10-10 08:00:01 +0100'
24 $ bzr commit -q -m 'Added branch1 file' '--commit-time=2009-10-10 08:00:01 +0100'
25 $ cd ../source
25 $ cd ../source
26 $ sleep 1
26 $ sleep 1
27 $ echo content > file-parent
27 $ echo content > file-parent
28 $ bzr add -q file-parent
28 $ bzr add -q file-parent
29 $ bzr commit -q -m 'Added parent file' '--commit-time=2009-10-10 08:00:02 +0100'
29 $ bzr commit -q -m 'Added parent file' '--commit-time=2009-10-10 08:00:02 +0100'
30 $ cd ..
30 $ cd ..
31 $ bzr branch -q source source-branch2
31 $ bzr branch -q source source-branch2
32 $ cd source-branch2
32 $ cd source-branch2
33 $ echo somecontent > file-branch2
33 $ echo somecontent > file-branch2
34 $ bzr add -q file-branch2
34 $ bzr add -q file-branch2
35 $ bzr commit -q -m 'Added brach2 file' '--commit-time=2009-10-10 08:00:03 +0100'
35 $ bzr commit -q -m 'Added brach2 file' '--commit-time=2009-10-10 08:00:03 +0100'
36 $ sleep 1
36 $ sleep 1
37 $ cd ../source
37 $ cd ../source
38 $ bzr merge -q ../source-branch1
38 $ bzr merge -q ../source-branch1
39 $ bzr merge -q --force ../source-branch2
39 $ bzr merge -q --force ../source-branch2
40 $ bzr commit -q -m 'Merged branches' '--commit-time=2009-10-10 08:00:04 +0100'
40 $ bzr commit -q -m 'Merged branches' '--commit-time=2009-10-10 08:00:04 +0100'
41 $ cd ..
41 $ cd ..
42
43 BUG: file-branch2 should not be added in rev 4
42 $ hg convert --datesort --config convert.bzr.saverev=False source source-hg
44 $ hg convert --datesort --config convert.bzr.saverev=False source source-hg
43 initializing destination source-hg repository
45 initializing destination source-hg repository
44 scanning source...
46 scanning source...
45 sorting...
47 sorting...
46 converting...
48 converting...
47 4 Initial add
49 4 Initial add
48 3 Added branch1 file
50 3 Added branch1 file
49 2 Added parent file
51 2 Added parent file
50 1 Added brach2 file
52 1 Added brach2 file
51 0 Merged branches
53 0 Merged branches
52 $ glog -R source-hg
54 $ glog -R source-hg
53 o 5@source "(octopus merge fixup)" files:
55 o 5@source "(octopus merge fixup)" files+: [], files-: [], files: []
54 |\
56 |\
55 | o 4@source "Merged branches" files: file-branch2
57 | o 4@source "Merged branches" files+: [file-branch1 file-branch2], files-: [], files: [file]
56 | |\
58 | |\
57 o---+ 3@source-branch2 "Added brach2 file" files: file-branch2
59 o---+ 3@source-branch2 "Added brach2 file" files+: [file-branch2], files-: [], files: []
58 / /
60 / /
59 | o 2@source "Added parent file" files: file-parent
61 | o 2@source "Added parent file" files+: [file-parent], files-: [], files: []
60 | |
62 | |
61 o | 1@source-branch1 "Added branch1 file" files: file file-branch1
63 o | 1@source-branch1 "Added branch1 file" files+: [file-branch1], files-: [], files: [file]
62 |/
64 |/
63 o 0@source "Initial add" files: file
65 o 0@source "Initial add" files+: [file], files-: [], files: []
64
66
65 $ manifest source-hg tip
67 $ manifest source-hg tip
66 % manifest of tip
68 % manifest of tip
67 644 file
69 644 file
68 644 file-branch1
70 644 file-branch1
69 644 file-branch2
71 644 file-branch2
70 644 file-parent
72 644 file-parent
71
73
72 $ hg convert source-hg hg2hg
74 $ hg convert source-hg hg2hg
73 initializing destination hg2hg repository
75 initializing destination hg2hg repository
74 scanning source...
76 scanning source...
75 sorting...
77 sorting...
76 converting...
78 converting...
77 5 Initial add
79 5 Initial add
78 4 Added branch1 file
80 4 Added branch1 file
79 3 Added parent file
81 3 Added parent file
80 2 Added brach2 file
82 2 Added brach2 file
81 1 Merged branches
83 1 Merged branches
82 0 (octopus merge fixup)
84 0 (octopus merge fixup)
83 $ hg -R hg2hg out source-hg -T compact
85 $ hg -R hg2hg out source-hg -T compact
84 comparing with source-hg
86 comparing with source-hg
85 searching for changes
87 searching for changes
86 no changes found
88 no changes found
87 [1]
89 [1]
88
90
89 $ hg -R source-hg log --debug -r tip
91 $ hg -R source-hg log --debug -r tip
90 changeset: 5:6bd55e8269392769783345686faf7ff7b3b0215d
92 changeset: 5:6bd55e8269392769783345686faf7ff7b3b0215d
91 branch: source
93 branch: source
92 tag: tip
94 tag: tip
93 phase: draft
95 phase: draft
94 parent: 4:1dc38c377bb35eeea4fa955056fbe4440d54a743
96 parent: 4:1dc38c377bb35eeea4fa955056fbe4440d54a743
95 parent: 3:4aaba1bfb426b8941bbf63f9dd52301152695164
97 parent: 3:4aaba1bfb426b8941bbf63f9dd52301152695164
96 manifest: 4:daa315d56a98ba20811fdd0d9d575861f65cfa8c
98 manifest: 4:daa315d56a98ba20811fdd0d9d575861f65cfa8c
97 user: Foo Bar <foo.bar@example.com>
99 user: Foo Bar <foo.bar@example.com>
98 date: Sat Oct 10 08:00:04 2009 +0100
100 date: Sat Oct 10 08:00:04 2009 +0100
99 extra: branch=source
101 extra: branch=source
100 description:
102 description:
101 (octopus merge fixup)
103 (octopus merge fixup)
102
104
103
105
104 $ hg -R hg2hg log --debug -r tip
106 $ hg -R hg2hg log --debug -r tip
105 changeset: 5:6bd55e8269392769783345686faf7ff7b3b0215d
107 changeset: 5:6bd55e8269392769783345686faf7ff7b3b0215d
106 branch: source
108 branch: source
107 tag: tip
109 tag: tip
108 phase: draft
110 phase: draft
109 parent: 4:1dc38c377bb35eeea4fa955056fbe4440d54a743
111 parent: 4:1dc38c377bb35eeea4fa955056fbe4440d54a743
110 parent: 3:4aaba1bfb426b8941bbf63f9dd52301152695164
112 parent: 3:4aaba1bfb426b8941bbf63f9dd52301152695164
111 manifest: 4:daa315d56a98ba20811fdd0d9d575861f65cfa8c
113 manifest: 4:daa315d56a98ba20811fdd0d9d575861f65cfa8c
112 user: Foo Bar <foo.bar@example.com>
114 user: Foo Bar <foo.bar@example.com>
113 date: Sat Oct 10 08:00:04 2009 +0100
115 date: Sat Oct 10 08:00:04 2009 +0100
114 extra: branch=source
116 extra: branch=source
115 description:
117 description:
116 (octopus merge fixup)
118 (octopus merge fixup)
117
119
118
120
119 $ hg -R source-hg manifest --debug -r tip
121 $ hg -R source-hg manifest --debug -r tip
120 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
122 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
121 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
123 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
122 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
124 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
123 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
125 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
124 $ hg -R source-hg manifest --debug -r 'tip^'
126 $ hg -R source-hg manifest --debug -r 'tip^'
125 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
127 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
126 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
128 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
127 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
129 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
128 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
130 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
129
131
130 $ hg -R hg2hg manifest --debug -r tip
132 $ hg -R hg2hg manifest --debug -r tip
131 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
133 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
132 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
134 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
133 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
135 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
134 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
136 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
135 $ hg -R hg2hg manifest --debug -r 'tip^'
137 $ hg -R hg2hg manifest --debug -r 'tip^'
136 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
138 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
137 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
139 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
138 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
140 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
139 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
141 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
140
142
141 $ cd ..
143 $ cd ..
@@ -1,288 +1,288 b''
1 #require bzr
1 #require bzr
2
2
3 $ . "$TESTDIR/bzr-definitions"
3 $ . "$TESTDIR/bzr-definitions"
4
4
5 create and rename on the same file in the same step
5 create and rename on the same file in the same step
6
6
7 $ mkdir test-createandrename
7 $ mkdir test-createandrename
8 $ cd test-createandrename
8 $ cd test-createandrename
9 $ bzr init -q source
9 $ bzr init -q source
10
10
11 test empty repo conversion (issue3233)
11 test empty repo conversion (issue3233)
12
12
13 $ hg convert source source-hg
13 $ hg convert source source-hg
14 initializing destination source-hg repository
14 initializing destination source-hg repository
15 scanning source...
15 scanning source...
16 sorting...
16 sorting...
17 converting...
17 converting...
18
18
19 back to the rename stuff
19 back to the rename stuff
20
20
21 $ cd source
21 $ cd source
22 $ echo a > a
22 $ echo a > a
23 $ echo c > c
23 $ echo c > c
24 $ echo e > e
24 $ echo e > e
25 $ bzr add -q a c e
25 $ bzr add -q a c e
26 $ bzr commit -q -m 'Initial add: a, c, e'
26 $ bzr commit -q -m 'Initial add: a, c, e'
27 $ bzr mv a b
27 $ bzr mv a b
28 a => b
28 a => b
29 $ bzr mv c d
29 $ bzr mv c d
30 c => d
30 c => d
31 $ bzr mv e f
31 $ bzr mv e f
32 e => f
32 e => f
33 $ echo a2 >> a
33 $ echo a2 >> a
34 $ mkdir e
34 $ mkdir e
35 $ bzr add -q a e
35 $ bzr add -q a e
36 $ bzr commit -q -m 'rename a into b, create a, rename c into d'
36 $ bzr commit -q -m 'rename a into b, create a, rename c into d'
37 $ cd ..
37 $ cd ..
38 $ hg convert source source-hg
38 $ hg convert source source-hg
39 scanning source...
39 scanning source...
40 sorting...
40 sorting...
41 converting...
41 converting...
42 1 Initial add: a, c, e
42 1 Initial add: a, c, e
43 0 rename a into b, create a, rename c into d
43 0 rename a into b, create a, rename c into d
44 $ glog -R source-hg
44 $ glog -R source-hg
45 o 1@source "rename a into b, create a, rename c into d" files: a b c d e f
45 o 1@source "rename a into b, create a, rename c into d" files+: [b d f], files-: [c e], files: [a]
46 |
46 |
47 o 0@source "Initial add: a, c, e" files: a c e
47 o 0@source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
48
48
49
49
50 manifest
50 manifest
51
51
52 $ hg manifest -R source-hg -r tip
52 $ hg manifest -R source-hg -r tip
53 a
53 a
54 b
54 b
55 d
55 d
56 f
56 f
57
57
58 test --rev option
58 test --rev option
59
59
60 $ hg convert -r 1 source source-1-hg
60 $ hg convert -r 1 source source-1-hg
61 initializing destination source-1-hg repository
61 initializing destination source-1-hg repository
62 scanning source...
62 scanning source...
63 sorting...
63 sorting...
64 converting...
64 converting...
65 0 Initial add: a, c, e
65 0 Initial add: a, c, e
66 $ glog -R source-1-hg
66 $ glog -R source-1-hg
67 o 0@source "Initial add: a, c, e" files: a c e
67 o 0@source "Initial add: a, c, e" files+: [a c e], files-: [], files: []
68
68
69
69
70 test with filemap
70 test with filemap
71
71
72 $ cat > filemap <<EOF
72 $ cat > filemap <<EOF
73 > exclude a
73 > exclude a
74 > EOF
74 > EOF
75 $ hg convert --filemap filemap source source-filemap-hg
75 $ hg convert --filemap filemap source source-filemap-hg
76 initializing destination source-filemap-hg repository
76 initializing destination source-filemap-hg repository
77 scanning source...
77 scanning source...
78 sorting...
78 sorting...
79 converting...
79 converting...
80 1 Initial add: a, c, e
80 1 Initial add: a, c, e
81 0 rename a into b, create a, rename c into d
81 0 rename a into b, create a, rename c into d
82 $ hg -R source-filemap-hg manifest -r tip
82 $ hg -R source-filemap-hg manifest -r tip
83 b
83 b
84 d
84 d
85 f
85 f
86
86
87 convert from lightweight checkout
87 convert from lightweight checkout
88
88
89 $ bzr checkout --lightweight source source-light
89 $ bzr checkout --lightweight source source-light
90 $ hg convert -s bzr source-light source-light-hg
90 $ hg convert -s bzr source-light source-light-hg
91 initializing destination source-light-hg repository
91 initializing destination source-light-hg repository
92 warning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
92 warning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
93 $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository
93 $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository
94 abort: source-light: missing or unsupported repository
94 abort: source-light: missing or unsupported repository
95 [255]
95 [255]
96
96
97 extract timestamps that look just like hg's {date|isodate}:
97 extract timestamps that look just like hg's {date|isodate}:
98 yyyy-mm-dd HH:MM zzzz (no seconds!)
98 yyyy-mm-dd HH:MM zzzz (no seconds!)
99 compare timestamps
99 compare timestamps
100
100
101 $ cd source
101 $ cd source
102 $ bzr log | \
102 $ bzr log | \
103 > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \
103 > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \
104 > > ../bzr-timestamps
104 > > ../bzr-timestamps
105 $ cd ..
105 $ cd ..
106 $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
106 $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
107 $ cmp bzr-timestamps hg-timestamps || diff -u bzr-timestamps hg-timestamps
107 $ cmp bzr-timestamps hg-timestamps || diff -u bzr-timestamps hg-timestamps
108 $ cd ..
108 $ cd ..
109
109
110 merge
110 merge
111
111
112 $ mkdir test-merge
112 $ mkdir test-merge
113 $ cd test-merge
113 $ cd test-merge
114 $ cat > helper.py <<EOF
114 $ cat > helper.py <<EOF
115 > import sys
115 > import sys
116 > from bzrlib import workingtree
116 > from bzrlib import workingtree
117 > wt = workingtree.WorkingTree.open('.')
117 > wt = workingtree.WorkingTree.open('.')
118 >
118 >
119 > message, stamp = sys.argv[1:]
119 > message, stamp = sys.argv[1:]
120 > wt.commit(message, timestamp=int(stamp))
120 > wt.commit(message, timestamp=int(stamp))
121 > EOF
121 > EOF
122 $ bzr init -q source
122 $ bzr init -q source
123 $ cd source
123 $ cd source
124 $ echo content > a
124 $ echo content > a
125 $ echo content2 > b
125 $ echo content2 > b
126 $ bzr add -q a b
126 $ bzr add -q a b
127 $ bzr commit -q -m 'Initial add'
127 $ bzr commit -q -m 'Initial add'
128 $ cd ..
128 $ cd ..
129 $ bzr branch -q source source-improve
129 $ bzr branch -q source source-improve
130 $ cd source
130 $ cd source
131 $ echo more >> a
131 $ echo more >> a
132 $ $PYTHON ../helper.py 'Editing a' 100
132 $ $PYTHON ../helper.py 'Editing a' 100
133 $ cd ../source-improve
133 $ cd ../source-improve
134 $ echo content3 >> b
134 $ echo content3 >> b
135 $ $PYTHON ../helper.py 'Editing b' 200
135 $ $PYTHON ../helper.py 'Editing b' 200
136 $ cd ../source
136 $ cd ../source
137 $ bzr merge -q ../source-improve
137 $ bzr merge -q ../source-improve
138 $ bzr commit -q -m 'Merged improve branch'
138 $ bzr commit -q -m 'Merged improve branch'
139 $ cd ..
139 $ cd ..
140 $ hg convert --datesort source source-hg
140 $ hg convert --datesort source source-hg
141 initializing destination source-hg repository
141 initializing destination source-hg repository
142 scanning source...
142 scanning source...
143 sorting...
143 sorting...
144 converting...
144 converting...
145 3 Initial add
145 3 Initial add
146 2 Editing a
146 2 Editing a
147 1 Editing b
147 1 Editing b
148 0 Merged improve branch
148 0 Merged improve branch
149 $ glog -R source-hg
149 $ glog -R source-hg
150 o 3@source "Merged improve branch" files:
150 o 3@source "Merged improve branch" files+: [], files-: [], files: [b]
151 |\
151 |\
152 | o 2@source-improve "Editing b" files: b
152 | o 2@source-improve "Editing b" files+: [], files-: [], files: [b]
153 | |
153 | |
154 o | 1@source "Editing a" files: a
154 o | 1@source "Editing a" files+: [], files-: [], files: [a]
155 |/
155 |/
156 o 0@source "Initial add" files: a b
156 o 0@source "Initial add" files+: [a b], files-: [], files: []
157
157
158 $ cd ..
158 $ cd ..
159
159
160 #if symlink execbit
160 #if symlink execbit
161
161
162 symlinks and executable files
162 symlinks and executable files
163
163
164 $ mkdir test-symlinks
164 $ mkdir test-symlinks
165 $ cd test-symlinks
165 $ cd test-symlinks
166 $ bzr init -q source
166 $ bzr init -q source
167 $ cd source
167 $ cd source
168 $ touch program
168 $ touch program
169 $ chmod +x program
169 $ chmod +x program
170 $ ln -s program altname
170 $ ln -s program altname
171 $ mkdir d
171 $ mkdir d
172 $ echo a > d/a
172 $ echo a > d/a
173 $ ln -s a syma
173 $ ln -s a syma
174 $ bzr add -q altname program syma d/a
174 $ bzr add -q altname program syma d/a
175 $ bzr commit -q -m 'Initial setup'
175 $ bzr commit -q -m 'Initial setup'
176 $ touch newprog
176 $ touch newprog
177 $ chmod +x newprog
177 $ chmod +x newprog
178 $ rm altname
178 $ rm altname
179 $ ln -s newprog altname
179 $ ln -s newprog altname
180 $ chmod -x program
180 $ chmod -x program
181 $ bzr add -q newprog
181 $ bzr add -q newprog
182 $ bzr commit -q -m 'Symlink changed, x bits changed'
182 $ bzr commit -q -m 'Symlink changed, x bits changed'
183 $ cd ..
183 $ cd ..
184 $ hg convert source source-hg
184 $ hg convert source source-hg
185 initializing destination source-hg repository
185 initializing destination source-hg repository
186 scanning source...
186 scanning source...
187 sorting...
187 sorting...
188 converting...
188 converting...
189 1 Initial setup
189 1 Initial setup
190 0 Symlink changed, x bits changed
190 0 Symlink changed, x bits changed
191 $ manifest source-hg 0
191 $ manifest source-hg 0
192 % manifest of 0
192 % manifest of 0
193 644 @ altname
193 644 @ altname
194 644 d/a
194 644 d/a
195 755 * program
195 755 * program
196 644 @ syma
196 644 @ syma
197 $ manifest source-hg tip
197 $ manifest source-hg tip
198 % manifest of tip
198 % manifest of tip
199 644 @ altname
199 644 @ altname
200 644 d/a
200 644 d/a
201 755 * newprog
201 755 * newprog
202 644 program
202 644 program
203 644 @ syma
203 644 @ syma
204
204
205 test the symlinks can be recreated
205 test the symlinks can be recreated
206
206
207 $ cd source-hg
207 $ cd source-hg
208 $ hg up
208 $ hg up
209 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
209 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 $ hg cat syma; echo
210 $ hg cat syma; echo
211 a
211 a
212 $ cd ../..
212 $ cd ../..
213
213
214 #endif
214 #endif
215
215
216 Multiple branches
216 Multiple branches
217
217
218 $ bzr init-repo -q --no-trees repo
218 $ bzr init-repo -q --no-trees repo
219 $ bzr init -q repo/trunk
219 $ bzr init -q repo/trunk
220 $ bzr co repo/trunk repo-trunk
220 $ bzr co repo/trunk repo-trunk
221 $ cd repo-trunk
221 $ cd repo-trunk
222 $ echo a > a
222 $ echo a > a
223 $ bzr add -q a
223 $ bzr add -q a
224 $ bzr ci -qm adda
224 $ bzr ci -qm adda
225 $ bzr tag trunk-tag
225 $ bzr tag trunk-tag
226 Created tag trunk-tag.
226 Created tag trunk-tag.
227 $ bzr switch -b branch
227 $ bzr switch -b branch
228 Tree is up to date at revision 1.
228 Tree is up to date at revision 1.
229 Switched to branch: *repo/branch/ (glob)
229 Switched to branch: *repo/branch/ (glob)
230 $ sleep 1
230 $ sleep 1
231 $ echo b > b
231 $ echo b > b
232 $ bzr add -q b
232 $ bzr add -q b
233 $ bzr ci -qm addb
233 $ bzr ci -qm addb
234 $ bzr tag branch-tag
234 $ bzr tag branch-tag
235 Created tag branch-tag.
235 Created tag branch-tag.
236 $ bzr switch --force ../repo/trunk
236 $ bzr switch --force ../repo/trunk
237 Updated to revision 1.
237 Updated to revision 1.
238 Switched to branch: */repo/trunk/ (glob)
238 Switched to branch: */repo/trunk/ (glob)
239 $ sleep 1
239 $ sleep 1
240 $ echo a >> a
240 $ echo a >> a
241 $ bzr ci -qm changea
241 $ bzr ci -qm changea
242 $ cd ..
242 $ cd ..
243 $ hg convert --datesort repo repo-bzr
243 $ hg convert --datesort repo repo-bzr
244 initializing destination repo-bzr repository
244 initializing destination repo-bzr repository
245 scanning source...
245 scanning source...
246 sorting...
246 sorting...
247 converting...
247 converting...
248 2 adda
248 2 adda
249 1 addb
249 1 addb
250 0 changea
250 0 changea
251 updating tags
251 updating tags
252 $ (cd repo-bzr; glog)
252 $ (cd repo-bzr; glog)
253 o 3@default "update tags" files: .hgtags
253 o 3@default "update tags" files+: [.hgtags], files-: [], files: []
254 |
254 |
255 o 2@default "changea" files: a
255 o 2@default "changea" files+: [], files-: [], files: [a]
256 |
256 |
257 | o 1@branch "addb" files: b
257 | o 1@branch "addb" files+: [b], files-: [], files: []
258 |/
258 |/
259 o 0@default "adda" files: a
259 o 0@default "adda" files+: [a], files-: [], files: []
260
260
261
261
262 Test tags (converted identifiers are not stable because bzr ones are
262 Test tags (converted identifiers are not stable because bzr ones are
263 not and get incorporated in extra fields).
263 not and get incorporated in extra fields).
264
264
265 $ hg -R repo-bzr tags
265 $ hg -R repo-bzr tags
266 tip 3:* (glob)
266 tip 3:* (glob)
267 branch-tag 1:* (glob)
267 branch-tag 1:* (glob)
268 trunk-tag 0:* (glob)
268 trunk-tag 0:* (glob)
269
269
270 Nested repositories (issue3254)
270 Nested repositories (issue3254)
271
271
272 $ bzr init-repo -q --no-trees repo/inner
272 $ bzr init-repo -q --no-trees repo/inner
273 $ bzr init -q repo/inner/trunk
273 $ bzr init -q repo/inner/trunk
274 $ bzr co repo/inner/trunk inner-trunk
274 $ bzr co repo/inner/trunk inner-trunk
275 $ cd inner-trunk
275 $ cd inner-trunk
276 $ echo b > b
276 $ echo b > b
277 $ bzr add -q b
277 $ bzr add -q b
278 $ bzr ci -qm addb
278 $ bzr ci -qm addb
279 $ cd ..
279 $ cd ..
280 $ hg convert --datesort repo noinner-bzr
280 $ hg convert --datesort repo noinner-bzr
281 initializing destination noinner-bzr repository
281 initializing destination noinner-bzr repository
282 scanning source...
282 scanning source...
283 sorting...
283 sorting...
284 converting...
284 converting...
285 2 adda
285 2 adda
286 1 addb
286 1 addb
287 0 changea
287 0 changea
288 updating tags
288 updating tags
General Comments 0
You need to be logged in to leave comments. Login now