HGcommand.vim : HGGetStatusLine accept to display an empty 'branch' value
author"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
Wed, 12 Jul 2006 23:52:13 +0200
changeset 2606 5cef1a92aa04
parent 2605 4ad79eeebf96
child 2607 070736e20dfd
HGcommand.vim : HGGetStatusLine accept to display an empty 'branch' value
contrib/vim/hgcommand.vim
--- 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