Permalink
Browse files

remove diff action by log kind.

  • Loading branch information...
1 parent feabe2e commit 1969168cab0d7921120810989abcef999eb699cb @hrsh7th committed Oct 4, 2012
@@ -19,7 +19,7 @@ let s:kind.action_table.diff = {
function! s:kind.action_table.diff.func(candidates)
for candidate in a:candidates
call vcs#diff_file_with_string(candidate.action__path, {
- \ 'name': '[REMOTE]' . candidate.action__path,
+ \ 'name': '[REMOTE] ' . candidate.action__path,
\ 'string': vcs#vcs('cat', [candidate.action__path, candidate.action__revision])
\ })
endfor
@@ -32,12 +32,12 @@ let s:kind.action_table.diff_prev = {
function! s:kind.action_table.diff_prev.func(candidates)
for candidate in a:candidates
call vcs#diff_string_with_string({
- \ 'name': '[REMOTE:' . candidate.action__revision . ']' . candidate.action__path,
+ \ 'name': '[REMOTE:' . candidate.action__revision . '] ' . candidate.action__path,
\ 'string': vcs#vcs('cat', [candidate.action__path, candidate.action__revision])
\ }, {
- \ 'name': '[REMOTE:' . candidate.action__prev_revision . ']' . candidate.action__path,
+ \ 'name': '[REMOTE:' . candidate.action__prev_revision . '] ' . candidate.action__path,
\ 'string': vcs#vcs('cat', [candidate.action__path, candidate.action__prev_revision])
- \ }
+ \ })
endfor
endfunction
@@ -12,6 +12,18 @@ let s:kind = {
\ 'parents': ['file']
\ }
+let s:kind.action_table.diff = {
+ \ 'is_listed': 0,
+ \ }
+function! s:kind.action_table.diff.func(candidates)
+endfunction
+
+let s:kind.action_table.dirdiff = {
+ \ 'is_listed': 0,
+ \ }
+function! s:kind.action_table.dirdiff.func(candidates)
+endfunction
+
let s:kind.action_table.log = {
\ 'description': 'display vcs log.',
\ 'is_selectable': 1
@@ -45,49 +45,6 @@ function! s:kind.action_table.changeset.func(candidates)
call unite#start([['vcs/changeset', candidate.action__path, candidate.action__revision]])
endfunction
-let s:kind.action_table.diff = {
- \ 'description': 'diff with original.',
- \ 'is_selectable': 1,
- \ }
-function! s:kind.action_table.diff.func(candidates)
- if len(a:candidates) > 2
- echomsg 'invalid candidates length.'
- return
- endif
-
- if len(a:candidates) == 1
- call vcs#diff_file_with_string(a:candidates[0].action__path, {
- \ 'name': '[REMOTE]' . a:candidates[0].action__path,
- \ 'string': vcs#vcs('cat', [a:candidates[0].action__path, a:candidates[0].action__revision])
- \ })
- return
- else
- call vcs#diff_string_with_string({
- \ 'name': '[REMOTE:' . a:candidates[0].action__revision . ']' . a:candidates[0].action__path,
- \ 'string': vcs#vcs('cat', [a:candidates[0].action__path, a:candidates[0].action__revision])
- \ }, {
- \ 'name': '[REMOTE:' . a:candidates[1].action__revision . ']' . a:candidates[1].action__path,
- \ 'string': vcs#vcs('cat', [a:candidates[1].action__path, a:candidates[1].action__revision])
- \ }
- endif
-endfunction
-
-let s:kind.action_table.diff_prev = {
- \ 'description': 'diff with previous revision.',
- \ 'is_selectable': 1,
- \ }
-function! s:kind.action_table.diff_prev.func(candidates)
- for candidate in a:candidates
- call vcs#diff_string_with_string({
- \ 'name': '[REMOTE:' . candidate.action__revision . ']' . candidate.action__path,
- \ 'string': vcs#vcs('cat', [candidate.action__path, candidate.action__revision])
- \ }, {
- \ 'name': '[REMOTE:' . candidate.action__prev_revision . ']' . candidate.action__path,
- \ 'string': vcs#vcs('cat', [candidate.action__path, candidate.action__prev_revision])
- \ }
- endfor
-endfunction
-
let &cpo = s:save_cpo
unlet s:save_cpo
@@ -69,8 +69,9 @@ let s:kind.action_table.diff = {
function! s:kind.action_table.diff.func(candidates)
for candidate in a:candidates
call vcs#diff_file_with_string(candidate.action__path, {
- \ 'name': '[REMOTE]' . candidate.action__path,
- \ 'string': vcs#vcs('cat', [candidate.action__path]) })
+ \ 'name': '[REMOTE] ' . candidate.action__path,
+ \ 'string': vcs#vcs('cat', [candidate.action__path])
+ \ })
endfor
endfunction

0 comments on commit 1969168

Please sign in to comment.