changeset 2606:5cef1a92aa04

HGcommand.vim : HGGetStatusLine accept to display an empty 'branch' value
author "Mathieu Clabaut <mathieu.clabaut@gmail.com>"
date Wed, 12 Jul 2006 23:52:13 +0200
parents 4ad79eeebf96
children 070736e20dfd
files contrib/vim/hgcommand.vim
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/vim/hgcommand.vim	Wed Jul 12 23:52:13 2006 +0200
+++ b/contrib/vim/hgcommand.vim	Wed Jul 12 23:52:13 2006 +0200
@@ -635,13 +635,16 @@
 
   if exists('b:HGRevision')
         \ && b:HGRevision != ''
-        \ && exists('b:HGBranch')
-        \ && b:HGBranch != ''
         \ && exists('b:HGRepository')
         \ && b:HGRepository != ''
         \ && exists('g:HGCommandEnableBufferSetup')
         \ && g:HGCommandEnableBufferSetup
-   return '[HG ' . b:HGRepository . '/' . b:HGBranch .'/' . b:HGRevision . ']'
+    if !exists('b:HGBranch')
+      let l:branch=''
+    else
+      let l:branch=b:HGBranch
+    endif
+    return '[HG ' . b:HGRepository . '/' . l:branch .'/' . b:HGRevision . ']'
   else
     return ''
   endif