comparison plugin/lawrencium.vim @ 32:799c7b57e19a

Merged changes.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 25 Dec 2011 22:44:06 -0800
parents 3a0f7bb6ea64 35d097b9513c
children a5b2f8e4fb6c
comparison
equal deleted inserted replaced
31:3a0f7bb6ea64 32:799c7b57e19a
759 if !exists('b:mercurial_dir') 759 if !exists('b:mercurial_dir')
760 return '' 760 return ''
761 endif 761 endif
762 let l:prefix = (a:0 > 0 ? a:1 : '') 762 let l:prefix = (a:0 > 0 ? a:1 : '')
763 let l:suffix = (a:0 > 1 ? a:2 : '') 763 let l:suffix = (a:0 > 1 ? a:2 : '')
764 let l:branch = 'default'
764 let l:branch_file = s:hg_repo().GetFullPath('.hg/branch') 765 let l:branch_file = s:hg_repo().GetFullPath('.hg/branch')
765 let l:branch = readfile(l:branch_file)[0] 766 if filereadable(l:branch_file)
767 let l:branch = readfile(l:branch_file)[0]
768 endif
766 return l:prefix . l:branch . l:suffix 769 return l:prefix . l:branch . l:suffix
767 endfunction 770 endfunction
768 771
769 " Rescans the current buffer for setting up Mercurial commands. 772 " Rescans the current buffer for setting up Mercurial commands.
770 " Passing '1' as the parameter enables debug traces temporarily. 773 " Passing '1' as the parameter enables debug traces temporarily.