Karsten Hopp f723aa
To: vim_dev@googlegroups.com
Karsten Hopp f723aa
Subject: Patch 7.3.216
Karsten Hopp f723aa
Fcc: outbox
Karsten Hopp f723aa
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f723aa
Mime-Version: 1.0
Karsten Hopp f723aa
Content-Type: text/plain; charset=UTF-8
Karsten Hopp f723aa
Content-Transfer-Encoding: 8bit
Karsten Hopp f723aa
------------
Karsten Hopp f723aa
Karsten Hopp f723aa
Patch 7.3.216
Karsten Hopp f723aa
Problem:    When recovering a file a range of lines is missing. (Charles Jie)
Karsten Hopp f723aa
Solution:   Reset the index when advancing to the next pointer block.  Add a
Karsten Hopp f723aa
            test to verify recovery works.
Karsten Hopp f723aa
Files:      src/memline.c, src/testdir/test78.in, src/testdir/test78.ok,
Karsten Hopp f723aa
            src/testdir/Makefile, src/testdir/Make_amiga.mak,
Karsten Hopp f723aa
            src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
Karsten Hopp f723aa
            src/testdir/Make_os2.mak, src/testdir/Make_vms.mms
Karsten Hopp f723aa
Karsten Hopp f723aa
Karsten Hopp f723aa
*** ../mercurial/vim73/src/memline.c	2011-05-10 16:41:13.000000000 +0200
Karsten Hopp f723aa
--- src/memline.c	2011-06-13 00:56:09.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 1507,1512 ****
Karsten Hopp f723aa
--- 1507,1513 ----
Karsten Hopp f723aa
  		    bnum = pp->pb_pointer[idx].pe_bnum;
Karsten Hopp f723aa
  		    line_count = pp->pb_pointer[idx].pe_line_count;
Karsten Hopp f723aa
  		    page_count = pp->pb_pointer[idx].pe_page_count;
Karsten Hopp f723aa
+ 		    idx = 0;
Karsten Hopp f723aa
  		    continue;
Karsten Hopp f723aa
  		}
Karsten Hopp f723aa
  	    }
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/test78.in	2011-06-13 01:05:54.000000000 +0200
Karsten Hopp f723aa
--- src/testdir/test78.in	2011-06-13 00:54:48.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 0 ****
Karsten Hopp f723aa
--- 1,46 ----
Karsten Hopp f723aa
+ Inserts 10000 lines with text to fill the swap file with two levels of pointer
Karsten Hopp f723aa
+ blocks.  Then recovers from the swap file and checks all text is restored.
Karsten Hopp f723aa
+ 
Karsten Hopp f723aa
+ We need about 10000 lines of 100 characters to get two levels of pointer
Karsten Hopp f723aa
+ blocks.
Karsten Hopp f723aa
+ 
Karsten Hopp f723aa
+ STARTTEST
Karsten Hopp f723aa
+ :so small.vim
Karsten Hopp f723aa
+ :set nocp fileformat=unix undolevels=-1
Karsten Hopp f723aa
+ :e! Xtest
Karsten Hopp f723aa
+ ggdG
Karsten Hopp f723aa
+ :let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789"
Karsten Hopp f723aa
+ :let i = 1
Karsten Hopp f723aa
+ :let linecount = 10000
Karsten Hopp f723aa
+ :while i <= linecount | call append(i - 1, i . text) | let i += 1 | endwhile
Karsten Hopp f723aa
+ :preserve
Karsten Hopp f723aa
+ :" get the name of the swap file
Karsten Hopp f723aa
+ :redir => swapname
Karsten Hopp f723aa
+ :swapname
Karsten Hopp f723aa
+ :redir END
Karsten Hopp f723aa
+ :let swapname = substitute(swapname, '[[:blank:][:cntrl:]]*\(.\{-}\)[[:blank:][:cntrl:]]*$', '\1', '')
Karsten Hopp f723aa
+ :" make a copy of the swap file in Xswap
Karsten Hopp f723aa
+ :set bin
Karsten Hopp f723aa
+ :exe 'sp ' . swapname
Karsten Hopp f723aa
+ :w! Xswap
Karsten Hopp f723aa
+ :echo swapname
Karsten Hopp f723aa
+ :set nobin
Karsten Hopp f723aa
+ :new
Karsten Hopp f723aa
+ :only!
Karsten Hopp f723aa
+ :bwipe! Xtest
Karsten Hopp f723aa
+ :call rename('Xswap', swapname)
Karsten Hopp f723aa
+ :recover Xtest
Karsten Hopp f723aa
+ :call delete(swapname)
Karsten Hopp f723aa
+ :new
Karsten Hopp f723aa
+ :call append(0, 'recovery start')
Karsten Hopp f723aa
+ :wincmd w
Karsten Hopp f723aa
+ :let linedollar = line('$')
Karsten Hopp f723aa
+ :if linedollar < linecount | exe 'wincmd w' | call append(line('$'), "expected " . linecount . " lines but found only " . linedollar) | exe 'wincmd w' | let linecount = linedollar | endif
Karsten Hopp f723aa
+ :let i = 1
Karsten Hopp f723aa
+ :while i <= linecount | if getline(i) != i . text | exe 'wincmd w' | call append(line('$'), i . ' differs') | exe 'wincmd w' | endif | let i += 1 | endwhile
Karsten Hopp f723aa
+ :q!
Karsten Hopp f723aa
+ :call append(line('$'), 'recovery end')
Karsten Hopp f723aa
+ :w! test.out
Karsten Hopp f723aa
+ :qa!
Karsten Hopp f723aa
+ ENDTEST
Karsten Hopp f723aa
+ 
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/test78.ok	2011-06-13 01:05:54.000000000 +0200
Karsten Hopp f723aa
--- src/testdir/test78.ok	2011-06-13 00:25:05.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 0 ****
Karsten Hopp f723aa
--- 1,3 ----
Karsten Hopp f723aa
+ recovery start
Karsten Hopp f723aa
+ 
Karsten Hopp f723aa
+ recovery end
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/Makefile	2011-03-22 18:10:34.000000000 +0100
Karsten Hopp f723aa
--- src/testdir/Makefile	2011-06-13 00:35:46.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 25,31 ****
Karsten Hopp f723aa
  		test59.out test60.out test61.out test62.out test63.out \
Karsten Hopp f723aa
  		test64.out test65.out test66.out test67.out test68.out \
Karsten Hopp f723aa
  		test69.out test70.out test71.out test72.out test73.out \
Karsten Hopp f723aa
! 		test74.out test75.out test76.out test77.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  SCRIPTS_GUI = test16.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
--- 25,31 ----
Karsten Hopp f723aa
  		test59.out test60.out test61.out test62.out test63.out \
Karsten Hopp f723aa
  		test64.out test65.out test66.out test67.out test68.out \
Karsten Hopp f723aa
  		test69.out test70.out test71.out test72.out test73.out \
Karsten Hopp f723aa
! 		test74.out test75.out test76.out test77.out test78.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  SCRIPTS_GUI = test16.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 71,77 ****
Karsten Hopp f723aa
  		  fi \
Karsten Hopp f723aa
  		else echo $* NO OUTPUT >>test.log; \
Karsten Hopp f723aa
  		fi"
Karsten Hopp f723aa
! #	-rm -rf X* test.ok viminfo
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  test49.out: test49.vim
Karsten Hopp f723aa
  
Karsten Hopp f723aa
--- 71,77 ----
Karsten Hopp f723aa
  		  fi \
Karsten Hopp f723aa
  		else echo $* NO OUTPUT >>test.log; \
Karsten Hopp f723aa
  		fi"
Karsten Hopp f723aa
! 	-rm -rf X* test.ok viminfo
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  test49.out: test49.vim
Karsten Hopp f723aa
  
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/Make_amiga.mak	2011-03-22 18:10:34.000000000 +0100
Karsten Hopp f723aa
--- src/testdir/Make_amiga.mak	2011-06-13 01:00:42.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 28,34 ****
Karsten Hopp f723aa
  		test61.out test62.out test63.out test64.out test65.out \
Karsten Hopp f723aa
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp f723aa
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp f723aa
! 		test76.out test77.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  .SUFFIXES: .in .out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
--- 28,34 ----
Karsten Hopp f723aa
  		test61.out test62.out test63.out test64.out test65.out \
Karsten Hopp f723aa
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp f723aa
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp f723aa
! 		test76.out test77.out test78.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  .SUFFIXES: .in .out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 125,127 ****
Karsten Hopp f723aa
--- 125,128 ----
Karsten Hopp f723aa
  test75.out: test75.in
Karsten Hopp f723aa
  test76.out: test76.in
Karsten Hopp f723aa
  test77.out: test77.in
Karsten Hopp f723aa
+ test78.out: test78.in
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/Make_dos.mak	2011-03-22 18:10:34.000000000 +0100
Karsten Hopp f723aa
--- src/testdir/Make_dos.mak	2011-06-13 01:00:55.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 28,34 ****
Karsten Hopp f723aa
  		test37.out test38.out test39.out test40.out test41.out \
Karsten Hopp f723aa
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp f723aa
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp f723aa
! 		test74.out test75.out test76.out test77.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
--- 28,34 ----
Karsten Hopp f723aa
  		test37.out test38.out test39.out test40.out test41.out \
Karsten Hopp f723aa
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp f723aa
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp f723aa
! 		test74.out test75.out test76.out test77.out test78.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/Make_ming.mak	2011-03-22 18:10:34.000000000 +0100
Karsten Hopp f723aa
--- src/testdir/Make_ming.mak	2011-06-13 01:01:02.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 48,54 ****
Karsten Hopp f723aa
  		test37.out test38.out test39.out test40.out test41.out \
Karsten Hopp f723aa
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp f723aa
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp f723aa
! 		test74.out test75.out test76.out test77.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
--- 48,54 ----
Karsten Hopp f723aa
  		test37.out test38.out test39.out test40.out test41.out \
Karsten Hopp f723aa
  		test42.out test52.out test65.out test66.out test67.out \
Karsten Hopp f723aa
  		test68.out test69.out test71.out test72.out test73.out \
Karsten Hopp f723aa
! 		test74.out test75.out test76.out test77.out test78.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  SCRIPTS32 =	test50.out test70.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/Make_os2.mak	2011-03-22 18:10:34.000000000 +0100
Karsten Hopp f723aa
--- src/testdir/Make_os2.mak	2011-06-13 01:01:08.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 28,34 ****
Karsten Hopp f723aa
  		test61.out test62.out test63.out test64.out test65.out \
Karsten Hopp f723aa
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp f723aa
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp f723aa
! 		test76.out test77.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  .SUFFIXES: .in .out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
--- 28,34 ----
Karsten Hopp f723aa
  		test61.out test62.out test63.out test64.out test65.out \
Karsten Hopp f723aa
  		test66.out test67.out test68.out test69.out test70.out \
Karsten Hopp f723aa
  		test71.out test72.out test73.out test74.out test75.out \
Karsten Hopp f723aa
! 		test76.out test77.out test78.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  .SUFFIXES: .in .out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
*** ../mercurial/vim73/src/testdir/Make_vms.mms	2011-04-28 19:05:01.000000000 +0200
Karsten Hopp f723aa
--- src/testdir/Make_vms.mms	2011-06-13 01:01:29.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 4,10 ****
Karsten Hopp f723aa
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp f723aa
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp f723aa
  #
Karsten Hopp f723aa
! # Last change:  2011 Mar 03
Karsten Hopp f723aa
  #
Karsten Hopp f723aa
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp f723aa
  # Edit the lines in the Configuration section below to select.
Karsten Hopp f723aa
--- 4,10 ----
Karsten Hopp f723aa
  # Authors:	Zoltan Arpadffy, <arpadffy@polarhome.com>
Karsten Hopp f723aa
  #		Sandor Kopanyi,  <sandor.kopanyi@mailbox.hu>
Karsten Hopp f723aa
  #
Karsten Hopp f723aa
! # Last change:  2011 Jun 13
Karsten Hopp f723aa
  #
Karsten Hopp f723aa
  # This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
Karsten Hopp f723aa
  # Edit the lines in the Configuration section below to select.
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 75,81 ****
Karsten Hopp f723aa
  	 test61.out test62.out test63.out test64.out test65.out \
Karsten Hopp f723aa
  	 test66.out test67.out test68.out test69.out \
Karsten Hopp f723aa
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp f723aa
! 	 test77.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  # Known problems:
Karsten Hopp f723aa
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp f723aa
--- 75,81 ----
Karsten Hopp f723aa
  	 test61.out test62.out test63.out test64.out test65.out \
Karsten Hopp f723aa
  	 test66.out test67.out test68.out test69.out \
Karsten Hopp f723aa
  	 test71.out test72.out test74.out test75.out test76.out \
Karsten Hopp f723aa
! 	 test77.out test78.out
Karsten Hopp f723aa
  
Karsten Hopp f723aa
  # Known problems:
Karsten Hopp f723aa
  # Test 30: a problem around mac format - unknown reason
Karsten Hopp f723aa
*** ../vim-7.3.215/src/version.c	2011-06-12 22:13:37.000000000 +0200
Karsten Hopp f723aa
--- src/version.c	2011-06-13 00:59:02.000000000 +0200
Karsten Hopp f723aa
***************
Karsten Hopp f723aa
*** 711,712 ****
Karsten Hopp f723aa
--- 711,714 ----
Karsten Hopp f723aa
  {   /* Add new patch number below this line */
Karsten Hopp f723aa
+ /**/
Karsten Hopp f723aa
+     216,
Karsten Hopp f723aa
  /**/
Karsten Hopp f723aa
Karsten Hopp f723aa
-- 
Karsten Hopp f723aa
hundred-and-one symptoms of being an internet addict:
Karsten Hopp f723aa
172. You join listservers just for the extra e-mail.
Karsten Hopp f723aa
Karsten Hopp f723aa
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f723aa
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f723aa
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp f723aa
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///