comparison tests/test-convert-darcs @ 5413:719fd175181f

Test darcs converter
author Patrick Mezard <pmezard@gmail.com>
date Sun, 07 Oct 2007 19:03:32 +0200
parents
children a19167001251
comparison
equal deleted inserted replaced
5412:fbf40ad5a8c2 5413:719fd175181f
1 #!/bin/sh
2
3 "$TESTDIR/hghave" darcs || exit 80
4
5 echo "[extensions]" >> $HGRCPATH
6 echo "convert=" >> $HGRCPATH
7 echo 'hgext.graphlog =' >> $HGRCPATH
8
9 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
10
11 echo % initialize darcs repo
12 mkdir darcs-repo
13 cd darcs-repo
14 darcs init
15 echo a > a
16 darcs record -a -l -m p0
17 cd ..
18
19 echo % branch and update
20 darcs get darcs-repo darcs-clone
21 cd darcs-clone
22 echo c >> a
23 echo c > c
24 darcs record -a -l -m p1.1
25 cd ..
26
27 echo % update source
28 cd darcs-repo
29 echo b >> a
30 echo b > b
31 darcs record -a -l -m p1.2
32
33 echo % merge branch
34 darcs pull -a ../darcs-clone
35 echo e > a
36 darcs record -a -l -m p2
37 cd ..
38
39 glog()
40 {
41 hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@"
42 }
43
44 hg convert darcs-repo darcs-repo-hg
45 # The converter does not currently handle patch conflicts very well.
46 # When they occur, it reverts *all* changes and moves forward,
47 # letting the conflict resolving patch fix collisions.
48 # Unfortunately, non-conflicting changes, like the addition of the
49 # "c" file in p1.1 patch are reverted too.
50 # Just to say that manifest not listing "c" here is a bug.
51 glog -R darcs-repo-hg
52 hg -R darcs-repo-hg manifest --debug