Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
fcfd46c4
Commit
fcfd46c4
authored
18 years ago
by
Mathieu Clabaut
Browse files
Options
Downloads
Patches
Plain Diff
HGcommand.vim : the status was read for the wrong file as we changed the current directory before
parent
733fff9b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contrib/vim/hgcommand.vim
+10
-5
10 additions, 5 deletions
contrib/vim/hgcommand.vim
with
10 additions
and
5 deletions
contrib/vim/hgcommand.vim
+
10
−
5
View file @
fcfd46c4
...
...
@@ -322,7 +322,7 @@
let
fileName
=
bufname
(
hgBufferCheck
)
let
fileNameWithoutLink
=
s:HGResolveLink
(
fileName
)
let
realFileName
=
fnamemodify
(
fileNameWithoutLink
,
':t'
)
let
oldCwd
=
s:HGChangeToCurrentFileDir
(
f
ileName
)
let
oldCwd
=
s:HGChangeToCurrentFileDir
(
realF
ileName
)
try
let
hgCommand
=
s:HGGetOption
(
"HGCommandHGExec"
,
"hg"
)
.
" root "
let
roottext
=
system
(
hgCommand
)
...
...
@@ -332,8 +332,11 @@
return
""
endif
let
returnExpression
=
""
let
hgCommand
=
s:HGGetOption
(
"HGCommandHGExec"
,
"hg"
)
.
" status -mardui "
.
fileName
if
a:repositoryVar
!=
""
let
returnExpression
=
returnExpression
.
" | let "
.
a:repositoryVar
.
"='"
.
roottext
.
"'"
endif
let
hgCommand
=
s:HGGetOption
(
"HGCommandHGExec"
,
"hg"
)
.
" status -mardui "
.
realFileName
let
statustext
=
system
(
hgCommand
)
if
(
v
:
shell_error
)
return
""
endif
...
...
@@ -336,10 +339,7 @@
let
statustext
=
system
(
hgCommand
)
if
(
v
:
shell_error
)
return
""
endif
if
a:repositoryVar
!=
""
let
returnExpression
=
returnExpression
.
" | let "
.
a:repositoryVar
.
"='"
.
roottext
.
"'"
endif
if
match
(
statustext
,
'^[?I]'
)
>=
0
let
revision
=
"NEW"
elseif
match
(
statustext
,
'^[R]'
)
>=
0
...
...
@@ -1677,6 +1677,11 @@
may still be bugs
in
here
,
depending
on
many configuration details
.
==============================================================================
9
.
TODO *hgcommand
-
todo*
Integrate symlink tracking once HG will support them
.
==============================================================================
===
END_DOC
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" v im:tw=78:ts=8:ft=help:norl:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment