changeset 16:724f6db3baa2

Don't show `hg commit` output if there's nothing to show. Fixed a regexp for `hg status`.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 13 Dec 2011 17:17:03 -0800
parents f02e37f395ae
children 5c6c605d0660
files plugin/lawrencium.vim
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/lawrencium.vim	Tue Dec 13 17:09:37 2011 -0800
+++ b/plugin/lawrencium.vim	Tue Dec 13 17:17:03 2011 -0800
@@ -319,7 +319,7 @@
     " Get the repo and the `hg status` output.
     let l:repo = s:hg_repo()
     let l:status_text = l:repo.RunCommand('status')
-    if l:status_text ==# '\v\%^\s*\%$'
+    if l:status_text ==# '\v%^\s*%$'
         echo "Nothing modified."
     endif
 
@@ -596,7 +596,8 @@
     " Get the repo and commit with the given message.
     let l:repo = s:hg_repo()
     let l:output = l:repo.RunCommand('commit', '-l', a:log_file)
-    if a:show_output
+    if a:show_output && l:output !~# '\v%^\s*%$'
+        call s:trace("Output from hg commit:", 1)
         echom l:output
     endif
 endfunction