changeset 32:799c7b57e19a

Merged changes.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 25 Dec 2011 22:44:06 -0800
parents 3a0f7bb6ea64 (current diff) 35d097b9513c (diff)
children a5b2f8e4fb6c
files plugin/lawrencium.vim
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugin/lawrencium.vim	Sun Dec 25 22:40:30 2011 -0800
+++ b/plugin/lawrencium.vim	Sun Dec 25 22:44:06 2011 -0800
@@ -761,8 +761,11 @@
     endif
     let l:prefix = (a:0 > 0 ? a:1 : '')
     let l:suffix = (a:0 > 1 ? a:2 : '')
+    let l:branch = 'default'
     let l:branch_file = s:hg_repo().GetFullPath('.hg/branch')
-    let l:branch = readfile(l:branch_file)[0]
+    if filereadable(l:branch_file)
+        let l:branch = readfile(l:branch_file)[0]
+    endif
     return l:prefix . l:branch .  l:suffix
 endfunction