Show More
@@ -1,34 +1,29 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 |
|
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 | |
4 |
|
4 | |||
5 | fix_path() |
|
|||
6 | { |
|
|||
7 | tr '\\' / |
|
|||
8 | } |
|
|||
9 |
|
||||
10 | echo "[extensions]" >> $HGRCPATH |
|
5 | echo "[extensions]" >> $HGRCPATH | |
11 | echo "convert = " >> $HGRCPATH |
|
6 | echo "convert = " >> $HGRCPATH | |
12 | echo "graphlog =" >> $HGRCPATH |
|
7 | echo "graphlog =" >> $HGRCPATH | |
13 |
|
8 | |||
14 | svnadmin create svn-repo |
|
9 | svnadmin create svn-repo | |
15 | cat "$TESTDIR/svn/branches.svndump" | svnadmin load svn-repo > /dev/null |
|
10 | cat "$TESTDIR/svn/branches.svndump" | svnadmin load svn-repo > /dev/null | |
16 |
|
11 | |||
17 | echo % convert trunk and branches |
|
12 | echo % convert trunk and branches | |
18 | cat >branchmap <<EOF |
|
13 | cat >branchmap <<EOF | |
19 | old3 newbranch |
|
14 | old3 newbranch | |
20 | EOF |
|
15 | EOF | |
21 | hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg |
|
16 | hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg | |
22 |
|
17 | |||
23 | echo % convert again |
|
18 | echo % convert again | |
24 | hg convert --branchmap=branchmap --datesort svn-repo A-hg |
|
19 | hg convert --branchmap=branchmap --datesort svn-repo A-hg | |
25 |
|
20 | |||
26 | cd A-hg |
|
21 | cd A-hg | |
27 | hg glog --template 'branch={branches} {rev} {desc|firstline} files: {files}\n' |
|
22 | hg glog --template 'branch={branches} {rev} {desc|firstline} files: {files}\n' | |
28 | hg branches | sed 's/:.*/:/' |
|
23 | hg branches | sed 's/:.*/:/' | |
29 | hg tags -q |
|
24 | hg tags -q | |
30 | cd .. |
|
25 | cd .. | |
31 |
|
26 | |||
32 | echo '% test hg failing to call itself' |
|
27 | echo '% test hg failing to call itself' | |
33 | HG=foobar hg convert svn-repo B-hg 2>&1 | grep -v foobar |
|
28 | HG=foobar hg convert svn-repo B-hg 2>&1 | grep -v foobar | |
34 |
|
29 |
@@ -1,37 +1,32 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 |
|
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 | |
4 |
|
4 | |||
5 | fix_path() |
|
|||
6 | { |
|
|||
7 | tr '\\' / |
|
|||
8 | } |
|
|||
9 |
|
||||
10 | echo "[extensions]" >> $HGRCPATH |
|
5 | echo "[extensions]" >> $HGRCPATH | |
11 | echo "convert = " >> $HGRCPATH |
|
6 | echo "convert = " >> $HGRCPATH | |
12 | echo "graphlog =" >> $HGRCPATH |
|
7 | echo "graphlog =" >> $HGRCPATH | |
13 |
|
8 | |||
14 | svnadmin create svn-repo |
|
9 | svnadmin create svn-repo | |
15 | cat "$TESTDIR/svn/startrev.svndump" | svnadmin load svn-repo > /dev/null |
|
10 | cat "$TESTDIR/svn/startrev.svndump" | svnadmin load svn-repo > /dev/null | |
16 |
|
11 | |||
17 | convert() |
|
12 | convert() | |
18 | { |
|
13 | { | |
19 | startrev=$1 |
|
14 | startrev=$1 | |
20 | repopath=A-r$startrev-hg |
|
15 | repopath=A-r$startrev-hg | |
21 | hg convert --config convert.svn.startrev=$startrev \ |
|
16 | hg convert --config convert.svn.startrev=$startrev \ | |
22 | --config convert.svn.trunk=branches/branch1 \ |
|
17 | --config convert.svn.trunk=branches/branch1 \ | |
23 | --config convert.svn.branches=" " \ |
|
18 | --config convert.svn.branches=" " \ | |
24 | --config convert.svn.tags= \ |
|
19 | --config convert.svn.tags= \ | |
25 | --datesort svn-repo $repopath |
|
20 | --datesort svn-repo $repopath | |
26 | hg -R $repopath glog --template '{rev} {desc|firstline} files: {files}\n' |
|
21 | hg -R $repopath glog --template '{rev} {desc|firstline} files: {files}\n' | |
27 | echo |
|
22 | echo | |
28 | } |
|
23 | } | |
29 |
|
24 | |||
30 | echo % convert before branching point |
|
25 | echo % convert before branching point | |
31 | convert 3 |
|
26 | convert 3 | |
32 | echo % convert before branching point |
|
27 | echo % convert before branching point | |
33 | convert 4 |
|
28 | convert 4 | |
34 | echo % convert at branching point |
|
29 | echo % convert at branching point | |
35 | convert 5 |
|
30 | convert 5 | |
36 | echo % convert last revision only |
|
31 | echo % convert last revision only | |
37 | convert 6 |
|
32 | convert 6 |
@@ -1,28 +1,23 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 |
|
3 | "$TESTDIR/hghave" svn svn-bindings || exit 80 | |
4 |
|
4 | |||
5 | fix_path() |
|
|||
6 | { |
|
|||
7 | tr '\\' / |
|
|||
8 | } |
|
|||
9 |
|
||||
10 | echo "[extensions]" >> $HGRCPATH |
|
5 | echo "[extensions]" >> $HGRCPATH | |
11 | echo "convert = " >> $HGRCPATH |
|
6 | echo "convert = " >> $HGRCPATH | |
12 | echo "graphlog =" >> $HGRCPATH |
|
7 | echo "graphlog =" >> $HGRCPATH | |
13 |
|
8 | |||
14 | svnadmin create svn-repo |
|
9 | svnadmin create svn-repo | |
15 | cat "$TESTDIR/svn/tags.svndump" | svnadmin load svn-repo > /dev/null |
|
10 | cat "$TESTDIR/svn/tags.svndump" | svnadmin load svn-repo > /dev/null | |
16 |
|
11 | |||
17 | echo % convert |
|
12 | echo % convert | |
18 | hg convert --datesort svn-repo A-hg |
|
13 | hg convert --datesort svn-repo A-hg | |
19 |
|
14 | |||
20 | cd A-hg |
|
15 | cd A-hg | |
21 | hg glog --template '{rev} {desc|firstline} tags: {tags}\n' |
|
16 | hg glog --template '{rev} {desc|firstline} tags: {tags}\n' | |
22 | hg tags | sed 's/:.*/:/' |
|
17 | hg tags | sed 's/:.*/:/' | |
23 | cd .. |
|
18 | cd .. | |
24 |
|
19 | |||
25 | echo % convert without tags |
|
20 | echo % convert without tags | |
26 | hg convert --datesort --config convert.svn.tags= svn-repo A-notags-hg |
|
21 | hg convert --datesort --config convert.svn.tags= svn-repo A-notags-hg | |
27 | hg -R A-notags-hg tags -q |
|
22 | hg -R A-notags-hg tags -q | |
28 |
|
23 |
General Comments 0
You need to be logged in to leave comments.
Login now