add support for darcs repos
This commit is contained in:
parent
f434cc7f4e
commit
8cf6c61795
@ -9,7 +9,7 @@ It's fast, highly configurable and well documented.
|
||||
|
||||
Features:
|
||||
|
||||
- supports git, mercurial, bazaar, subversion, cvs
|
||||
- supports git, mercurial, darcs, bazaar, subversion, cvs
|
||||
- apart from signs there is also optional line highlighting
|
||||
- fully configurable through global variables
|
||||
- optional preserving of signs from other plugins
|
||||
|
@ -48,6 +48,7 @@ version control system:
|
||||
|
||||
- git
|
||||
- mercurial
|
||||
- darcs
|
||||
- bzr
|
||||
- subversion
|
||||
- cvs
|
||||
|
@ -156,7 +156,7 @@ function! s:start(path) abort
|
||||
endif
|
||||
|
||||
" Use git's diff cmd to set our signs.
|
||||
call s:process_diff(a:path, diff)
|
||||
call s:diff_process(a:path, diff)
|
||||
|
||||
let s:sy[a:path].id_top = (s:id_top - 1)
|
||||
endfunction
|
||||
@ -261,6 +261,17 @@ function! s:diff_get(path) abort
|
||||
return diff
|
||||
endif
|
||||
endif
|
||||
|
||||
if executable('darcs')
|
||||
let orig_dir = getcwd()
|
||||
exe 'cd '. fnamemodify(a:path, ':h')
|
||||
let diff = system('darcs diff --no-pause-for-gui --diff-command="diff -U0 %1 %2" '. a:path .' | grep "^@@ "')
|
||||
if !v:shell_error
|
||||
exe 'cd '. orig_dir
|
||||
return diff
|
||||
endif
|
||||
exe 'cd '. orig_dir
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('g:signify_enable_cvs') && (g:signify_enable_cvs == 1)
|
||||
@ -275,8 +286,8 @@ function! s:diff_get(path) abort
|
||||
return []
|
||||
endfunction
|
||||
|
||||
" Functions -> s:process_diff() {{{2
|
||||
function! s:process_diff(path, diff) abort
|
||||
" Functions -> s:diff_process() {{{2
|
||||
function! s:diff_process(path, diff) abort
|
||||
" Determine where we have to put our signs.
|
||||
for line in split(a:diff, '\n')
|
||||
" Parse diff output.
|
||||
|
Loading…
Reference in New Issue
Block a user