Mercurial > hg
annotate tests/test-convert-hg-source @ 6899:56a7a54e074f
store: simplify walking
- fold in main walking function
- eliminate recursion (especially recursive yielding!)
- eliminate default args
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 13 Aug 2008 20:18:43 -0500 |
parents | 180a3eee4b75 |
children | 8e7130a10f3b |
rev | line source |
---|---|
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
1 #!/bin/sh |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
2 |
5556
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5282
diff
changeset
|
3 cat >> $HGRCPATH <<EOF |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5282
diff
changeset
|
4 [extensions] |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5282
diff
changeset
|
5 convert= |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5282
diff
changeset
|
6 [convert] |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5282
diff
changeset
|
7 hg.saverev=False |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5282
diff
changeset
|
8 EOF |
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
9 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
10 hg init orig |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
11 cd orig |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
12 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
13 echo foo > foo |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
14 echo bar > bar |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
15 hg ci -qAm 'add foo bar' -d '0 0' |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
16 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
17 echo >> foo |
5282
22ddde515fda
test-convert-hg-source: enforce conversion order with --date
Patrick Mezard <pmezard@gmail.com>
parents:
5280
diff
changeset
|
18 hg ci -m 'change foo' -d '1 0' |
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
19 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
20 hg up -qC 0 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
21 hg copy --after --force foo bar |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
22 hg copy foo baz |
5282
22ddde515fda
test-convert-hg-source: enforce conversion order with --date
Patrick Mezard <pmezard@gmail.com>
parents:
5280
diff
changeset
|
23 hg ci -m 'make bar and baz copies of foo' -d '2 0' |
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
24 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
25 hg merge |
5282
22ddde515fda
test-convert-hg-source: enforce conversion order with --date
Patrick Mezard <pmezard@gmail.com>
parents:
5280
diff
changeset
|
26 hg ci -m 'merge local copy' -d '3 0' |
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
27 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
28 hg up -C 1 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
29 hg merge 2 |
5282
22ddde515fda
test-convert-hg-source: enforce conversion order with --date
Patrick Mezard <pmezard@gmail.com>
parents:
5280
diff
changeset
|
30 hg ci -m 'merge remote copy' -d '4 0' |
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
31 |
5811
180a3eee4b75
Fix copies reporting in log and convert.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5556
diff
changeset
|
32 chmod +x baz |
180a3eee4b75
Fix copies reporting in log and convert.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5556
diff
changeset
|
33 hg ci -m 'mark baz executable' -d '5 0' |
180a3eee4b75
Fix copies reporting in log and convert.
Maxim Dounin <mdounin@mdounin.ru>
parents:
5556
diff
changeset
|
34 |
5280
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
35 cd .. |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
36 hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
37 cd new |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
38 hg out ../orig |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
39 |
11e1e574da02
convert: mercurial_source: also search for copies in modified files
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
40 true |