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