Add experimental perforce support
This commit is contained in:
parent
c4df9a3895
commit
747e12aed3
@ -26,7 +26,7 @@ endif
|
|||||||
|
|
||||||
" Function: #detect {{{1
|
" Function: #detect {{{1
|
||||||
function! sy#repo#detect(path) abort
|
function! sy#repo#detect(path) abort
|
||||||
for type in get(g:, 'signify_vcs_list', [ 'git', 'hg', 'svn', 'darcs', 'bzr', 'fossil', 'cvs', 'rcs', 'accurev' ])
|
for type in get(g:, 'signify_vcs_list', [ 'git', 'hg', 'svn', 'darcs', 'bzr', 'fossil', 'cvs', 'rcs', 'accurev', 'perforce' ])
|
||||||
let diff = sy#repo#get_diff_{type}(a:path)
|
let diff = sy#repo#get_diff_{type}(a:path)
|
||||||
if !empty(diff)
|
if !empty(diff)
|
||||||
return [ diff, type ]
|
return [ diff, type ]
|
||||||
@ -139,6 +139,14 @@ function! sy#repo#get_diff_accurev(path) abort
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Function: #get_diff_perforce {{{1
|
||||||
|
function! sy#repo#get_diff_perforce(path) abort
|
||||||
|
if executable('perforce')
|
||||||
|
let diff = system('env P4DIFF=diff p4 diff -dU0 -- '. sy#util#escape(a:path))
|
||||||
|
return v:shell_error ? '' : diff
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Function: #process_diff {{{1
|
" Function: #process_diff {{{1
|
||||||
function! sy#repo#process_diff(path, diff) abort
|
function! sy#repo#process_diff(path, diff) abort
|
||||||
" Determine where we have to put our signs.
|
" Determine where we have to put our signs.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user