Show More
@@ -3,8 +3,6 | |||||
3 | # This feature requires use of builtin cvsps! |
|
3 | # This feature requires use of builtin cvsps! | |
4 | "$TESTDIR/hghave" cvs || exit 80 |
|
4 | "$TESTDIR/hghave" cvs || exit 80 | |
5 |
|
5 | |||
6 | # XXX lots of duplication with other test-convert-cvs* scripts |
|
|||
7 |
|
||||
8 | set -e |
|
6 | set -e | |
9 |
|
7 | |||
10 | echo "[extensions]" >> $HGRCPATH |
|
8 | echo "[extensions]" >> $HGRCPATH | |
@@ -19,47 +17,62 export CVSROOT=`pwd` | |||||
19 | export CVS_OPTIONS=-f |
|
17 | export CVS_OPTIONS=-f | |
20 | cd .. |
|
18 | cd .. | |
21 |
|
19 | |||
22 | filter='sed "s:$CVSROOT:*REPO*:g"' |
|
20 | filterpath() | |
|
21 | { | |||
|
22 | eval "$@" | sed "s:$CVSROOT:*REPO*:g" | |||
|
23 | } | |||
|
24 | ||||
23 | cvscall() |
|
25 | cvscall() | |
24 | { |
|
26 | { | |
25 |
cvs -f "$@" |
|
27 | echo cvs -f "$@" | |
|
28 | cvs -f "$@" 2>&1 | |||
26 | } |
|
29 | } | |
27 |
|
30 | |||
28 | cvscall -q -d "$CVSROOT" init |
|
31 | # output of 'cvs ci' varies unpredictably, so just discard it | |
|
32 | cvsci() | |||
|
33 | { | |||
|
34 | echo cvs -f ci "$@" | |||
|
35 | cvs -f ci "$@" >/dev/null 2>&1 | |||
|
36 | } | |||
|
37 | ||||
|
38 | filterpath cvscall -d "$CVSROOT" init | |||
29 | mkdir cvsrepo/proj |
|
39 | mkdir cvsrepo/proj | |
30 |
|
40 | |||
31 | cvscall co proj |
|
41 | cvscall -q co proj | |
32 |
|
42 | |||
33 | echo % create file1 on the trunk |
|
43 | echo % create file1 on the trunk | |
34 | cd proj |
|
44 | cd proj | |
35 | touch file1 |
|
45 | touch file1 | |
36 | cvscall add file1 |
|
46 | cvscall -Q add file1 | |
37 |
cvsc |
|
47 | cvsci -m"add file1 on trunk" file1 | |
38 |
|
48 | |||
39 | echo % create two branches |
|
49 | echo % create two branches | |
40 | cvscall tag -b v1_0 |
|
50 | cvscall -q tag -b v1_0 | |
41 | cvscall tag -b v1_1 |
|
51 | cvscall -q tag -b v1_1 | |
42 |
|
52 | |||
43 | echo % create file2 on branch v1_0 |
|
53 | echo % create file2 on branch v1_0 | |
44 | cvs up -rv1_0 |
|
54 | cvscall -q up -rv1_0 | |
45 | touch file2 |
|
55 | touch file2 | |
46 | cvscall add file2 |
|
56 | cvscall -Q add file2 | |
47 |
cvsc |
|
57 | cvsci -m"add file2 on branch v1_0" file2 | |
48 |
|
58 | |||
49 | echo % create file3, file4 on branch v1_1 |
|
59 | echo % create file3, file4 on branch v1_1 | |
50 | cvs up -rv1_1 |
|
60 | cvscall -Q up -rv1_1 | |
51 | touch file3 |
|
61 | touch file3 | |
52 | touch file4 |
|
62 | touch file4 | |
53 | cvscall add file3 file4 |
|
63 | cvscall -Q add file3 file4 | |
54 |
cvsc |
|
64 | cvsci -m"add file3, file4 on branch v1_1" file3 file4 | |
55 |
|
65 | |||
56 | echo % merge file2 from v1_0 to v1_1 |
|
66 | echo % merge file2 from v1_0 to v1_1 | |
57 | cvscall up -jv1_0 |
|
67 | cvscall -q up -jv1_0 | |
58 |
cvsc |
|
68 | cvsci -m"merge file2 from v1_0 to v1_1" | |
|
69 | ||||
|
70 | echo % cvs rlog output | |||
|
71 | filterpath cvscall -q rlog proj | egrep '^(RCS file|revision)' | |||
59 |
|
72 | |||
60 | echo % convert to hg |
|
73 | echo % convert to hg | |
61 | cd .. |
|
74 | cd .. | |
62 |
hg convert proj proj.hg |
|
75 | filterpath hg convert proj proj.hg | |
63 |
|
76 | |||
64 | echo % hg log output |
|
77 | echo % hg log output | |
65 | hg -R proj.hg log --template "{rev} {desc}\n" |
|
78 | hg -R proj.hg log --template "{rev} {desc}\n" |
@@ -1,37 +1,40 | |||||
1 | % create cvs repository with one project |
|
1 | % create cvs repository with one project | |
2 | cvs checkout: Updating proj |
|
2 | cvs -f -d *REPO* init | |
|
3 | cvs -f -q co proj | |||
3 | % create file1 on the trunk |
|
4 | % create file1 on the trunk | |
4 | cvs add: scheduling file `file1' for addition |
|
5 | cvs -f -Q add file1 | |
5 | cvs add: use `cvs commit' to add this file permanently |
|
6 | cvs -f ci -madd file1 on trunk file1 | |
6 | *REPO*/proj/file1,v <-- file1 |
|
|||
7 | initial revision: 1.1 |
|
|||
8 | % create two branches |
|
7 | % create two branches | |
9 | cvs tag: Tagging . |
|
8 | cvs -f -q tag -b v1_0 | |
10 | T file1 |
|
9 | T file1 | |
11 | cvs tag: Tagging . |
|
10 | cvs -f -q tag -b v1_1 | |
12 | T file1 |
|
11 | T file1 | |
13 | % create file2 on branch v1_0 |
|
12 | % create file2 on branch v1_0 | |
14 | cvs update: Updating . |
|
13 | cvs -f -q up -rv1_0 | |
15 | cvs add: scheduling file `file2' for addition on branch `v1_0' |
|
14 | cvs -f -Q add file2 | |
16 | cvs add: use `cvs commit' to add this file permanently |
|
15 | cvs -f ci -madd file2 on branch v1_0 file2 | |
17 | *REPO*/proj/Attic/file2,v <-- file2 |
|
|||
18 | new revision: 1.1.2.1; previous revision: 1.1 |
|
|||
19 | % create file3, file4 on branch v1_1 |
|
16 | % create file3, file4 on branch v1_1 | |
20 | cvs update: Updating . |
|
17 | cvs -f -Q up -rv1_1 | |
21 | cvs update: `file2' is no longer in the repository |
|
18 | cvs -f -Q add file3 file4 | |
22 | cvs add: scheduling file `file3' for addition on branch `v1_1' |
|
19 | cvs -f ci -madd file3, file4 on branch v1_1 file3 file4 | |
23 | cvs add: scheduling file `file4' for addition on branch `v1_1' |
|
|||
24 | cvs add: use `cvs commit' to add these files permanently |
|
|||
25 | *REPO*/proj/Attic/file3,v <-- file3 |
|
|||
26 | new revision: 1.1.2.1; previous revision: 1.1 |
|
|||
27 | *REPO*/proj/Attic/file4,v <-- file4 |
|
|||
28 | new revision: 1.1.2.1; previous revision: 1.1 |
|
|||
29 | % merge file2 from v1_0 to v1_1 |
|
20 | % merge file2 from v1_0 to v1_1 | |
30 | cvs update: Updating . |
|
21 | cvs -f -q up -jv1_0 | |
31 | U file2 |
|
22 | U file2 | |
32 | cvs commit: Examining . |
|
23 | cvs -f ci -mmerge file2 from v1_0 to v1_1 | |
33 | *REPO*/proj/Attic/file2,v <-- file2 |
|
24 | % cvs rlog output | |
34 | new revision: 1.1.4.2; previous revision: 1.1.4.1 |
|
25 | RCS file: *REPO*/proj/file1,v | |
|
26 | revision 1.1 | |||
|
27 | RCS file: *REPO*/proj/Attic/file2,v | |||
|
28 | revision 1.1 | |||
|
29 | revision 1.1.4.2 | |||
|
30 | revision 1.1.4.1 | |||
|
31 | revision 1.1.2.1 | |||
|
32 | RCS file: *REPO*/proj/Attic/file3,v | |||
|
33 | revision 1.1 | |||
|
34 | revision 1.1.2.1 | |||
|
35 | RCS file: *REPO*/proj/Attic/file4,v | |||
|
36 | revision 1.1 | |||
|
37 | revision 1.1.2.1 | |||
35 | % convert to hg |
|
38 | % convert to hg | |
36 | initializing destination proj.hg repository |
|
39 | initializing destination proj.hg repository | |
37 | connecting to *REPO* |
|
40 | connecting to *REPO* |
General Comments 0
You need to be logged in to leave comments.
Login now