From eaf722e5bf48278143b27d3f853c3c39f1b43817 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 16 Apr 2013 11:37:57 +0200 Subject: [PATCH] add support for fossil --- README.md | 3 ++- doc/signify.txt | 3 ++- plugin/signify.vim | 10 +++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ebfa243..dba0e8c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It's __fast__, __highly configurable__ and __well documented__. Features: -- supports git, mercurial, darcs, bazaar, subversion, cvs, rcs +- supports git, mercurial, darcs, bazaar, subversion, cvs, rcs, fossil - quick jumping between changed lines - apart from signs there is also optional line highlighting - fully configurable through global variables (options and mappings) @@ -97,6 +97,7 @@ Current the following VCS are supported: - subversion (svn) - cvs - rcs +- fossil #### quick jumping between changed lines diff --git a/doc/signify.txt b/doc/signify.txt index c15f9c8..ffbc997 100644 --- a/doc/signify.txt +++ b/doc/signify.txt @@ -53,6 +53,7 @@ version control system: - subversion - cvs - rcs + - fossil The plugin defines 4 new kinds of signs and their corresponding highlighting groups. It tries to inherent existing colors from the SignColumn group, if @@ -96,7 +97,7 @@ not defaults. let g:signify_vcs_list = [ 'git', 'hg' ] -Default: ['git', 'hg', 'svn', 'darcs', 'bzr', 'cvs', 'rcs'] +Default: ['git', 'hg', 'svn', 'darcs', 'bzr', 'fossil', 'cvs', 'rcs'] 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 diff --git a/plugin/signify.vim b/plugin/signify.vim index 39e384d..864f43a 100644 --- a/plugin/signify.vim +++ b/plugin/signify.vim @@ -14,7 +14,7 @@ let s:other_signs_line_numbers = {} " overwrite non-signify signs by default let s:sign_overwrite = get(g:, 'signify_sign_overwrite', 1) -let s:vcs_list = get(g:, 'signify_vcs_list', [ 'git', 'hg', 'svn', 'darcs', 'bzr', 'cvs', 'rcs' ]) +let s:vcs_list = get(g:, 'signify_vcs_list', [ 'git', 'hg', 'svn', 'darcs', 'bzr', 'fossil', 'cvs', 'rcs' ]) let s:id_start = 0x100 let s:id_top = s:id_start @@ -292,6 +292,14 @@ function! s:repo_get_diff_darcs(path) abort endif endfunction +" Function: s:repo_get_diff_fossil {{{1 +function! s:repo_get_diff_fossil(path) abort + if executable('fossil') + let diff = system('cd '. s:escape(fnamemodify(a:path, ':h')) .' && fossil set diff-command "'. s:difftool .' -U 0" && fossil diff --unified -c 0 -- '. s:escape(a:path)) + return v:shell_error ? '' : diff + endif +endfunction + " Function: s:repo_get_diff_cvs {{{1 function! s:repo_get_diff_cvs(path) abort if executable('cvs')