Mercurial > vim-lawrencium
comparison plugin/lawrencium.vim @ 104:518a6b2eff56
Simpler looking repo paths.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 15 Aug 2014 16:52:49 -0700 |
parents | bc6003e7159e |
children | fc5ffa4614b4 |
comparison
equal
deleted
inserted
replaced
103:bc6003e7159e | 104:518a6b2eff56 |
---|---|
129 function! s:find_repo_root(path) | 129 function! s:find_repo_root(path) |
130 let l:path = s:stripslash(a:path) | 130 let l:path = s:stripslash(a:path) |
131 let l:previous_path = "" | 131 let l:previous_path = "" |
132 while l:path != l:previous_path | 132 while l:path != l:previous_path |
133 if isdirectory(l:path . '/.hg/store') | 133 if isdirectory(l:path . '/.hg/store') |
134 return simplify(fnamemodify(l:path, ':p')) | 134 return s:normalizepath(simplify(fnamemodify(l:path, ':p'))) |
135 endif | 135 endif |
136 let l:previous_path = l:path | 136 let l:previous_path = l:path |
137 let l:path = fnamemodify(l:path, ':h') | 137 let l:path = fnamemodify(l:path, ':h') |
138 endwhile | 138 endwhile |
139 call s:throw("No Mercurial repository found above: " . a:path) | 139 call s:throw("No Mercurial repository found above: " . a:path) |