##// END OF EJS Templates
tests: fix up date ambiguity in cvs test
Matt Mackall -
r14569:017ab404 default
parent child Browse files
Show More
@@ -1,234 +1,232 b''
1 1 Test config convert.cvsps.mergefrom config setting.
2 2 (Should test similar mergeto feature, but I don't understand it yet.)
3 3 Requires builtin cvsps.
4 4
5 5 $ "$TESTDIR/hghave" cvs || exit 80
6 6 $ CVSROOT=`pwd`/cvsrepo
7 7 $ export CVSROOT
8 8
9 9 $ cvscall()
10 10 > {
11 11 > cvs -f "$@"
12 12 > }
13 13
14 14 output of 'cvs ci' varies unpredictably, so just discard it
15 15 XXX copied from test-convert-cvs-synthetic
16 16
17 17 $ cvsci()
18 18 > {
19 > sleep 1
19 20 > cvs -f ci "$@" > /dev/null
20 21 > }
21 22
22 23 XXX copied from test-convert-cvs-synthetic
23 24
24 25 $ echo "[extensions]" >> $HGRCPATH
25 26 $ echo "convert = " >> $HGRCPATH
26 27 $ echo "graphlog = " >> $HGRCPATH
27 28 $ echo "[convert]" >> $HGRCPATH
28 29 $ echo "cvsps.cache=0" >> $HGRCPATH
29 30 $ echo "cvsps.mergefrom=\[MERGE from (\S+)\]" >> $HGRCPATH
30 31
31 32 create cvs repository with one project
32 33
33 34 $ mkdir cvsrepo
34 35 $ cvscall -q -d "$CVSROOT" init
35 36 $ mkdir cvsrepo/proj
36 37
37 38 populate cvs repository
38 39
39 40 $ cvscall -Q co proj
40 41 $ cd proj
41 42 $ touch file1
42 43 $ cvscall -Q add file1
43 44 $ cvsci -m"add file1 on trunk"
44 45 cvs commit: Examining .
45 46
46 47 create two release branches
47 48
48 49 $ cvscall -q tag -b v1_0
49 50 T file1
50 51 $ cvscall -q tag -b v1_1
51 52 T file1
52 53
53 54 modify file1 on branch v1_0
54 55
55 56 $ cvscall -Q update -rv1_0
56 $ sleep 1
57 57 $ echo "change" >> file1
58 58 $ cvsci -m"add text"
59 59 cvs commit: Examining .
60 60
61 61 make unrelated change on v1_1
62 62
63 63 $ cvscall -Q update -rv1_1
64 64 $ touch unrelated
65 65 $ cvscall -Q add unrelated
66 66 $ cvsci -m"unrelated change"
67 67 cvs commit: Examining .
68 68
69 69 merge file1 to v1_1
70 70
71 71 $ cvscall -Q update -jv1_0
72 72 RCS file: $TESTTMP/cvsrepo/proj/file1,v
73 73 retrieving revision 1.1
74 74 retrieving revision 1.1.2.1
75 75 Merging differences between 1.1 and 1.1.2.1 into file1
76 76 $ cvsci -m"add text [MERGE from v1_0]"
77 77 cvs commit: Examining .
78 78
79 79 merge change to trunk
80 80
81 81 $ cvscall -Q update -A
82 82 $ cvscall -Q update -jv1_1
83 83 RCS file: $TESTTMP/cvsrepo/proj/file1,v
84 84 retrieving revision 1.1
85 85 retrieving revision 1.1.4.1
86 86 Merging differences between 1.1 and 1.1.4.1 into file1
87 87 $ cvsci -m"add text [MERGE from v1_1]"
88 88 cvs commit: Examining .
89 89
90 90 non-merged change on trunk
91 91
92 92 $ echo "foo" > file2
93 93 $ cvscall -Q add file2
94 94 $ cvsci -m"add file2 on trunk" file2
95 95
96 96 this will create rev 1.3
97 97 change on trunk to backport
98 98
99 $ sleep 1
100 99 $ echo "backport me" >> file1
101 100 $ cvsci -m"add other text" file1
102 101 $ cvscall log file1
103 102
104 103 RCS file: $TESTTMP/cvsrepo/proj/file1,v
105 104 Working file: file1
106 105 head: 1.3
107 106 branch:
108 107 locks: strict
109 108 access list:
110 109 symbolic names:
111 110 v1_1: 1.1.0.4
112 111 v1_0: 1.1.0.2
113 112 keyword substitution: kv
114 113 total revisions: 5; selected revisions: 5
115 114 description:
116 115 ----------------------------
117 116 revision 1.3
118 117 date: * (glob)
119 118 add other text
120 119 ----------------------------
121 120 revision 1.2
122 121 date: * (glob)
123 122 add text [MERGE from v1_1]
124 123 ----------------------------
125 124 revision 1.1
126 125 date: * (glob)
127 126 branches: 1.1.2; 1.1.4;
128 127 add file1 on trunk
129 128 ----------------------------
130 129 revision 1.1.4.1
131 130 date: * (glob)
132 131 add text [MERGE from v1_0]
133 132 ----------------------------
134 133 revision 1.1.2.1
135 134 date: * (glob)
136 135 add text
137 136 =============================================================================
138 137
139 138 XXX how many ways are there to spell "trunk" with CVS?
140 139 backport trunk change to v1_1
141 140
142 141 $ cvscall -Q update -rv1_1
143 142 $ cvscall -Q update -j1.2 -j1.3 file1
144 143 RCS file: $TESTTMP/cvsrepo/proj/file1,v
145 144 retrieving revision 1.2
146 145 retrieving revision 1.3
147 146 Merging differences between 1.2 and 1.3 into file1
148 147 $ cvsci -m"add other text [MERGE from HEAD]" file1
149 148
150 149 fix bug on v1_1, merge to trunk with error
151 150
152 151 $ cvscall -Q update -rv1_1
153 $ sleep 1
154 152 $ echo "merge forward" >> file1
155 153 $ cvscall -Q tag unmerged
156 154 $ cvsci -m"fix file1"
157 155 cvs commit: Examining .
158 156 $ cvscall -Q update -A
159 157 $ cvscall -Q update -junmerged -jv1_1
160 158 RCS file: $TESTTMP/cvsrepo/proj/file1,v
161 159 retrieving revision 1.1.4.2
162 160 retrieving revision 1.1.4.3
163 161 Merging differences between 1.1.4.2 and 1.1.4.3 into file1
164 162
165 163 note the typo in the commit log message
166 164
167 165 $ cvsci -m"fix file1 [MERGE from v1-1]"
168 166 cvs commit: Examining .
169 167 $ cvs -Q tag -d unmerged
170 168
171 169 convert to hg
172 170
173 171 $ cd ..
174 172 $ hg convert proj proj.hg
175 173 initializing destination proj.hg repository
176 174 connecting to $TESTTMP/cvsrepo
177 175 scanning source...
178 176 collecting CVS rlog
179 177 12 log entries
180 178 creating changesets
181 179 warning: CVS commit message references non-existent branch 'v1-1':
182 180 fix file1 [MERGE from v1-1]
183 181 10 changeset entries
184 182 sorting...
185 183 converting...
186 184 9 add file1 on trunk
187 185 8 add text
188 186 7 unrelated change
189 187 6 add text [MERGE from v1_0]
190 188 5 add text [MERGE from v1_1]
191 189 4 add file2 on trunk
192 190 3 add other text
193 191 2 add other text [MERGE from HEAD]
194 192 1 fix file1
195 193 0 fix file1 [MERGE from v1-1]
196 194
197 195 complete log
198 196
199 197 $ template="{rev}: '{branches}' {desc}\n"
200 198 $ hg -R proj.hg log --template="$template"
201 199 9: '' fix file1 [MERGE from v1-1]
202 200 8: 'v1_1' fix file1
203 201 7: 'v1_1' add other text [MERGE from HEAD]
204 202 6: '' add other text
205 203 5: '' add file2 on trunk
206 204 4: '' add text [MERGE from v1_1]
207 205 3: 'v1_1' add text [MERGE from v1_0]
208 206 2: 'v1_1' unrelated change
209 207 1: 'v1_0' add text
210 208 0: '' add file1 on trunk
211 209
212 210 graphical log
213 211
214 212 $ hg -R proj.hg glog --template="$template"
215 213 o 9: '' fix file1 [MERGE from v1-1]
216 214 |
217 215 | o 8: 'v1_1' fix file1
218 216 | |
219 217 | o 7: 'v1_1' add other text [MERGE from HEAD]
220 218 |/|
221 219 o | 6: '' add other text
222 220 | |
223 221 o | 5: '' add file2 on trunk
224 222 | |
225 223 o | 4: '' add text [MERGE from v1_1]
226 224 |\|
227 225 | o 3: 'v1_1' add text [MERGE from v1_0]
228 226 | |\
229 227 +---o 2: 'v1_1' unrelated change
230 228 | |
231 229 | o 1: 'v1_0' add text
232 230 |/
233 231 o 0: '' add file1 on trunk
234 232
General Comments 0
You need to be logged in to leave comments. Login now