Merge lp:~adam-buchbinder/ubuntu/lucid/vim/vim-large-file-recovery into lp:ubuntu/lucid/vim

Proposed by Adam Buchbinder on 2012-09-30
Status: Merged
Merge reported by: Marc Deslauriers
Merged at revision: not available
Proposed branch: lp:~adam-buchbinder/ubuntu/lucid/vim/vim-large-file-recovery
Merge into: lp:ubuntu/lucid/vim
Diff against target: 162 lines (+70/-5)
9 files modified
debian/changelog (+14/-0)
src/memline.c (+1/-0)
src/testdir/Make_amiga.mak (+2/-1)
src/testdir/Make_dos.mak (+1/-1)
src/testdir/Make_ming.mak (+1/-1)
src/testdir/Make_vms.mms (+1/-1)
src/testdir/Makefile (+1/-1)
src/testdir/test70.in (+46/-0)
src/testdir/test70.ok (+3/-0)
To merge this branch: bzr merge lp:~adam-buchbinder/ubuntu/lucid/vim/vim-large-file-recovery
Reviewer Review Type Date Requested Status
Marc Deslauriers Approve on 2012-11-07
Adam Buchbinder (community) Resubmit on 2012-10-15
Jamie Strandboge 2012-09-30 Needs Fixing on 2012-10-15
Review via email: mp+127161@code.launchpad.net

Description of the Change

vim (2:7.2.330-1ubuntu2.1) lucid-proposed; urgency=low

  * Backported upstream patch 7.3.216 (LP: #1059085):
    - src/memline.c: Avoid corruption on large-file recovery.
    - src/testdir/test70.in, src/testdir/test70.ok:
      Test large-file recovery.
    - src/testdir/Makefile, src/testdir/Make_amiga.mak,
      src/testdir/Make_dos.mak, src/testdir/Make_os2.mak,
      src/testdir/Make_vms.mms: Update Makefiles to include new tests.

 -- Adam Buchbinder <email address hidden> Sun, 30 Sep 2012 10:44:38 -0400

To post a comment you must log in.
Jamie Strandboge (jdstrand) wrote :

Thanks for your patch! In general it looks ok, but the changelog lacks the origins of the patch, which makes it difficult to review the patch against upstream. Normally we would use DEP-3 comments in the patch in debian/patches itself, but because vim on Ubuntu 10.04 LTS does not use a patch system, this information should be included in the debian/changelog. Can you resubmit with this information? Thanks!

review: Needs Fixing
Adam Buchbinder (adam-buchbinder) wrote :

Googling "vim 7.3.216", the first link is the upstream patch. I'll add a link to the Groups post.

59. By Adam Buchbinder on 2012-10-15

Backported upstream patch 7.3.216 from
https://groups.google.com/d/topic/vim_dev/lTos-bGcNgU/discussion
(LP: #1059085):

Adam Buchbinder (adam-buchbinder) wrote :

Is that a better description?

review: Resubmit
Marc Deslauriers (mdeslaur) wrote :

Looks good. ACK. Uploading to lucid-proposed for processing by the SRU team.

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-03-08 22:08:26 +0000
3+++ debian/changelog 2012-10-15 21:11:20 +0000
4@@ -1,3 +1,17 @@
5+vim (2:7.2.330-1ubuntu2.1) lucid-proposed; urgency=low
6+
7+ * Backported upstream patch 7.3.216 from
8+ https://groups.google.com/d/topic/vim_dev/lTos-bGcNgU/discussion
9+ (LP: #1059085):
10+ - src/memline.c: Avoid corruption on large-file recovery.
11+ - src/testdir/test70.in, src/testdir/test70.ok:
12+ Test large-file recovery.
13+ - src/testdir/Makefile, src/testdir/Make_amiga.mak,
14+ src/testdir/Make_dos.mak, src/testdir/Make_os2.mak,
15+ src/testdir/Make_vms.mms: Update Makefiles to include new tests.
16+
17+ -- Adam Buchbinder <adam.buchbinder@gmail.com> Sun, 30 Sep 2012 10:44:38 -0400
18+
19 vim (2:7.2.330-1ubuntu2) lucid; urgency=low
20
21 * debian/rules: Temporarily disable parallel building until we figure out
22
23=== modified file 'src/memline.c'
24--- src/memline.c 2010-03-07 10:46:34 +0000
25+++ src/memline.c 2012-10-15 21:11:20 +0000
26@@ -1236,6 +1236,7 @@
27 bnum = pp->pb_pointer[idx].pe_bnum;
28 line_count = pp->pb_pointer[idx].pe_line_count;
29 page_count = pp->pb_pointer[idx].pe_page_count;
30+ idx = 0;
31 continue;
32 }
33 }
34
35=== modified file 'src/testdir/Make_amiga.mak'
36--- src/testdir/Make_amiga.mak 2010-03-07 10:46:34 +0000
37+++ src/testdir/Make_amiga.mak 2012-10-15 21:11:20 +0000
38@@ -26,7 +26,7 @@
39 test48.out test51.out test53.out test54.out test55.out \
40 test56.out test57.out test58.out test59.out test60.out \
41 test61.out test62.out test63.out test64.out test65.out \
42- test66.out test67.out test68.out test69.out
43+ test66.out test67.out test68.out test69.out test70.out
44
45 .SUFFIXES: .in .out
46
47@@ -115,3 +115,4 @@
48 test67.out: test67.in
49 test68.out: test68.in
50 test69.out: test69.in
51+test70.out: test70.in
52
53=== modified file 'src/testdir/Make_dos.mak'
54--- src/testdir/Make_dos.mak 2010-03-07 10:46:34 +0000
55+++ src/testdir/Make_dos.mak 2012-10-15 21:11:20 +0000
56@@ -27,7 +27,7 @@
57 test30.out test31.out test32.out test33.out test34.out \
58 test37.out test38.out test39.out test40.out test41.out \
59 test42.out test52.out test65.out test66.out test67.out \
60- test68.out test69.out
61+ test68.out test69.out test70.out
62
63 SCRIPTS32 = test50.out
64
65
66=== modified file 'src/testdir/Make_ming.mak'
67--- src/testdir/Make_ming.mak 2010-03-07 10:46:34 +0000
68+++ src/testdir/Make_ming.mak 2012-10-15 21:11:20 +0000
69@@ -46,7 +46,7 @@
70 test30.out test31.out test32.out test33.out test34.out \
71 test37.out test38.out test39.out test40.out test41.out \
72 test42.out test52.out test65.out test66.out test67.out \
73- test68.out test69.out
74+ test68.out test69.out test70.out
75
76 SCRIPTS32 = test50.out
77
78
79=== modified file 'src/testdir/Make_vms.mms'
80--- src/testdir/Make_vms.mms 2010-03-07 10:46:34 +0000
81+++ src/testdir/Make_vms.mms 2012-10-15 21:11:20 +0000
82@@ -69,7 +69,7 @@
83 test48.out test51.out test53.out test54.out test55.out \
84 test56.out test57.out test60.out \
85 test61.out test62.out test63.out test64.out test65.out \
86- test66.out test67.out test68.out test69.out
87+ test66.out test67.out test68.out test69.out test70.out
88
89 .IFDEF WANT_GUI
90 SCRIPT_GUI = test16.out
91
92=== modified file 'src/testdir/Makefile'
93--- src/testdir/Makefile 2010-03-07 10:46:34 +0000
94+++ src/testdir/Makefile 2012-10-15 21:11:20 +0000
95@@ -23,7 +23,7 @@
96 test54.out test55.out test56.out test57.out test58.out \
97 test59.out test60.out test61.out test62.out test63.out \
98 test64.out test65.out test66.out test67.out test68.out \
99- test69.out
100+ test69.out test70.out
101
102 SCRIPTS_GUI = test16.out
103
104
105=== added file 'src/testdir/test70.in'
106--- src/testdir/test70.in 1970-01-01 00:00:00 +0000
107+++ src/testdir/test70.in 2012-10-15 21:11:20 +0000
108@@ -0,0 +1,46 @@
109+Inserts 10000 lines with text to fill the swap file with two levels of pointer
110+blocks. Then recovers from the swap file and checks all text is restored.
111+
112+We need about 10000 lines of 100 characters to get two levels of pointer
113+blocks.
114+
115+STARTTEST
116+:so small.vim
117+:set nocp fileformat=unix undolevels=-1
118+:e! Xtest
119+ggdG
120+:let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789"
121+:let i = 1
122+:let linecount = 10000
123+:while i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile
124+:preserve
125+:" get the name of the swap file
126+:redir => swapname
127+:swapname
128+:redir END
129+:let swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1', '')
130+:" make a copy of the swap file in Xswap
131+:set bin
132+:exe 'sp ' . swapname
133+:w! Xswap
134+:echo swapname
135+:set nobin
136+:new
137+:only!
138+:bwipe! Xtest
139+:call rename('Xswap', swapname)
140+:recover Xtest
141+:call delete(swapname)
142+:new
143+:call append(0, 'recovery start')
144+:wincmd w
145+:let linedollar = line('$')
146+:if linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " lines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif
147+:let i = 1
148+:while i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . ' differs') | exe 'wincmd w' | endif | let i += 1 | endwhile
149+:q!
150+:call append(line('$'), 'recovery end')
151+:w! test.out
152+:qa!
153+ENDTEST
154+
155
156=== added file 'src/testdir/test70.ok'
157--- src/testdir/test70.ok 1970-01-01 00:00:00 +0000
158+++ src/testdir/test70.ok 2012-10-15 21:11:20 +0000
159@@ -0,0 +1,3 @@
160+recovery start
161+
162+recovery end

Subscribers

People subscribed via source and target branches

to all changes: