annotate tests/test-convert-bzr.t @ 17769:8672e615d81c

histedit: max(x, key=y) and min(x, key=y) are not available in python 2.4 Use sorted(x, key=y)[-1] or sorted(x, key=y)[0] instead.
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 16 Oct 2012 16:04:28 +0200
parents 885542e7d9b6
children e57e2da803aa
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
1 $ . "$TESTDIR/bzr-definitions"
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
2
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
3 create and rename on the same file in the same step
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
4
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
5 $ mkdir test-createandrename
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
6 $ cd test-createandrename
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
7 $ bzr init -q source
16061
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
8
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
9 test empty repo conversion (issue3233)
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
10
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
11 $ hg convert source source-hg
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
12 initializing destination source-hg repository
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
13 scanning source...
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
14 sorting...
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
15 converting...
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
16
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
17 back to the rename stuff
915e06faa8f3 convert/bzr: handle empty bzr repositories (issue3233)
Patrick Mezard <pmezard@gmail.com>
parents: 16060
diff changeset
18
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
19 $ cd source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
20 $ echo a > a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
21 $ echo c > c
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
22 $ echo e > e
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
23 $ bzr add -q a c e
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
24 $ bzr commit -q -m 'Initial add: a, c, e'
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
25 $ bzr mv a b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
26 a => b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
27 $ bzr mv c d
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
28 c => d
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
29 $ bzr mv e f
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
30 e => f
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
31 $ echo a2 >> a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
32 $ mkdir e
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
33 $ bzr add -q a e
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
34 $ bzr commit -q -m 'rename a into b, create a, rename c into d'
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
35 $ cd ..
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
36 $ hg convert source source-hg
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
37 scanning source...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
38 sorting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
39 converting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
40 1 Initial add: a, c, e
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
41 0 rename a into b, create a, rename c into d
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
42 $ glog -R source-hg
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
43 o 1@source "rename a into b, create a, rename c into d" files: a b c d e f
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
44 |
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
45 o 0@source "Initial add: a, c, e" files: a c e
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
46
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
47
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
48 manifest
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
49
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
50 $ hg manifest -R source-hg -r tip
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
51 a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
52 b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
53 d
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
54 f
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
55
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
56 test --rev option
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
57
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
58 $ hg convert -r 1 source source-1-hg
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
59 initializing destination source-1-hg repository
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
60 scanning source...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
61 sorting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
62 converting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
63 0 Initial add: a, c, e
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
64 $ glog -R source-1-hg
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
65 o 0@source "Initial add: a, c, e" files: a c e
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
66
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
67
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
68 test with filemap
8305
7a0fcdd3828f convert/bzr: handle Bazaar timestamps correctly (issue1652).
Greg Ward <greg-hg@gerg.ca>
parents: 8165
diff changeset
69
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
70 $ cat > filemap <<EOF
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
71 > exclude a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
72 > EOF
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
73 $ hg convert --filemap filemap source source-filemap-hg
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
74 initializing destination source-filemap-hg repository
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
75 scanning source...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
76 sorting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
77 converting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
78 1 Initial add: a, c, e
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
79 0 rename a into b, create a, rename c into d
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
80 $ hg -R source-filemap-hg manifest -r tip
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
81 b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
82 d
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
83 f
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
84
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
85 convert from lightweight checkout
8470
dd24488cba2d convert/bzr: warn when source is a lightweight checkout (issue1647)
Patrick Mezard <pmezard@gmail.com>
parents: 8434
diff changeset
86
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
87 $ bzr checkout --lightweight source source-light
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
88 $ hg convert -s bzr source-light source-light-hg
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
89 initializing destination source-light-hg repository
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
90 warning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
91 $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
92 abort: source-light: missing or unsupported repository
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
93 [255]
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
94
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
95 extract timestamps that look just like hg's {date|isodate}:
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
96 yyyy-mm-dd HH:MM zzzz (no seconds!)
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
97 compare timestamps
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
98
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
99 $ cd source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
100 $ bzr log | \
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
101 > sed '/timestamp/!d;s/.\{15\}\([0-9: -]\{16\}\):.. \(.[0-9]\{4\}\)/\1 \2/' \
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
102 > > ../bzr-timestamps
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
103 $ cd ..
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
104 $ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
105 $ diff -u bzr-timestamps hg-timestamps
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
106 $ cd ..
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
107
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
108 merge
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
109
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
110 $ mkdir test-merge
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
111 $ cd test-merge
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
112 $ cat > helper.py <<EOF
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
113 > import sys
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
114 > from bzrlib import workingtree
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
115 > wt = workingtree.WorkingTree.open('.')
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
116 >
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
117 > message, stamp = sys.argv[1:]
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
118 > wt.commit(message, timestamp=int(stamp))
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
119 > EOF
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
120 $ bzr init -q source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
121 $ cd source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
122 $ echo content > a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
123 $ echo content2 > b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
124 $ bzr add -q a b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
125 $ bzr commit -q -m 'Initial add'
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
126 $ cd ..
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
127 $ bzr branch -q source source-improve
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
128 $ cd source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
129 $ echo more >> a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
130 $ python ../helper.py 'Editing a' 100
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
131 $ cd ../source-improve
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
132 $ echo content3 >> b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
133 $ python ../helper.py 'Editing b' 200
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
134 $ cd ../source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
135 $ bzr merge -q ../source-improve
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
136 $ bzr commit -q -m 'Merged improve branch'
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
137 $ cd ..
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
138 $ hg convert --datesort source source-hg
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
139 initializing destination source-hg repository
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
140 scanning source...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
141 sorting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
142 converting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
143 3 Initial add
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
144 2 Editing a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
145 1 Editing b
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
146 0 Merged improve branch
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
147 $ glog -R source-hg
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
148 o 3@source "Merged improve branch" files:
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
149 |\
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
150 | o 2@source-improve "Editing b" files: b
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
151 | |
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
152 o | 1@source "Editing a" files: a
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
153 |/
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
154 o 0@source "Initial add" files: a b
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
155
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
156 $ cd ..
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
157
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16099
diff changeset
158 #if symlink execbit
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16099
diff changeset
159
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
160 symlinks and executable files
7053
209ef5f3534c convert: add bzr source
Marek Kubica <marek@xivilization.net>
parents:
diff changeset
161
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
162 $ mkdir test-symlinks
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
163 $ cd test-symlinks
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
164 $ bzr init -q source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
165 $ cd source
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
166 $ touch program
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
167 $ chmod +x program
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
168 $ ln -s program altname
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
169 $ mkdir d
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
170 $ echo a > d/a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
171 $ ln -s a syma
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
172 $ bzr add -q altname program syma d/a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
173 $ bzr commit -q -m 'Initial setup'
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
174 $ touch newprog
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
175 $ chmod +x newprog
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
176 $ rm altname
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
177 $ ln -s newprog altname
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
178 $ chmod -x program
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
179 $ bzr add -q newprog
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
180 $ bzr commit -q -m 'Symlink changed, x bits changed'
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
181 $ cd ..
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
182 $ hg convert source source-hg
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
183 initializing destination source-hg repository
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
184 scanning source...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
185 sorting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
186 converting...
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
187 1 Initial setup
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
188 0 Symlink changed, x bits changed
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
189 $ manifest source-hg 0
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
190 % manifest of 0
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
191 644 @ altname
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
192 644 d/a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
193 755 * program
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
194 644 @ syma
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
195 $ manifest source-hg tip
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
196 % manifest of tip
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
197 644 @ altname
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
198 644 d/a
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
199 755 * newprog
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
200 644 program
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
201 644 @ syma
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
202
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
203 test the symlinks can be recreated
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
204
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16099
diff changeset
205 $ cd source-hg
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
206 $ hg up
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
207 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
208 $ hg cat syma; echo
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
209 a
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16099
diff changeset
210 $ cd ../..
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16099
diff changeset
211
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16099
diff changeset
212 #endif
12512
8d84166d34d7 tests: unify test-convert-bzr
Matt Mackall <mpm@selenic.com>
parents: 8470
diff changeset
213
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
214 Multiple branches
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
215
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
216 $ bzr init-repo -q --no-trees repo
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
217 $ bzr init -q repo/trunk
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
218 $ bzr co repo/trunk repo-trunk
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
219 $ cd repo-trunk
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
220 $ echo a > a
17034
75fd9d1cf638 convert/bzr: make tests work with bzr 2.0 again
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16099
diff changeset
221 $ bzr add -q a
75fd9d1cf638 convert/bzr: make tests work with bzr 2.0 again
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16099
diff changeset
222 $ bzr ci -qm adda
16062
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
223 $ bzr tag trunk-tag
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
224 Created tag trunk-tag.
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
225 $ bzr switch -b branch
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
226 Tree is up to date at revision 1.
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
227 Switched to branch: *repo/branch/ (glob)
17097
885542e7d9b6 tests: make test-convert-bzr.t more stable
Mads Kiilerich <mads@kiilerich.com>
parents: 17036
diff changeset
228 $ sleep 1
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
229 $ echo b > b
17034
75fd9d1cf638 convert/bzr: make tests work with bzr 2.0 again
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16099
diff changeset
230 $ bzr add -q b
75fd9d1cf638 convert/bzr: make tests work with bzr 2.0 again
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16099
diff changeset
231 $ bzr ci -qm addb
16062
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
232 $ bzr tag branch-tag
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
233 Created tag branch-tag.
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
234 $ bzr switch --force ../repo/trunk
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
235 Updated to revision 1.
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
236 Switched to branch: */repo/trunk/ (glob)
17097
885542e7d9b6 tests: make test-convert-bzr.t more stable
Mads Kiilerich <mads@kiilerich.com>
parents: 17036
diff changeset
237 $ sleep 1
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
238 $ echo a >> a
17034
75fd9d1cf638 convert/bzr: make tests work with bzr 2.0 again
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16099
diff changeset
239 $ bzr ci -qm changea
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
240 $ cd ..
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
241 $ hg convert --datesort repo repo-bzr
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
242 initializing destination repo-bzr repository
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
243 scanning source...
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
244 sorting...
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
245 converting...
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
246 2 adda
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
247 1 addb
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
248 0 changea
16062
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
249 updating tags
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
250 $ (cd repo-bzr; glog)
16062
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
251 o 3@default "update tags" files: .hgtags
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
252 |
16060
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
253 o 2@default "changea" files: a
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
254 |
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
255 | o 1@branch "addb" files: b
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
256 |/
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
257 o 0@default "adda" files: a
f84dda152a55 convert/bzr: convert all branches (issue3229) (BC)
Patrick Mezard <pmezard@gmail.com>
parents: 15442
diff changeset
258
16062
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
259
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
260 Test tags (converted identifiers are not stable because bzr ones are
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
261 not and get incorporated in extra fields).
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
262
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
263 $ hg -R repo-bzr tags
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
264 tip 3:* (glob)
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
265 branch-tag 1:* (glob)
718b81e8b876 convert/bzr: test tags conversion
Patrick Mezard <pmezard@gmail.com>
parents: 16061
diff changeset
266 trunk-tag 0:* (glob)
16099
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
267
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
268 Nested repositories (issue3254)
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
269
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
270 $ bzr init-repo -q --no-trees repo/inner
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
271 $ bzr init -q repo/inner/trunk
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
272 $ bzr co repo/inner/trunk inner-trunk
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
273 $ cd inner-trunk
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
274 $ echo b > b
17034
75fd9d1cf638 convert/bzr: make tests work with bzr 2.0 again
Thomas Arendsen Hein <thomas@intevation.de>
parents: 16099
diff changeset
275 $ bzr add -q b
16099
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
276 $ bzr ci -qm addb
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
277 $ cd ..
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
278 $ hg convert --datesort repo noinner-bzr
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
279 initializing destination noinner-bzr repository
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
280 scanning source...
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
281 sorting...
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
282 converting...
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
283 2 adda
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
284 1 addb
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
285 0 changea
4e4c416a0b1f convert/bzr: ignore nested repos when listing branches (issue3254)
Patrick Mezard <patrick@mezard.eu>
parents: 16062
diff changeset
286 updating tags