Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version 1.0.5

1) Fixed context format patch handling
2) minor *BSD detection improvement
  • Loading branch information...
commit 08f1755bd0653c760fde15ebdd5ccb9947a3b922 1 parent 10b17b0
@junkblocker junkblocker authored committed
View
25 autoload/patchreview.vim
@@ -1,7 +1,7 @@
" VIM plugin for doing single, multi-patch or diff code reviews {{{
" Home: http://www.vim.org/scripts/script.php?script_id=1563
-" Version : 1.0.4 {{{
+" Version : 1.0.5 {{{
" Author : Manpreet Singh < junkblocker@yahoo.com >
" Copyright : 2006-2012 by Manpreet Singh
" License : This file is placed in the public domain.
@@ -9,6 +9,9 @@
"
" Changelog :
"
+" 1.0.5 - Fixed context format patch handling
+" minor *BSD detection improvement
+"
" 1.0.4 - patchreview was broken in vim 7.2
"
" 1.0.3 - Perforce diff was skipping files added via branching
@@ -442,11 +445,11 @@ function! <SID>ExtractDiffs(lines, default_strip_count) "{{{
continue
endif
let l:collect += [l:line]
- PRState 'SKIP_CONTEXT_STUFF_1'
+ PRState 'READ_TILL_CONTEXT_FRAGMENT_2'
continue
" }}}
- elseif s:PRState() == 'SKIP_CONTEXT_STUFF_1' " {{{
- if l:line !~ '^[ !+].*$'
+ elseif s:PRState() == 'READ_TILL_CONTEXT_FRAGMENT_2' " {{{
+ if l:line !~ '^[ !+-] .*$'
let l:mat = matchlist(l:line, '^--- \(\d\+\),\(\d\+\) ----$')
if ! empty(l:mat) && l:mat[1] != '' && l:mat[2] != ''
let goal_count = l:mat[2] - l:mat[1] + 1
@@ -469,11 +472,17 @@ function! <SID>ExtractDiffs(lines, default_strip_count) "{{{
PRState 'BACKSLASH_OR_CRANGE_EOF'
continue
else " goal not met yet
- let l:mat = matchlist(l:line, '^\([\\!+ ]\).*$')
+ let l:mat = matchlist(l:line, '^\([\\!+ -]\) .*$')
if empty(l:mat) || l:mat[1] == ''
- let l:line_num -= 1
- PRState 'START'
- continue
+ if l:line =~ '^\*\{15}$'
+ let l:collect += [l:line]
+ PRState 'EXPECT_CONTEXT_CHUNK_HEADER_1'
+ continue
+ else
+ let l:line_num -= 1
+ PRState 'START'
+ continue
+ endif
endif
let l:collect += [l:line]
continue
View
2  doc/patchreview.txt
@@ -1,5 +1,5 @@
*patchreview.txt* Vim global plugin for doing single, multi-patch or diff code reviews
- Version 1.0.4 (for Vim version 7.0 or higher)
+ Version 1.0.5 (for Vim version 7.0 or higher)
Author: Manpreet Singh < junkblocker@yahoo.com >
Copyright (C) 2006-2011 by Manpreet Singh
View
4 plugin/patchreview.vim
@@ -1,7 +1,7 @@
" VIM plugin for doing single, multi-patch or diff code reviews {{{
" Home: http://www.vim.org/scripts/script.php?script_id=1563
-" Version : 1.0.4 " {{{
+" Version : 1.0.5 " {{{
" Author : Manpreet Singh < junkblocker@yahoo.com >
" Copyright : 2006-2012 by Manpreet Singh
" License : This file is placed in the public domain.
@@ -62,7 +62,7 @@
if &cp || (! exists('g:patchreview_debug') && exists('g:loaded_patchreview'))
finish
endif
-let g:loaded_patchreview="1.0.4"
+let g:loaded_patchreview="1.0.5"
if v:version < 700
echomsg 'patchreview: You need at least Vim 7.0'
finish
Please sign in to comment.
Something went wrong with that request. Please try again.