tests/test-convert-svn-branches
author Yuya Nishihara <yuya@tcha.org>
Fri, 21 May 2010 20:55:18 +0900
changeset 11208 2313dc4d9817
parent 10205 45885e8f5704
permissions -rwxr-xr-x
tests: fix bashism to load helpers.sh `source` isn't available at POSIX sh.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5874
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     2
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     3
"$TESTDIR/hghave" svn svn-bindings || exit 80
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     4
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     5
echo "[extensions]" >> $HGRCPATH
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     6
echo "convert = " >> $HGRCPATH
10119
bb5ea66789e3 tests: load with "ext =" instead of "hgext.ext ="
Martin Geisler <mg@lazybytes.net>
parents: 9587
diff changeset
     7
echo "graphlog =" >> $HGRCPATH
5874
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     8
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     9
svnadmin create svn-repo
7475
90d8dfb481e7 Rewrite svn tests using svndump
Patrick Mezard <pmezard@gmail.com>
parents: 6851
diff changeset
    10
cat "$TESTDIR/svn/branches.svndump" | svnadmin load svn-repo > /dev/null
5874
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    11
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    12
echo % convert trunk and branches
8377
29f4f0d66cd5 convert: adding branchmap functionality to convert extension
Michael J. Pedersen <m.pedersen@icelus.org>
parents: 7475
diff changeset
    13
cat >branchmap <<EOF
29f4f0d66cd5 convert: adding branchmap functionality to convert extension
Michael J. Pedersen <m.pedersen@icelus.org>
parents: 7475
diff changeset
    14
old3 newbranch
29f4f0d66cd5 convert: adding branchmap functionality to convert extension
Michael J. Pedersen <m.pedersen@icelus.org>
parents: 7475
diff changeset
    15
EOF
8765
9c75f16f577c test-convert-svn-*: no longer need the url building code
Patrick Mezard <pmezard@gmail.com>
parents: 8523
diff changeset
    16
hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg
5874
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    17
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    18
echo % convert again
8765
9c75f16f577c test-convert-svn-*: no longer need the url building code
Patrick Mezard <pmezard@gmail.com>
parents: 8523
diff changeset
    19
hg convert --branchmap=branchmap --datesort svn-repo A-hg
5874
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    20
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    21
cd A-hg
8523
5b7da468531b tests: replace #...# syntax with {...}
Martin Geisler <mg@lazybytes.net>
parents: 8377
diff changeset
    22
hg glog --template 'branch={branches} {rev} {desc|firstline} files: {files}\n'
5874
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    23
hg branches | sed 's/:.*/:/'
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    24
hg tags -q
866aa7ae2612 Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    25
cd ..
9587
d80a251baf9a convert/svn: better error when hg cannot call itself (issue1838)
Patrick Mezard <pmezard@gmail.com>
parents: 8765
diff changeset
    26
d80a251baf9a convert/svn: better error when hg cannot call itself (issue1838)
Patrick Mezard <pmezard@gmail.com>
parents: 8765
diff changeset
    27
echo '% test hg failing to call itself'
10205
45885e8f5704 test-convert-svn-branches: filter unwanted output
Patrick Mezard <pmezard@gmail.com>
parents: 10200
diff changeset
    28
HG=foobar hg convert svn-repo B-hg 2>&1 | grep itself
9587
d80a251baf9a convert/svn: better error when hg cannot call itself (issue1838)
Patrick Mezard <pmezard@gmail.com>
parents: 8765
diff changeset
    29