fix handling of bzr return values

This commit is contained in:
Marco Hinz 2013-04-06 20:14:11 +02:00
parent 48f0ec6f9e
commit 4f98661bf2

View File

@ -285,7 +285,7 @@ endfunction
function! s:repo_get_diff_bzr(path) abort function! s:repo_get_diff_bzr(path) abort
if executable('bzr') if executable('bzr')
let diff = system('bzr diff --using '. s:difftool .' --diff-options=-U0 -- '. s:escape(a:path)) let diff = system('bzr diff --using '. s:difftool .' --diff-options=-U0 -- '. s:escape(a:path))
return v:shell_error ? '' : diff return ((v:shell_error == 0) || (v:shell_error == 1) || (v:shell_error == 2)) ? diff : ''
endif endif
endfunction endfunction