##// END OF EJS Templates
test-convert-cvs-branch: add sleep so cvs notices changes
Mads Kiilerich -
r12580:0ae639c7 default
parent child Browse files
Show More
@@ -1,190 +1,192
1 This is http://mercurial.selenic.com/bts/issue1148
1 This is http://mercurial.selenic.com/bts/issue1148
2 and http://mercurial.selenic.com/bts/issue1447
2 and http://mercurial.selenic.com/bts/issue1447
3
3
4 $ "$TESTDIR/hghave" cvs || exit 80
4 $ "$TESTDIR/hghave" cvs || exit 80
5 $ cvscall()
5 $ cvscall()
6 > {
6 > {
7 > cvs -f "$@" > /dev/null
7 > cvs -f "$@" > /dev/null
8 > }
8 > }
9 $ echo "[extensions]" >> $HGRCPATH
9 $ echo "[extensions]" >> $HGRCPATH
10 $ echo "convert = " >> $HGRCPATH
10 $ echo "convert = " >> $HGRCPATH
11 $ echo "graphlog = " >> $HGRCPATH
11 $ echo "graphlog = " >> $HGRCPATH
12 $ echo "[convert]" >> $HGRCPATH
12 $ echo "[convert]" >> $HGRCPATH
13 $ echo "cvsps.cache=0" >> $HGRCPATH
13 $ echo "cvsps.cache=0" >> $HGRCPATH
14
14
15 create cvs repository
15 create cvs repository
16
16
17 $ mkdir cvsrepo
17 $ mkdir cvsrepo
18 $ cd cvsrepo
18 $ cd cvsrepo
19 $ CVSROOT=`pwd`
19 $ CVSROOT=`pwd`
20 $ export CVSROOT
20 $ export CVSROOT
21 $ CVS_OPTIONS=-f
21 $ CVS_OPTIONS=-f
22 $ export CVS_OPTIONS
22 $ export CVS_OPTIONS
23 $ cd ..
23 $ cd ..
24 $ cvscall -q -d "$CVSROOT" init
24 $ cvscall -q -d "$CVSROOT" init
25
25
26 Create a new project
26 Create a new project
27
27
28 $ mkdir src
28 $ mkdir src
29 $ cd src
29 $ cd src
30 $ echo "1" > a
30 $ echo "1" > a
31 $ echo "1" > b
31 $ echo "1" > b
32 $ cvscall import -m "init" src v0 r0 | sort
32 $ cvscall import -m "init" src v0 r0 | sort
33 $ cd ..
33 $ cd ..
34 $ cvscall co src
34 $ cvscall co src
35 cvs checkout: Updating src
35 cvs checkout: Updating src
36 $ cd src
36 $ cd src
37
37
38 Branch the project
38 Branch the project
39
39
40 $ cvscall tag -b BRANCH
40 $ cvscall tag -b BRANCH
41 cvs tag: Tagging .
41 cvs tag: Tagging .
42 $ cvscall up -r BRANCH > /dev/null
42 $ cvscall up -r BRANCH > /dev/null
43 cvs update: Updating .
43 cvs update: Updating .
44
44
45 Modify file a, then b, then a
45 Modify file a, then b, then a
46
46
47 $ sleep 1
47 $ echo "2" > a
48 $ echo "2" > a
48 $ cvscall ci -m "mod a"
49 $ cvscall ci -m "mod a"
49 cvs commit: Examining .
50 cvs commit: Examining .
50 $ echo "2" > b
51 $ echo "2" > b
51 $ cvscall ci -m "mod b"
52 $ cvscall ci -m "mod b"
52 cvs commit: Examining .
53 cvs commit: Examining .
54 $ sleep 1
53 $ echo "3" > a
55 $ echo "3" > a
54 $ cvscall ci -m "mod a again"
56 $ cvscall ci -m "mod a again"
55 cvs commit: Examining .
57 cvs commit: Examining .
56
58
57 Convert
59 Convert
58
60
59 $ cd ..
61 $ cd ..
60 $ hg convert src
62 $ hg convert src
61 assuming destination src-hg
63 assuming destination src-hg
62 initializing destination src-hg repository
64 initializing destination src-hg repository
63 connecting to */cvsrepo (glob)
65 connecting to */cvsrepo (glob)
64 scanning source...
66 scanning source...
65 collecting CVS rlog
67 collecting CVS rlog
66 7 log entries
68 7 log entries
67 creating changesets
69 creating changesets
68 5 changeset entries
70 5 changeset entries
69 sorting...
71 sorting...
70 converting...
72 converting...
71 4 Initial revision
73 4 Initial revision
72 3 init
74 3 init
73 2 mod a
75 2 mod a
74 1 mod b
76 1 mod b
75 0 mod a again
77 0 mod a again
76 updating tags
78 updating tags
77
79
78 Check the result
80 Check the result
79
81
80 $ hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n'
82 $ hg -R src-hg glog --template '{rev} ({branches}) {desc} files: {files}\n'
81 o 5 () update tags files: .hgtags
83 o 5 () update tags files: .hgtags
82 |
84 |
83 | o 4 (BRANCH) mod a again files: a
85 | o 4 (BRANCH) mod a again files: a
84 | |
86 | |
85 | o 3 (BRANCH) mod b files: b
87 | o 3 (BRANCH) mod b files: b
86 | |
88 | |
87 | o 2 (BRANCH) mod a files: a
89 | o 2 (BRANCH) mod a files: a
88 | |
90 | |
89 | o 1 (v0) init files:
91 | o 1 (v0) init files:
90 |/
92 |/
91 o 0 () Initial revision files: a b
93 o 0 () Initial revision files: a b
92
94
93
95
94
96
95 issue 1447
97 issue 1447
96
98
97 $ cvscall()
99 $ cvscall()
98 > {
100 > {
99 > cvs -f "$@" > /dev/null
101 > cvs -f "$@" > /dev/null
100 > sleep 1
102 > sleep 1
101 > }
103 > }
102 $ cvsci()
104 $ cvsci()
103 > {
105 > {
104 > cvs -f ci "$@" >/dev/null
106 > cvs -f ci "$@" >/dev/null
105 > sleep 1
107 > sleep 1
106 > }
108 > }
107 $ cvscall -Q -d `pwd`/cvsmaster2 init
109 $ cvscall -Q -d `pwd`/cvsmaster2 init
108 $ cd cvsmaster2
110 $ cd cvsmaster2
109 $ CVSROOT=`pwd`
111 $ CVSROOT=`pwd`
110 $ export CVSROOT
112 $ export CVSROOT
111 $ mkdir foo
113 $ mkdir foo
112 $ cd ..
114 $ cd ..
113 $ cvscall -Q co -d cvswork2 foo
115 $ cvscall -Q co -d cvswork2 foo
114 $ cd cvswork2
116 $ cd cvswork2
115 $ echo foo > a.txt
117 $ echo foo > a.txt
116 $ echo bar > b.txt
118 $ echo bar > b.txt
117 $ cvscall -Q add a.txt b.txt
119 $ cvscall -Q add a.txt b.txt
118 $ cvsci -m "Initial commit"
120 $ cvsci -m "Initial commit"
119 cvs commit: Examining .
121 cvs commit: Examining .
120 $ echo foo > b.txt
122 $ echo foo > b.txt
121 $ cvsci -m "Fix b on HEAD"
123 $ cvsci -m "Fix b on HEAD"
122 cvs commit: Examining .
124 cvs commit: Examining .
123 $ echo bar > a.txt
125 $ echo bar > a.txt
124 $ cvsci -m "Small fix in a on HEAD"
126 $ cvsci -m "Small fix in a on HEAD"
125 cvs commit: Examining .
127 cvs commit: Examining .
126 $ cvscall -Q tag -b BRANCH
128 $ cvscall -Q tag -b BRANCH
127 $ cvscall -Q up -P -rBRANCH
129 $ cvscall -Q up -P -rBRANCH
128 $ echo baz > b.txt
130 $ echo baz > b.txt
129 $ cvsci -m "Change on BRANCH in b"
131 $ cvsci -m "Change on BRANCH in b"
130 cvs commit: Examining .
132 cvs commit: Examining .
131 $ hg debugcvsps -x --parents foo
133 $ hg debugcvsps -x --parents foo
132 collecting CVS rlog
134 collecting CVS rlog
133 5 log entries
135 5 log entries
134 creating changesets
136 creating changesets
135 4 changeset entries
137 4 changeset entries
136 ---------------------
138 ---------------------
137 PatchSet 1
139 PatchSet 1
138 Date: * (glob)
140 Date: * (glob)
139 Author: * (glob)
141 Author: * (glob)
140 Branch: HEAD
142 Branch: HEAD
141 Tag: (none)
143 Tag: (none)
142 Log:
144 Log:
143 Initial commit
145 Initial commit
144
146
145 Members:
147 Members:
146 a.txt:INITIAL->1.1
148 a.txt:INITIAL->1.1
147 b.txt:INITIAL->1.1
149 b.txt:INITIAL->1.1
148
150
149 ---------------------
151 ---------------------
150 PatchSet 2
152 PatchSet 2
151 Date: * (glob)
153 Date: * (glob)
152 Author: * (glob)
154 Author: * (glob)
153 Branch: HEAD
155 Branch: HEAD
154 Tag: (none)
156 Tag: (none)
155 Branchpoints: BRANCH
157 Branchpoints: BRANCH
156 Parent: 1
158 Parent: 1
157 Log:
159 Log:
158 Fix b on HEAD
160 Fix b on HEAD
159
161
160 Members:
162 Members:
161 b.txt:1.1->1.2
163 b.txt:1.1->1.2
162
164
163 ---------------------
165 ---------------------
164 PatchSet 3
166 PatchSet 3
165 Date: * (glob)
167 Date: * (glob)
166 Author: * (glob)
168 Author: * (glob)
167 Branch: HEAD
169 Branch: HEAD
168 Tag: (none)
170 Tag: (none)
169 Branchpoints: BRANCH
171 Branchpoints: BRANCH
170 Parent: 2
172 Parent: 2
171 Log:
173 Log:
172 Small fix in a on HEAD
174 Small fix in a on HEAD
173
175
174 Members:
176 Members:
175 a.txt:1.1->1.2
177 a.txt:1.1->1.2
176
178
177 ---------------------
179 ---------------------
178 PatchSet 4
180 PatchSet 4
179 Date: * (glob)
181 Date: * (glob)
180 Author: * (glob)
182 Author: * (glob)
181 Branch: BRANCH
183 Branch: BRANCH
182 Tag: (none)
184 Tag: (none)
183 Parent: 3
185 Parent: 3
184 Log:
186 Log:
185 Change on BRANCH in b
187 Change on BRANCH in b
186
188
187 Members:
189 Members:
188 b.txt:1.2->1.2.2.1
190 b.txt:1.2->1.2.2.1
189
191
190
192
General Comments 0
You need to be logged in to leave comments. Login now