Mercurial > hg
annotate tests/test-convert-svn-branches @ 7993:b83a11536fc6
keyword: word-wrap help texts at 70 characters
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Sat, 04 Apr 2009 23:17:53 +0200 |
parents | 90d8dfb481e7 |
children | 29f4f0d66cd5 |
rev | line source |
---|---|
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 fix_path() |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 { |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 tr '\\' / |
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 |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 echo "[extensions]" >> $HGRCPATH |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 echo "convert = " >> $HGRCPATH |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 echo "hgext.graphlog =" >> $HGRCPATH |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 svnadmin create svn-repo |
7475
90d8dfb481e7
Rewrite svn tests using svndump
Patrick Mezard <pmezard@gmail.com>
parents:
6851
diff
changeset
|
15 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
|
16 |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 svnpath=`pwd | fix_path` |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 # SVN wants all paths to start with a slash. Unfortunately, |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 # Windows ones don't. Handle that. |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 expr $svnpath : "\/" > /dev/null |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 if [ $? -ne 0 ]; then |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 svnpath='/'$svnpath |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 fi |
7475
90d8dfb481e7
Rewrite svn tests using svndump
Patrick Mezard <pmezard@gmail.com>
parents:
6851
diff
changeset
|
24 svnurl=file://$svnpath/svn-repo |
5874
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 echo % convert trunk and branches |
7475
90d8dfb481e7
Rewrite svn tests using svndump
Patrick Mezard <pmezard@gmail.com>
parents:
6851
diff
changeset
|
27 hg convert --datesort -r 10 $svnurl A-hg |
5874
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 echo % convert again |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 hg convert --datesort $svnurl A-hg |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 cd A-hg |
6540
55bd855fc0af
convert: improve subversion branch filtering
Patrick Mezard <pmezard@gmail.com>
parents:
6537
diff
changeset
|
33 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
|
34 hg branches | sed 's/:.*/:/' |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
35 hg tags -q |
866aa7ae2612
Test subversion branches conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
36 cd .. |