Skip to content

Commit

Permalink
Add jujutsu support
Browse files Browse the repository at this point in the history
  • Loading branch information
msuozzo committed Jun 9, 2024
1 parent 8670143 commit 4f7ebce
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ 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**, **yadm**.
**cvs**, **rcs**, **fossil**, **accurev**, **perforce**, **tfs**, **yadm**,
**jj**.
- **Asynchronous** execution of VCS tools for Vim 8.0.902+ and Neovim.
- **Preserves signs** from other plugins.
- Handles **nested repositories** controlled by different VCS.
Expand Down Expand Up @@ -46,6 +47,7 @@ endif
```

## Configuration for async update

```vim
" default updatetime 4000ms is not good for async update
set updatetime=100
Expand Down
9 changes: 8 additions & 1 deletion autoload/sy/repo.vim
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ function! s:check_diff_svn(exitval, diff) abort
return a:exitval ? [0, []] : [1, a:diff]
endfunction

" s:check_diff_jj {{{1
function! s:check_diff_jj(exitval, diff) abort
return a:exitval ? [0, []] : [1, a:diff]
endfunction

" s:check_diff_bzr {{{1
function! s:check_diff_bzr(exitval, diff) abort
return (a:exitval =~ '[012]') ? [1, a:diff] : [0, []]
Expand Down Expand Up @@ -629,7 +634,8 @@ let s:default_vcs_cmds = {
\ 'rcs': 'rcsdiff -U0 %f 2>%n',
\ 'accurev': 'accurev diff %f -- -U0',
\ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') . (has('win32') ? ' &&' : ' && env P4DIFF= P4COLORS=') .' p4 diff -du0 %f',
\ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f'
\ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f',
\ 'jj': 'jj diff --color=never --git --context=0 -r @ -- %f',
\ }

let s:default_vcs_cmds_diffmode = {
Expand All @@ -645,6 +651,7 @@ let s:default_vcs_cmds_diffmode = {
\ 'accurev': 'accurev cat %f',
\ 'perforce': 'p4 print %f',
\ 'tfs': 'tf view -version:W -noprompt %f',
\ 'jj': 'jj cat -- %f',
\ }

if exists('g:signify_vcs_cmds')
Expand Down
5 changes: 4 additions & 1 deletion doc/signify.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ The key can be any from this list:
accurev
perforce
tfs
jj

Modifiers:~

Expand Down Expand Up @@ -201,7 +202,8 @@ Default:
\ 'rcs': 'rcsdiff -U0 %f 2>%n',
\ 'accurev': 'accurev diff %f -- -U0',
\ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') . (has('win32') ? ' &&' : ' && env P4DIFF= P4COLORS=') .' p4 diff -du0 %f',
\ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f'
\ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f',
\ 'jj': 'jj diff --color=never --context=0 -r @ -- %f',
\ }
<
------------------------------------------------------------------------------
Expand All @@ -219,6 +221,7 @@ Default:
\ 'accurev': 'accurev cat %f',
\ 'perforce': 'p4 print %f',
\ 'tfs': 'tf view -version:W -noprompt %f',
\ 'jj': 'jj cat -- %f',
\ }
<
The command to use for updating signs in a `modified` buffer, thus when the
Expand Down

0 comments on commit 4f7ebce

Please sign in to comment.