Show More
@@ -1,60 +1,61 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | # This is http://www.selenic.com/mercurial/bts/issue1148 |
|
3 | # This is http://www.selenic.com/mercurial/bts/issue1148 | |
4 |
|
4 | |||
5 | "$TESTDIR/hghave" cvs || exit 80 |
|
5 | "$TESTDIR/hghave" cvs || exit 80 | |
6 |
|
6 | |||
7 | cvscall() |
|
7 | cvscall() | |
8 | { |
|
8 | { | |
9 | cvs -f "$@" |
|
9 | cvs -f "$@" | |
10 | } |
|
10 | } | |
11 |
|
11 | |||
12 | echo "[extensions]" >> $HGRCPATH |
|
12 | echo "[extensions]" >> $HGRCPATH | |
13 | echo "convert = " >> $HGRCPATH |
|
13 | echo "convert = " >> $HGRCPATH | |
14 | echo "graphlog = " >> $HGRCPATH |
|
14 | echo "graphlog = " >> $HGRCPATH | |
15 | echo "[convert]" >> $HGRCPATH |
|
15 | echo "[convert]" >> $HGRCPATH | |
16 | echo "cvsps=builtin" >> $HGRCPATH |
|
16 | echo "cvsps=builtin" >> $HGRCPATH | |
17 |
|
17 | |||
18 | echo % create cvs repository |
|
18 | echo % create cvs repository | |
19 | mkdir cvsrepo |
|
19 | mkdir cvsrepo | |
20 | cd cvsrepo |
|
20 | cd cvsrepo | |
21 | export CVSROOT=`pwd` |
|
21 | export CVSROOT=`pwd` | |
22 | export CVS_OPTIONS=-f |
|
22 | export CVS_OPTIONS=-f | |
23 | cd .. |
|
23 | cd .. | |
24 |
|
24 | |||
25 | cvscall -q -d "$CVSROOT" init |
|
25 | cvscall -q -d "$CVSROOT" init | |
26 |
|
26 | |||
27 | echo % Create a new project |
|
27 | echo % Create a new project | |
28 |
|
28 | |||
29 | mkdir src |
|
29 | mkdir src | |
30 | cd src |
|
30 | cd src | |
31 |
echo "1" > a |
|
31 | echo "1" > a | |
32 | cvscall import -m "init" src v0 r0 |
|
32 | echo "1" > b | |
|
33 | cvscall import -m "init" src v0 r0 | sort | |||
33 | cd .. |
|
34 | cd .. | |
34 | cvscall co src |
|
35 | cvscall co src | |
35 | cd src |
|
36 | cd src | |
36 |
|
37 | |||
37 | echo % Branch the project |
|
38 | echo % Branch the project | |
38 |
|
39 | |||
39 | cvscall tag -b BRANCH |
|
40 | cvscall tag -b BRANCH | |
40 | cvscall up -r BRANCH |
|
41 | cvscall up -r BRANCH | |
41 |
|
42 | |||
42 | echo % Modify file a, then b, then a |
|
43 | echo % Modify file a, then b, then a | |
43 |
|
44 | |||
44 | echo "2" > a |
|
45 | echo "2" > a | |
45 | cvscall ci -m "mod a" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
46 | cvscall ci -m "mod a" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' | |
46 |
|
47 | |||
47 | echo "2" > b |
|
48 | echo "2" > b | |
48 | cvscall ci -m "mod b" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
49 | cvscall ci -m "mod b" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' | |
49 |
|
50 | |||
50 | echo "3" > a |
|
51 | echo "3" > a | |
51 | cvscall ci -m "mod a again" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' |
|
52 | cvscall ci -m "mod a again" | grep '<--' | sed -e 's:.*src/\(.*\),v.*:checking in src/\1,v:g' | |
52 |
|
53 | |||
53 | echo % Convert |
|
54 | echo % Convert | |
54 |
|
55 | |||
55 | cd .. |
|
56 | cd .. | |
56 | hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' |
|
57 | hg convert src | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g' | |
57 |
|
58 | |||
58 | echo % Check the result |
|
59 | echo % Check the result | |
59 |
|
60 | |||
60 | hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n' |
|
61 | hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n' |
@@ -1,53 +1,53 b'' | |||||
1 | % create cvs repository |
|
1 | % create cvs repository | |
2 | % Create a new project |
|
2 | % Create a new project | |
|
3 | ||||
|
4 | ||||
3 | N src/a |
|
5 | N src/a | |
4 | N src/b |
|
6 | N src/b | |
5 |
|
||||
6 | No conflicts created by this import |
|
7 | No conflicts created by this import | |
7 |
|
||||
8 | cvs checkout: Updating src |
|
8 | cvs checkout: Updating src | |
9 | U src/a |
|
9 | U src/a | |
10 | U src/b |
|
10 | U src/b | |
11 | % Branch the project |
|
11 | % Branch the project | |
12 | cvs tag: Tagging . |
|
12 | cvs tag: Tagging . | |
13 | T a |
|
13 | T a | |
14 | T b |
|
14 | T b | |
15 | cvs update: Updating . |
|
15 | cvs update: Updating . | |
16 | % Modify file a, then b, then a |
|
16 | % Modify file a, then b, then a | |
17 | cvs commit: Examining . |
|
17 | cvs commit: Examining . | |
18 | checking in src/a,v |
|
18 | checking in src/a,v | |
19 | cvs commit: Examining . |
|
19 | cvs commit: Examining . | |
20 | checking in src/b,v |
|
20 | checking in src/b,v | |
21 | cvs commit: Examining . |
|
21 | cvs commit: Examining . | |
22 | checking in src/a,v |
|
22 | checking in src/a,v | |
23 | % Convert |
|
23 | % Convert | |
24 | assuming destination src-hg |
|
24 | assuming destination src-hg | |
25 | initializing destination src-hg repository |
|
25 | initializing destination src-hg repository | |
26 | using builtin cvsps |
|
26 | using builtin cvsps | |
27 | collecting CVS rlog |
|
27 | collecting CVS rlog | |
28 | 7 log entries |
|
28 | 7 log entries | |
29 | creating changesets |
|
29 | creating changesets | |
30 | 5 changeset entries |
|
30 | 5 changeset entries | |
31 | connecting to cvsrepo |
|
31 | connecting to cvsrepo | |
32 | scanning source... |
|
32 | scanning source... | |
33 | sorting... |
|
33 | sorting... | |
34 | converting... |
|
34 | converting... | |
35 | 4 Initial revision |
|
35 | 4 Initial revision | |
36 | 3 init |
|
36 | 3 init | |
37 | 2 mod a |
|
37 | 2 mod a | |
38 | 1 mod b |
|
38 | 1 mod b | |
39 | 0 mod a again |
|
39 | 0 mod a again | |
40 | updating tags |
|
40 | updating tags | |
41 | % Check the result |
|
41 | % Check the result | |
42 | o 5 () update tags files: .hgtags |
|
42 | o 5 () update tags files: .hgtags | |
43 | | |
|
43 | | | |
44 | | o 4 (BRANCH) mod a again files: a |
|
44 | | o 4 (BRANCH) mod a again files: a | |
45 | | | |
|
45 | | | | |
46 | | o 3 (BRANCH) mod b files: b |
|
46 | | o 3 (BRANCH) mod b files: b | |
47 | | | |
|
47 | | | | |
48 | | o 2 (BRANCH) mod a files: a |
|
48 | | o 2 (BRANCH) mod a files: a | |
49 | | | |
|
49 | | | | |
50 | | o 1 (v0) init files: |
|
50 | | o 1 (v0) init files: | |
51 | |/ |
|
51 | |/ | |
52 | o 0 () Initial revision files: a b |
|
52 | o 0 () Initial revision files: a b | |
53 |
|
53 |
General Comments 0
You need to be logged in to leave comments.
Login now