]>
Commit | Line | Data |
---|---|---|
a2e11672 AG |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.216 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.216 | |
11 | Problem: When recovering a file a range of lines is missing. (Charles Jie) | |
12 | Solution: Reset the index when advancing to the next pointer block. Add a | |
13 | test to verify recovery works. | |
14 | Files: src/memline.c, src/testdir/test78.in, src/testdir/test78.ok, | |
15 | src/testdir/Makefile, src/testdir/Make_amiga.mak, | |
16 | src/testdir/Make_dos.mak, src/testdir/Make_ming.mak, | |
17 | src/testdir/Make_os2.mak, src/testdir/Make_vms.mms | |
18 | ||
19 | ||
20 | *** ../mercurial/vim73/src/memline.c 2011-05-10 16:41:13.000000000 +0200 | |
21 | --- src/memline.c 2011-06-13 00:56:09.000000000 +0200 | |
22 | *************** | |
23 | *** 1507,1512 **** | |
24 | --- 1507,1513 ---- | |
25 | bnum = pp->pb_pointer[idx].pe_bnum; | |
26 | line_count = pp->pb_pointer[idx].pe_line_count; | |
27 | page_count = pp->pb_pointer[idx].pe_page_count; | |
28 | + idx = 0; | |
29 | continue; | |
30 | } | |
31 | } | |
32 | *** ../mercurial/vim73/src/testdir/test78.in 2011-06-13 01:05:54.000000000 +0200 | |
33 | --- src/testdir/test78.in 2011-06-13 00:54:48.000000000 +0200 | |
34 | *************** | |
35 | *** 0 **** | |
36 | --- 1,46 ---- | |
37 | + Inserts 10000 lines with text to fill the swap file with two levels of pointer | |
38 | + blocks. Then recovers from the swap file and checks all text is restored. | |
39 | + | |
40 | + We need about 10000 lines of 100 characters to get two levels of pointer | |
41 | + blocks. | |
42 | + | |
43 | + STARTTEST | |
44 | + :so small.vim | |
45 | + :set nocp fileformat=unix undolevels=-1 | |
46 | + :e! Xtest | |
47 | + ggdG | |
48 | + :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789" | |
49 | + :let i = 1 | |
50 | + :let linecount = 10000 | |
51 | + :while i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile | |
52 | + :preserve | |
53 | + :" get the name of the swap file | |
54 | + :redir => swapname | |
55 | + :swapname | |
56 | + :redir END | |
57 | + :let swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1', '') | |
58 | + :" make a copy of the swap file in Xswap | |
59 | + :set bin | |
60 | + :exe 'sp ' . swapname | |
61 | + :w! Xswap | |
62 | + :echo swapname | |
63 | + :set nobin | |
64 | + :new | |
65 | + :only! | |
66 | + :bwipe! Xtest | |
67 | + :call rename('Xswap', swapname) | |
68 | + :recover Xtest | |
69 | + :call delete(swapname) | |
70 | + :new | |
71 | + :call append(0, 'recovery start') | |
72 | + :wincmd w | |
73 | + :let linedollar = line('$') | |
74 | + :if linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " lines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif | |
75 | + :let i = 1 | |
76 | + :while i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . ' differs') | exe 'wincmd w' | endif | let i += 1 | endwhile | |
77 | + :q! | |
78 | + :call append(line('$'), 'recovery end') | |
79 | + :w! test.out | |
80 | + :qa! | |
81 | + ENDTEST | |
82 | + | |
83 | *** ../mercurial/vim73/src/testdir/test78.ok 2011-06-13 01:05:54.000000000 +0200 | |
84 | --- src/testdir/test78.ok 2011-06-13 00:25:05.000000000 +0200 | |
85 | *************** | |
86 | *** 0 **** | |
87 | --- 1,3 ---- | |
88 | + recovery start | |
89 | + | |
90 | + recovery end | |
91 | *** ../mercurial/vim73/src/testdir/Makefile 2011-03-22 18:10:34.000000000 +0100 | |
92 | --- src/testdir/Makefile 2011-06-13 00:35:46.000000000 +0200 | |
93 | *************** | |
94 | *** 25,31 **** | |
95 | test59.out test60.out test61.out test62.out test63.out \ | |
96 | test64.out test65.out test66.out test67.out test68.out \ | |
97 | test69.out test70.out test71.out test72.out test73.out \ | |
98 | ! test74.out test75.out test76.out test77.out | |
99 | ||
100 | SCRIPTS_GUI = test16.out | |
101 | ||
102 | --- 25,31 ---- | |
103 | test59.out test60.out test61.out test62.out test63.out \ | |
104 | test64.out test65.out test66.out test67.out test68.out \ | |
105 | test69.out test70.out test71.out test72.out test73.out \ | |
106 | ! test74.out test75.out test76.out test77.out test78.out | |
107 | ||
108 | SCRIPTS_GUI = test16.out | |
109 | ||
110 | *************** | |
111 | *** 71,77 **** | |
112 | fi \ | |
113 | else echo $* NO OUTPUT >>test.log; \ | |
114 | fi" | |
115 | ! # -rm -rf X* test.ok viminfo | |
116 | ||
117 | test49.out: test49.vim | |
118 | ||
119 | --- 71,77 ---- | |
120 | fi \ | |
121 | else echo $* NO OUTPUT >>test.log; \ | |
122 | fi" | |
123 | ! -rm -rf X* test.ok viminfo | |
124 | ||
125 | test49.out: test49.vim | |
126 | ||
127 | *** ../mercurial/vim73/src/testdir/Make_amiga.mak 2011-03-22 18:10:34.000000000 +0100 | |
128 | --- src/testdir/Make_amiga.mak 2011-06-13 01:00:42.000000000 +0200 | |
129 | *************** | |
130 | *** 28,34 **** | |
131 | test61.out test62.out test63.out test64.out test65.out \ | |
132 | test66.out test67.out test68.out test69.out test70.out \ | |
133 | test71.out test72.out test73.out test74.out test75.out \ | |
134 | ! test76.out test77.out | |
135 | ||
136 | .SUFFIXES: .in .out | |
137 | ||
138 | --- 28,34 ---- | |
139 | test61.out test62.out test63.out test64.out test65.out \ | |
140 | test66.out test67.out test68.out test69.out test70.out \ | |
141 | test71.out test72.out test73.out test74.out test75.out \ | |
142 | ! test76.out test77.out test78.out | |
143 | ||
144 | .SUFFIXES: .in .out | |
145 | ||
146 | *************** | |
147 | *** 125,127 **** | |
148 | --- 125,128 ---- | |
149 | test75.out: test75.in | |
150 | test76.out: test76.in | |
151 | test77.out: test77.in | |
152 | + test78.out: test78.in | |
153 | *** ../mercurial/vim73/src/testdir/Make_dos.mak 2011-03-22 18:10:34.000000000 +0100 | |
154 | --- src/testdir/Make_dos.mak 2011-06-13 01:00:55.000000000 +0200 | |
155 | *************** | |
156 | *** 28,34 **** | |
157 | test37.out test38.out test39.out test40.out test41.out \ | |
158 | test42.out test52.out test65.out test66.out test67.out \ | |
159 | test68.out test69.out test71.out test72.out test73.out \ | |
160 | ! test74.out test75.out test76.out test77.out | |
161 | ||
162 | SCRIPTS32 = test50.out test70.out | |
163 | ||
164 | --- 28,34 ---- | |
165 | test37.out test38.out test39.out test40.out test41.out \ | |
166 | test42.out test52.out test65.out test66.out test67.out \ | |
167 | test68.out test69.out test71.out test72.out test73.out \ | |
168 | ! test74.out test75.out test76.out test77.out test78.out | |
169 | ||
170 | SCRIPTS32 = test50.out test70.out | |
171 | ||
172 | *** ../mercurial/vim73/src/testdir/Make_ming.mak 2011-03-22 18:10:34.000000000 +0100 | |
173 | --- src/testdir/Make_ming.mak 2011-06-13 01:01:02.000000000 +0200 | |
174 | *************** | |
175 | *** 48,54 **** | |
176 | test37.out test38.out test39.out test40.out test41.out \ | |
177 | test42.out test52.out test65.out test66.out test67.out \ | |
178 | test68.out test69.out test71.out test72.out test73.out \ | |
179 | ! test74.out test75.out test76.out test77.out | |
180 | ||
181 | SCRIPTS32 = test50.out test70.out | |
182 | ||
183 | --- 48,54 ---- | |
184 | test37.out test38.out test39.out test40.out test41.out \ | |
185 | test42.out test52.out test65.out test66.out test67.out \ | |
186 | test68.out test69.out test71.out test72.out test73.out \ | |
187 | ! test74.out test75.out test76.out test77.out test78.out | |
188 | ||
189 | SCRIPTS32 = test50.out test70.out | |
190 | ||
191 | *** ../mercurial/vim73/src/testdir/Make_os2.mak 2011-03-22 18:10:34.000000000 +0100 | |
192 | --- src/testdir/Make_os2.mak 2011-06-13 01:01:08.000000000 +0200 | |
193 | *************** | |
194 | *** 28,34 **** | |
195 | test61.out test62.out test63.out test64.out test65.out \ | |
196 | test66.out test67.out test68.out test69.out test70.out \ | |
197 | test71.out test72.out test73.out test74.out test75.out \ | |
198 | ! test76.out test77.out | |
199 | ||
200 | .SUFFIXES: .in .out | |
201 | ||
202 | --- 28,34 ---- | |
203 | test61.out test62.out test63.out test64.out test65.out \ | |
204 | test66.out test67.out test68.out test69.out test70.out \ | |
205 | test71.out test72.out test73.out test74.out test75.out \ | |
206 | ! test76.out test77.out test78.out | |
207 | ||
208 | .SUFFIXES: .in .out | |
209 | ||
210 | *** ../mercurial/vim73/src/testdir/Make_vms.mms 2011-04-28 19:05:01.000000000 +0200 | |
211 | --- src/testdir/Make_vms.mms 2011-06-13 01:01:29.000000000 +0200 | |
212 | *************** | |
213 | *** 4,10 **** | |
214 | # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> | |
215 | # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> | |
216 | # | |
217 | ! # Last change: 2011 Mar 03 | |
218 | # | |
219 | # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. | |
220 | # Edit the lines in the Configuration section below to select. | |
221 | --- 4,10 ---- | |
222 | # Authors: Zoltan Arpadffy, <arpadffy@polarhome.com> | |
223 | # Sandor Kopanyi, <sandor.kopanyi@mailbox.hu> | |
224 | # | |
225 | ! # Last change: 2011 Jun 13 | |
226 | # | |
227 | # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64. | |
228 | # Edit the lines in the Configuration section below to select. | |
229 | *************** | |
230 | *** 75,81 **** | |
231 | test61.out test62.out test63.out test64.out test65.out \ | |
232 | test66.out test67.out test68.out test69.out \ | |
233 | test71.out test72.out test74.out test75.out test76.out \ | |
234 | ! test77.out | |
235 | ||
236 | # Known problems: | |
237 | # Test 30: a problem around mac format - unknown reason | |
238 | --- 75,81 ---- | |
239 | test61.out test62.out test63.out test64.out test65.out \ | |
240 | test66.out test67.out test68.out test69.out \ | |
241 | test71.out test72.out test74.out test75.out test76.out \ | |
242 | ! test77.out test78.out | |
243 | ||
244 | # Known problems: | |
245 | # Test 30: a problem around mac format - unknown reason | |
246 | *** ../vim-7.3.215/src/version.c 2011-06-12 22:13:37.000000000 +0200 | |
247 | --- src/version.c 2011-06-13 00:59:02.000000000 +0200 | |
248 | *************** | |
249 | *** 711,712 **** | |
250 | --- 711,714 ---- | |
251 | { /* Add new patch number below this line */ | |
252 | + /**/ | |
253 | + 216, | |
254 | /**/ | |
255 | ||
256 | -- | |
257 | hundred-and-one symptoms of being an internet addict: | |
258 | 172. You join listservers just for the extra e-mail. | |
259 | ||
260 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
261 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
262 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
263 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |