Browse files

vcshg: correct message for empty commit

  • Loading branch information...
1 parent 29e61b6 commit bc6ac15fc5a1575a7e4f1f882ea411b301cd253a @blacktrash blacktrash committed with bhiestand Jun 17, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 plugin/vcshg.vim
View
6 plugin/vcshg.vim
@@ -131,7 +131,11 @@ endfunction
" Function: s:hgFunctions.Commit(argList) {{{2
function! s:hgFunctions.Commit(argList)
- return s:DoCommand('commit -v -l "' . a:argList[0] . '"', 'commit', '', {})
+ try
+ return s:DoCommand('commit -v -l "' . a:argList[0] . '"', 'commit', '', {})
+ catch /Version control command failed.*nothing changed/
+ echomsg 'No commit needed.'
+ endtry
endfunction
" Function: s:hgFunctions.Delete() {{{2

0 comments on commit bc6ac15

Please sign in to comment.