comparison tests/test-convert-splicemap @ 8047:04c62275cbc7

convert: better mapfile parsing errors (issue1581/1)
author Patrick Mezard <pmezard@gmail.com>
date Sat, 11 Apr 2009 21:15:27 +0200
parents
children 5b7da468531b
comparison
equal deleted inserted replaced
8046:f3ef8a352d83 8047:04c62275cbc7
1 #!/bin/sh
2
3 echo "[extensions]" >> $HGRCPATH
4 echo "convert=" >> $HGRCPATH
5 echo 'hgext.graphlog =' >> $HGRCPATH
6
7 glog()
8 {
9 hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@"
10 }
11
12 hg init repo1
13 cd repo1
14 echo a > a
15 hg ci -Am adda
16 echo b > b
17 echo a >> a
18 hg ci -Am addb
19 PARENTID1=`hg id --debug -i`
20 echo c > c
21 hg ci -Am addc
22 PARENTID2=`hg id --debug -i`
23 cd ..
24
25 hg init repo2
26 cd repo2
27 echo b > a
28 echo d > d
29 hg ci -Am addaandd
30 CHILDID1=`hg id --debug -i`
31 echo d >> d
32 hg ci -Am changed
33 CHILDID2=`hg id --debug -i`
34 echo e > e
35 hg ci -Am adde
36 cd ..
37
38 echo '% test invalid splicemap'
39 cat > splicemap <<EOF
40 $CHILDID2
41 EOF
42 hg convert --splicemap splicemap repo2 repo1
43
44 echo '% splice repo2 on repo1'
45 cat > splicemap <<EOF
46 $CHILDID1 $PARENTID1
47 $CHILDID2 $PARENTID2,$CHILDID1
48 EOF
49 hg clone repo1 target1
50 hg convert --splicemap splicemap repo2 target1
51 glog -R target1