Mercurial > vim-lawrencium
comparison plugin/lawrencium.vim @ 121:5168645017dd
Check for `.hg` directory instead of `.hg/store`.
This fixes problems with repositories shared with the `share` extension.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 05 Oct 2015 23:51:42 -0700 |
parents | 4ca40abecc2a |
children | a9136d95cf47 |
comparison
equal
deleted
inserted
replaced
120:a290dc47e534 | 121:5168645017dd |
---|---|
132 " Throw an error if not repository is found. | 132 " Throw an error if not repository is found. |
133 function! s:find_repo_root(path) | 133 function! s:find_repo_root(path) |
134 let l:path = s:stripslash(a:path) | 134 let l:path = s:stripslash(a:path) |
135 let l:previous_path = "" | 135 let l:previous_path = "" |
136 while l:path != l:previous_path | 136 while l:path != l:previous_path |
137 if isdirectory(l:path . '/.hg/store') | 137 if isdirectory(l:path . '/.hg') |
138 return s:normalizepath(simplify(fnamemodify(l:path, ':p'))) | 138 return s:normalizepath(simplify(fnamemodify(l:path, ':p'))) |
139 endif | 139 endif |
140 let l:previous_path = l:path | 140 let l:previous_path = l:path |
141 let l:path = fnamemodify(l:path, ':h') | 141 let l:path = fnamemodify(l:path, ':h') |
142 endwhile | 142 endwhile |