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:
|
Features:
|
||||||
|
|
||||||
- supports git, mercurial, bazaar, subversion, cvs
|
- supports git, mercurial, darcs, bazaar, subversion, cvs
|
||||||
- apart from signs there is also optional line highlighting
|
- apart from signs there is also optional line highlighting
|
||||||
- fully configurable through global variables
|
- fully configurable through global variables
|
||||||
- optional preserving of signs from other plugins
|
- optional preserving of signs from other plugins
|
||||||
|
@ -48,6 +48,7 @@ version control system:
|
|||||||
|
|
||||||
- git
|
- git
|
||||||
- mercurial
|
- mercurial
|
||||||
|
- darcs
|
||||||
- bzr
|
- bzr
|
||||||
- subversion
|
- subversion
|
||||||
- cvs
|
- cvs
|
||||||
|
@ -156,7 +156,7 @@ function! s:start(path) abort
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Use git's diff cmd to set our signs.
|
" 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)
|
let s:sy[a:path].id_top = (s:id_top - 1)
|
||||||
endfunction
|
endfunction
|
||||||
@ -261,6 +261,17 @@ function! s:diff_get(path) abort
|
|||||||
return diff
|
return diff
|
||||||
endif
|
endif
|
||||||
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
|
endif
|
||||||
|
|
||||||
if exists('g:signify_enable_cvs') && (g:signify_enable_cvs == 1)
|
if exists('g:signify_enable_cvs') && (g:signify_enable_cvs == 1)
|
||||||
@ -275,8 +286,8 @@ function! s:diff_get(path) abort
|
|||||||
return []
|
return []
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Functions -> s:process_diff() {{{2
|
" Functions -> s:diff_process() {{{2
|
||||||
function! s:process_diff(path, diff) abort
|
function! s:diff_process(path, diff) abort
|
||||||
" Determine where we have to put our signs.
|
" Determine where we have to put our signs.
|
||||||
for line in split(a:diff, '\n')
|
for line in split(a:diff, '\n')
|
||||||
" Parse diff output.
|
" Parse diff output.
|
||||||
|
Loading…
Reference in New Issue
Block a user