##// END OF EJS Templates
merge with stable
Benoit Boissinot -
r8082:81aba9e7 merge default
parent child Browse files
Show More
@@ -1,65 +1,78
1 #!/bin/sh
1 #!/bin/sh
2
2
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
11 echo "convert = " >> $HGRCPATH
9 echo "convert = " >> $HGRCPATH
12 echo "[convert]" >> $HGRCPATH
10 echo "[convert]" >> $HGRCPATH
13 echo "cvsps=builtin" >> $HGRCPATH
11 echo "cvsps=builtin" >> $HGRCPATH
14
12
15 echo % create cvs repository with one project
13 echo % create cvs repository with one project
16 mkdir cvsrepo
14 mkdir cvsrepo
17 cd cvsrepo
15 cd cvsrepo
18 export CVSROOT=`pwd`
16 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 "$@" | eval $filter
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 cvscall ci -m"add file1 on trunk" file1
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 cvscall ci -m"add file2 on branch v1_0" file2
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 cvscall ci -m"add file3, file4 on branch v1_1" file3 file4
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 cvscall ci -m"merge file2 from v1_0 to v1_1"
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 | eval $filter
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,54 +1,57
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*
38 scanning source...
41 scanning source...
39 using builtin cvsps
42 using builtin cvsps
40 collecting CVS rlog
43 collecting CVS rlog
41 9 log entries
44 9 log entries
42 creating changesets
45 creating changesets
43 4 changeset entries
46 4 changeset entries
44 sorting...
47 sorting...
45 converting...
48 converting...
46 3 add file1 on trunk
49 3 add file1 on trunk
47 2 add file2 on branch v1_0
50 2 add file2 on branch v1_0
48 1 add file3, file4 on branch v1_1
51 1 add file3, file4 on branch v1_1
49 0 merge file2 from v1_0 to v1_1
52 0 merge file2 from v1_0 to v1_1
50 % hg log output
53 % hg log output
51 3 merge file2 from v1_0 to v1_1
54 3 merge file2 from v1_0 to v1_1
52 2 add file3, file4 on branch v1_1
55 2 add file3, file4 on branch v1_1
53 1 add file2 on branch v1_0
56 1 add file2 on branch v1_0
54 0 add file1 on trunk
57 0 add file1 on trunk
General Comments 0
You need to be logged in to leave comments. Login now