##// END OF EJS Templates
test-convert: demonstrate an unstable hash issue for bzr -> hg -> hg...
Matt Harbison -
r38592:050fbd9d default
parent child Browse files
Show More
@@ -1,72 +1,144
1 1 #require bzr
2 2
3 3 N.B. bzr 1.13 has a bug that breaks this test. If you see this
4 4 test fail, check your bzr version. Upgrading to bzr 1.13.1
5 5 should fix it.
6 6
7 7 $ . "$TESTDIR/bzr-definitions"
8 8
9 9 test multiple merges at once
10 10
11 11 $ mkdir test-multimerge
12 12 $ cd test-multimerge
13 13 $ bzr init -q source
14 14 $ cd source
15 15 $ echo content > file
16 16 $ bzr add -q file
17 17 $ bzr commit -q -m 'Initial add' '--commit-time=2009-10-10 08:00:00 +0100'
18 18 $ cd ..
19 19 $ bzr branch -q source source-branch1
20 20 $ cd source-branch1
21 21 $ echo morecontent >> file
22 22 $ echo evenmorecontent > file-branch1
23 23 $ bzr add -q file-branch1
24 24 $ bzr commit -q -m 'Added branch1 file' '--commit-time=2009-10-10 08:00:01 +0100'
25 25 $ cd ../source
26 26 $ sleep 1
27 27 $ echo content > file-parent
28 28 $ bzr add -q file-parent
29 29 $ bzr commit -q -m 'Added parent file' '--commit-time=2009-10-10 08:00:02 +0100'
30 30 $ cd ..
31 31 $ bzr branch -q source source-branch2
32 32 $ cd source-branch2
33 33 $ echo somecontent > file-branch2
34 34 $ bzr add -q file-branch2
35 35 $ bzr commit -q -m 'Added brach2 file' '--commit-time=2009-10-10 08:00:03 +0100'
36 36 $ sleep 1
37 37 $ cd ../source
38 38 $ bzr merge -q ../source-branch1
39 39 $ bzr merge -q --force ../source-branch2
40 40 $ bzr commit -q -m 'Merged branches' '--commit-time=2009-10-10 08:00:04 +0100'
41 41 $ cd ..
42 42 $ hg convert --datesort --config convert.bzr.saverev=False source source-hg
43 43 initializing destination source-hg repository
44 44 scanning source...
45 45 sorting...
46 46 converting...
47 47 4 Initial add
48 48 3 Added branch1 file
49 49 2 Added parent file
50 50 1 Added brach2 file
51 51 0 Merged branches
52 52 $ glog -R source-hg
53 53 o 5@source "(octopus merge fixup)" files:
54 54 |\
55 55 | o 4@source "Merged branches" files: file-branch2
56 56 | |\
57 57 o---+ 3@source-branch2 "Added brach2 file" files: file-branch2
58 58 / /
59 59 | o 2@source "Added parent file" files: file-parent
60 60 | |
61 61 o | 1@source-branch1 "Added branch1 file" files: file file-branch1
62 62 |/
63 63 o 0@source "Initial add" files: file
64 64
65 65 $ manifest source-hg tip
66 66 % manifest of tip
67 67 644 file
68 68 644 file-branch1
69 69 644 file-branch2
70 70 644 file-parent
71 71
72 $ hg convert source-hg hg2hg
73 initializing destination hg2hg repository
74 scanning source...
75 sorting...
76 converting...
77 5 Initial add
78 4 Added branch1 file
79 3 Added parent file
80 2 Added brach2 file
81 1 Merged branches
82 0 (octopus merge fixup)
83 $ hg -R hg2hg out source-hg -T compact
84 comparing with source-hg
85 searching for changes
86 5[tip]:4,3 6bd55e826939 2009-10-10 08:00 +0100 foo
87 (octopus merge fixup)
88
89 XXX: The manifest lines should probably agree, to avoid changing the hash when
90 converting hg -> hg
91
92 $ hg -R source-hg log --debug -r tip
93 changeset: 5:b209510f11b2c987f920749cd8e352aa4b3230f2
94 branch: source
95 tag: tip
96 phase: draft
97 parent: 4:1dc38c377bb35eeea4fa955056fbe4440d54a743
98 parent: 3:4aaba1bfb426b8941bbf63f9dd52301152695164
99 manifest: 5:1109e42bdcbd1f51baa69bc91079011d77057dbb
100 user: Foo Bar <foo.bar@example.com>
101 date: Sat Oct 10 08:00:04 2009 +0100
102 extra: branch=source
103 description:
104 (octopus merge fixup)
105
106
107 $ hg -R hg2hg log --debug -r tip
108 changeset: 5:6bd55e8269392769783345686faf7ff7b3b0215d
109 branch: source
110 tag: tip
111 phase: draft
112 parent: 4:1dc38c377bb35eeea4fa955056fbe4440d54a743
113 parent: 3:4aaba1bfb426b8941bbf63f9dd52301152695164
114 manifest: 4:daa315d56a98ba20811fdd0d9d575861f65cfa8c
115 user: Foo Bar <foo.bar@example.com>
116 date: Sat Oct 10 08:00:04 2009 +0100
117 extra: branch=source
118 description:
119 (octopus merge fixup)
120
121
122 $ hg -R source-hg manifest --debug -r tip
123 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
124 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
125 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
126 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
127 $ hg -R source-hg manifest --debug -r 'tip^'
128 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
129 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
130 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
131 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
132
133 $ hg -R hg2hg manifest --debug -r tip
134 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
135 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
136 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
137 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
138 $ hg -R hg2hg manifest --debug -r 'tip^'
139 cdf31ed9242b209cd94697112160e2c5b37a667d 644 file
140 5108144f585149b29779d7c7e51d61dd22303ffe 644 file-branch1
141 80753c4a9ac3806858405b96b24a907b309e3616 644 file-branch2
142 7108421418404a937c684d2479a34a24d2ce4757 644 file-parent
143
72 144 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now