Detect AccuRev controlled, but unmodified, files properly

"accurev diff" returns 0 for no diff, 1 for differences, and 2 for error
(like not being run from a workspace).  Use 2 to indicate the file isn't
being versioned by AccuRev so Sy properly sets the vcs type to AccuRev
for unmodified files.
This commit is contained in:
James McCoy 2016-03-31 10:12:22 -04:00
parent a02c8793bf
commit 6b4abcd754

View File

@ -76,7 +76,7 @@ endfunction
" Function: #get_diff_accurev {{{1 " Function: #get_diff_accurev {{{1
function! sy#repo#get_diff_accurev() abort function! sy#repo#get_diff_accurev() abort
let diff = s:run(g:signify_vcs_cmds.accurev, b:sy_info.file, 1) let diff = s:run(g:signify_vcs_cmds.accurev, b:sy_info.file, 1)
return (v:shell_error != 1) ? [0, ''] : [1, diff] return (v:shell_error == 2) ? [0, ''] : [1, diff]
endfunction endfunction
" Function: #get_diff_perforce {{{1 " Function: #get_diff_perforce {{{1