Skip to content

Commit

Permalink
Convert rejects to unified format if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
junkblocker committed Jan 7, 2013
1 parent b9011df commit 946e538
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
11 changes: 9 additions & 2 deletions autoload/patchreview.vim
@@ -1,14 +1,16 @@
" 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.5 {{{
" Version : 1.0.6 {{{
" Author : Manpreet Singh < junkblocker@yahoo.com >
" Copyright : 2006-2012 by Manpreet Singh
" Copyright : 2006-2013 by Manpreet Singh
" License : This file is placed in the public domain.
" No warranties express or implied. Use at your own risk.
"
" Changelog :
"
" 1.0.6 - Convert rejects to unified format if possible
"
" 1.0.5 - Fixed context format patch handling
" minor *BSD detection improvement
"
Expand Down Expand Up @@ -1060,6 +1062,11 @@ function! <SID>_GenericReview(argslist) "{{{
let s:keep_modeline=&modeline
let &modeline=0
silent! exe 'topleft split ' . fnameescape(l:tmp_patched_rej)
if getline(1) =~ '\m\*\{15}' && executable('filterdiff')
call append(0, '--- ' . l:stripped_rel_path . '.new')
call append(0, '*** ' . l:stripped_rel_path . '.old')
silent %!filterdiff --format=unified
endif
setlocal noswapfile
setlocal syntax=none
setlocal bufhidden=delete
Expand Down
4 changes: 2 additions & 2 deletions doc/patchreview.txt
@@ -1,8 +1,8 @@
*patchreview.txt* Vim global plugin for doing single, multi-patch or diff code reviews
Version 1.0.5 (for Vim version 7.0 or higher)
Version 1.0.6 (for Vim version 7.0 or higher)

Author: Manpreet Singh < junkblocker@yahoo.com >
Copyright (C) 2006-2011 by Manpreet Singh
Copyright (C) 2006-2013 by Manpreet Singh
License : This file is placed in the public domain.
=============================================================================
Expand Down
6 changes: 3 additions & 3 deletions plugin/patchreview.vim
@@ -1,9 +1,9 @@
" 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.5 " {{{
" Version : 1.0.6 " {{{
" Author : Manpreet Singh < junkblocker@yahoo.com >
" Copyright : 2006-2012 by Manpreet Singh
" Copyright : 2006-2013 by Manpreet Singh
" License : This file is placed in the public domain.
" No warranties express or implied. Use at your own risk.
"
Expand Down Expand Up @@ -62,7 +62,7 @@
if &cp || (! exists('g:patchreview_debug') && exists('g:loaded_patchreview'))
finish
endif
let g:loaded_patchreview="1.0.5"
let g:loaded_patchreview="1.0.6"
if v:version < 700
echomsg 'patchreview: You need at least Vim 7.0'
finish
Expand Down

0 comments on commit 946e538

Please sign in to comment.