##// END OF EJS Templates
HGcommand.vim : the status was read for the wrong file as we changed the current directory before
"Mathieu Clabaut " -
r2637:fcfd46c4 default
parent child Browse files
Show More
@@ -322,7 +322,7 b' function! s:HGGetStatusVars(revisionVar,'
322 let fileName=bufname(hgBufferCheck)
322 let fileName=bufname(hgBufferCheck)
323 let fileNameWithoutLink=s:HGResolveLink(fileName)
323 let fileNameWithoutLink=s:HGResolveLink(fileName)
324 let realFileName = fnamemodify(fileNameWithoutLink, ':t')
324 let realFileName = fnamemodify(fileNameWithoutLink, ':t')
325 let oldCwd=s:HGChangeToCurrentFileDir(fileName)
325 let oldCwd=s:HGChangeToCurrentFileDir(realFileName)
326 try
326 try
327 let hgCommand = s:HGGetOption("HGCommandHGExec", "hg") . " root "
327 let hgCommand = s:HGGetOption("HGCommandHGExec", "hg") . " root "
328 let roottext=system(hgCommand)
328 let roottext=system(hgCommand)
@@ -332,14 +332,14 b' function! s:HGGetStatusVars(revisionVar,'
332 return ""
332 return ""
333 endif
333 endif
334 let returnExpression = ""
334 let returnExpression = ""
335 let hgCommand = s:HGGetOption("HGCommandHGExec", "hg") . " status -mardui " . fileName
335 if a:repositoryVar != ""
336 let returnExpression=returnExpression . " | let " . a:repositoryVar . "='" . roottext . "'"
337 endif
338 let hgCommand = s:HGGetOption("HGCommandHGExec", "hg") . " status -mardui " . realFileName
336 let statustext=system(hgCommand)
339 let statustext=system(hgCommand)
337 if(v:shell_error)
340 if(v:shell_error)
338 return ""
341 return ""
339 endif
342 endif
340 if a:repositoryVar != ""
341 let returnExpression=returnExpression . " | let " . a:repositoryVar . "='" . roottext . "'"
342 endif
343 if match(statustext, '^[?I]') >= 0
343 if match(statustext, '^[?I]') >= 0
344 let revision="NEW"
344 let revision="NEW"
345 elseif match(statustext, '^[R]') >= 0
345 elseif match(statustext, '^[R]') >= 0
@@ -1677,6 +1677,11 b' 8. Known bugs\t\t\t\t\t\t *hgcommand-bugs'
1677 may still be bugs in here, depending on many configuration details.
1677 may still be bugs in here, depending on many configuration details.
1678
1678
1679 ==============================================================================
1679 ==============================================================================
1680
1681 9. TODO *hgcommand-todo*
1682
1683 Integrate symlink tracking once HG will support them.
1684 ==============================================================================
1680 === END_DOC
1685 === END_DOC
1681 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
1686 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
1682 " v im:tw=78:ts=8:ft=help:norl:
1687 " v im:tw=78:ts=8:ft=help:norl:
General Comments 0
You need to be logged in to leave comments. Login now