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