Merge branch 'perforce-support'

Closes #46.
This commit is contained in:
Marco Hinz 2013-07-30 01:27:26 +02:00
commit c79625a18c
3 changed files with 14 additions and 3 deletions

View File

@ -10,7 +10,8 @@ It's __fast__, __highly configurable__ and __well documented__.
Features:
- supports git, mercurial, darcs, bazaar, subversion, cvs, rcs, fossil
- supports git, mercurial, darcs, bazaar, subversion, cvs, rcs, fossil, accurev,
perforce
- quick jumping between blocks of changed lines
- apart from signs there is also optional line highlighting
- fully configurable through global variables (options and mappings)
@ -102,6 +103,7 @@ Currently the following VCS are supported:
- rcs
- fossil
- accurev
- perforce
#### quick jumping between changed lines

View File

@ -26,7 +26,7 @@ endif
" Function: #detect {{{1
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)
if !empty(diff)
return [ diff, type ]
@ -139,6 +139,14 @@ function! sy#repo#get_diff_accurev(path) abort
endif
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! sy#repo#process_diff(path, diff) abort
" Determine where we have to put our signs.

View File

@ -93,7 +93,8 @@ default values, as long as no "Default:" section is given.
let g:signify_vcs_list = [ 'git', 'hg' ]
Default: ['git', 'hg', 'svn', 'darcs', 'bzr', 'fossil', 'cvs', 'rcs', 'accurev']
Default: ['git', 'hg', 'svn', 'darcs', 'bzr', 'fossil', 'cvs', 'rcs',
'accurev', 'perforce']
This variable determines the VCS to check for and in what order. If you only
use git and mercurial, you can shorten the list to the shown example. If you