Add support for yadm

Closes https://github.com/mhinz/vim-signify/issues/297
This commit is contained in:
Marco Hinz 2019-05-25 17:33:30 +02:00
parent f34fea0eff
commit c3f26e4599
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F
3 changed files with 18 additions and 3 deletions

View File

@ -8,7 +8,7 @@ removed lines in a file that is managed by a version control system (VCS)._
---
- Supports **git**, **mercurial**, **darcs**, **bazaar**, **subversion**,
**cvs**, **rcs**, **fossil**, **accurev**, **perforce**, **tfs**.
**cvs**, **rcs**, **fossil**, **accurev**, **perforce**, **tfs**, **yadm**.
- **Asynchronous** execution of VCS tools for Vim 7.4.1967+ and Neovim.
- **Preserves signs** from other plugins.
- Handles **nested repositories** controlled by different VCS.

View File

@ -145,6 +145,13 @@ function! sy#repo#get_diff_git(sy, exitval, diff) abort
call s:get_diff_end(a:sy, found_diff, 'git', diff)
endfunction
" Function: #get_diff_yadm {{{1
function! sy#repo#get_diff_yadm(sy, exitval, diff) abort
call sy#verbose('get_diff_yadm()', 'yadm')
let [found_diff, diff] = a:exitval ? [0, []] : [1, a:diff]
call s:get_diff_end(a:sy, found_diff, 'yadm', diff)
endfunction
" Function: #get_diff_hg {{{1
function! sy#repo#get_diff_hg(sy, exitval, diff) abort
call sy#verbose('get_diff_hg()', 'hg')
@ -322,7 +329,7 @@ endfunction
" Function: s:get_vcs_path {{{1
function! s:get_vcs_path(vcs) abort
return (a:vcs =~# '\v(git|cvs|accurev|tfs)') ? b:sy.info.file : b:sy.info.path
return (a:vcs =~# '\v(git|cvs|accurev|tfs|yadm)') ? b:sy.info.file : b:sy.info.path
endfunction
" Function: s:expand_cmd {{{1
@ -442,6 +449,7 @@ let s:difftool = get(g:, 'signify_difftool', 'diff')
if executable(s:difftool)
let s:vcs_dict = {
\ 'git': 'git',
\ 'yadm': 'yadm',
\ 'hg': 'hg',
\ 'svn': 'svn',
\ 'darcs': 'darcs',
@ -457,6 +465,7 @@ else
call sy#verbose('No "diff" executable found. Disable support for svn, darcs, bzr.')
let s:vcs_dict = {
\ 'git': 'git',
\ 'yadm': 'yadm',
\ 'hg': 'hg',
\ 'fossil': 'fossil',
\ 'cvs': 'cvs',
@ -474,6 +483,7 @@ endif
let s:default_vcs_cmds = {
\ 'git': 'git diff --no-color --no-ext-diff -U0 -- %f',
\ 'yadm': 'yadm diff --no-color --no-ext-diff -U0 -- %f',
\ 'hg': 'hg diff --color=never --config aliases.diff= --nodates -U0 -- %f',
\ 'svn': 'svn diff --diff-cmd %d -x -U0 -- %f',
\ 'bzr': 'bzr diff --using %d --diff-options=-U0 -- %f',
@ -488,6 +498,7 @@ let s:default_vcs_cmds = {
let s:default_vcs_cmds_diffmode = {
\ 'git': 'git show HEAD:./%f',
\ 'yadm': 'yadm show HEAD:./%f',
\ 'hg': 'hg cat %f',
\ 'svn': 'svn cat %f',
\ 'bzr': 'bzr cat %f',

View File

@ -47,6 +47,7 @@ Supported VCS:~
accurev
perforce
tfs
yadm
<
==============================================================================
MODUS OPERANDI *signify-modus-operandi*
@ -83,7 +84,7 @@ If signs aren't showing up as expected, see if |signify-:SignifyDebug| shows
anything suspicious. It will try all VCS and shows either errors or a diff for
each VCS.
If the output looks fine though, create an issue on Github:
If the output looks fine though, create an issue on GitHub:
https://github.com/mhinz/vim-signify/issues/new
@ -165,6 +166,7 @@ Possible values: 'accurev'
'rcs'
'svn'
'tfs'
'yadm'
NOTE: This is the most important option, so read closely.
@ -251,6 +253,7 @@ Default:
>
let g:signify_vcs_cmds = {
\ 'git': 'git diff --no-color --no-ext-diff -U0 -- %f',
\ 'yadm': 'yadm diff --no-color --no-ext-diff -U0 -- %f',
\ 'hg': 'hg diff --config extensions.color=! --config defaults.diff= --nodates -U0 -- %f',
\ 'svn': 'svn diff --diff-cmd %d -x -U0 -- %f',
\ 'bzr': 'bzr diff --using %d --diff-options=-U0 -- %f',
@ -267,6 +270,7 @@ Default:
*g:signify_vcs_cmds_diffmode* >
let g:signify_vcs_cmds_diffmode = {
\ 'git': 'git show HEAD:./%f',
\ 'yadm': 'yadm show HEAD:./%f',
\ 'hg': 'hg cat %f',
\ 'svn': 'svn cat %f',
\ 'bzr': 'bzr cat %f',