author | Martin Geisler <mg@lazybytes.net> |
Thu, 23 Jul 2009 00:25:54 +0200 | |
changeset 9216 | 9b2649b6ce5c |
parent 8523 | 5b7da468531b |
child 9326 | b236f34ec1e9 |
permissions | -rwxr-xr-x |
5413 | 1 |
#!/bin/sh |
2 |
||
3 |
"$TESTDIR/hghave" darcs || exit 80 |
|
7425
14ed6662af48
tests: disable test-convert-darcs properly for darcs 2
Mads Kiilerich <mads@kiilerich.com>
parents:
6799
diff
changeset
|
4 |
if darcs --version 2>&1 | grep '^2\.' > /dev/null; then |
14ed6662af48
tests: disable test-convert-darcs properly for darcs 2
Mads Kiilerich <mads@kiilerich.com>
parents:
6799
diff
changeset
|
5 |
# FIXME: darcs 2 will fail with |
14ed6662af48
tests: disable test-convert-darcs properly for darcs 2
Mads Kiilerich <mads@kiilerich.com>
parents:
6799
diff
changeset
|
6 |
### Abort: timeout after 180 seconds. |
14ed6662af48
tests: disable test-convert-darcs properly for darcs 2
Mads Kiilerich <mads@kiilerich.com>
parents:
6799
diff
changeset
|
7 |
echo 'skipped: test currently disabled for darcs 2' |
14ed6662af48
tests: disable test-convert-darcs properly for darcs 2
Mads Kiilerich <mads@kiilerich.com>
parents:
6799
diff
changeset
|
8 |
exit 80 |
14ed6662af48
tests: disable test-convert-darcs properly for darcs 2
Mads Kiilerich <mads@kiilerich.com>
parents:
6799
diff
changeset
|
9 |
fi |
5413 | 10 |
|
11 |
echo "[extensions]" >> $HGRCPATH |
|
12 |
echo "convert=" >> $HGRCPATH |
|
13 |
echo 'hgext.graphlog =' >> $HGRCPATH |
|
14 |
||
15 |
DARCS_EMAIL='test@example.org'; export DARCS_EMAIL |
|
5442
a19167001251
test-convert-darcs: don't let $HOME/.darcs pollute the test environment
Bryan O'Sullivan <bos@serpentine.com>
parents:
5413
diff
changeset
|
16 |
HOME=do_not_use_HOME_darcs; export HOME |
5413 | 17 |
|
5520
cc3af86ab6fe
test-convert-darcs: skip if we can't find the elementtree module
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5442
diff
changeset
|
18 |
# skip if we can't import elementtree |
cc3af86ab6fe
test-convert-darcs: skip if we can't find the elementtree module
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5442
diff
changeset
|
19 |
mkdir dummy |
cc3af86ab6fe
test-convert-darcs: skip if we can't find the elementtree module
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5442
diff
changeset
|
20 |
mkdir dummy/_darcs |
cc3af86ab6fe
test-convert-darcs: skip if we can't find the elementtree module
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5442
diff
changeset
|
21 |
if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then |
5685
57d29a45ffbc
Use skipped: instead of hghave: for skipping tests, use this in test-merge-types
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5667
diff
changeset
|
22 |
echo 'skipped: missing feature: elementtree module' |
5520
cc3af86ab6fe
test-convert-darcs: skip if we can't find the elementtree module
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5442
diff
changeset
|
23 |
exit 80 |
cc3af86ab6fe
test-convert-darcs: skip if we can't find the elementtree module
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5442
diff
changeset
|
24 |
fi |
cc3af86ab6fe
test-convert-darcs: skip if we can't find the elementtree module
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5442
diff
changeset
|
25 |
|
5413 | 26 |
echo % initialize darcs repo |
27 |
mkdir darcs-repo |
|
28 |
cd darcs-repo |
|
29 |
darcs init |
|
30 |
echo a > a |
|
31 |
darcs record -a -l -m p0 |
|
32 |
cd .. |
|
33 |
||
34 |
echo % branch and update |
|
5667
f29b7c8419cb
Fix test-convert-darcs output on Debian etch (issue779)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5520
diff
changeset
|
35 |
darcs get darcs-repo darcs-clone >/dev/null |
5413 | 36 |
cd darcs-clone |
37 |
echo c >> a |
|
38 |
echo c > c |
|
39 |
darcs record -a -l -m p1.1 |
|
40 |
cd .. |
|
41 |
||
42 |
echo % update source |
|
43 |
cd darcs-repo |
|
44 |
echo b >> a |
|
45 |
echo b > b |
|
46 |
darcs record -a -l -m p1.2 |
|
47 |
||
48 |
echo % merge branch |
|
49 |
darcs pull -a ../darcs-clone |
|
50 |
echo e > a |
|
51 |
darcs record -a -l -m p2 |
|
52 |
cd .. |
|
53 |
||
54 |
glog() |
|
55 |
{ |
|
8523
5b7da468531b
tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents:
7425
diff
changeset
|
56 |
hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@" |
5413 | 57 |
} |
58 |
||
5667
f29b7c8419cb
Fix test-convert-darcs output on Debian etch (issue779)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5520
diff
changeset
|
59 |
hg convert darcs-repo darcs-repo-hg 2>&1 | grep -v hGetLine | grep -v '^$' |
5413 | 60 |
# The converter does not currently handle patch conflicts very well. |
61 |
# When they occur, it reverts *all* changes and moves forward, |
|
62 |
# letting the conflict resolving patch fix collisions. |
|
63 |
# Unfortunately, non-conflicting changes, like the addition of the |
|
64 |
# "c" file in p1.1 patch are reverted too. |
|
65 |
# Just to say that manifest not listing "c" here is a bug. |
|
66 |
glog -R darcs-repo-hg |
|
6799
12d1e1e79faf
Fix tests failures introduced by 7239e06e58e9
Patrick Mezard <pmezard@gmail.com>
parents:
5685
diff
changeset
|
67 |
hg up -q -R darcs-repo-hg |
5413 | 68 |
hg -R darcs-repo-hg manifest --debug |