Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hg-pull-mirror-test2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
heptapod
Testing Projects
hg-pull-mirror-test2
Commits
f2335246e5c7
Commit
f2335246e5c7
authored
17 years ago
by
Steve Borho
Browse files
Options
Downloads
Patches
Plain Diff
filemerge: wrap quotes around tool path
parent
3121f0feefb4
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
mercurial/filemerge.py
+11
-8
11 additions, 8 deletions
mercurial/filemerge.py
with
11 additions
and
8 deletions
mercurial/filemerge.py
+
11
−
8
View file @
f2335246
...
...
@@ -43,10 +43,11 @@
return
False
# HGMERGE takes precedence
if
os
.
environ
.
get
(
"
HGMERGE
"
):
return
os
.
environ
.
get
(
"
HGMERGE
"
)
hgmerge
=
os
.
environ
.
get
(
"
HGMERGE
"
)
if
hgmerge
:
return
(
hgmerge
,
hgmerge
)
# then patterns
for
pat
,
tool
in
ui
.
configitems
(
"
merge-patterns
"
):
mf
=
util
.
matcher
(
repo
.
root
,
""
,
[
pat
],
[],
[])[
1
]
if
mf
(
path
)
and
check
(
tool
,
pat
,
symlink
,
False
):
...
...
@@ -48,9 +49,10 @@
# then patterns
for
pat
,
tool
in
ui
.
configitems
(
"
merge-patterns
"
):
mf
=
util
.
matcher
(
repo
.
root
,
""
,
[
pat
],
[],
[])[
1
]
if
mf
(
path
)
and
check
(
tool
,
pat
,
symlink
,
False
):
return
tool
toolpath
=
_findtool
(
ui
,
tool
)
return
(
tool
,
'"'
+
toolpath
+
'"'
)
# then merge tools
tools
=
{}
...
...
@@ -63,5 +65,4 @@
if
ui
.
config
(
"
ui
"
,
"
merge
"
):
tools
.
insert
(
0
,
(
None
,
ui
.
config
(
"
ui
"
,
"
merge
"
)))
# highest priority
tools
.
append
((
None
,
"
hgmerge
"
))
# the old default, if found
tools
.
append
((
None
,
"
internal:merge
"
))
# internal merge as last resort
for
p
,
t
in
tools
:
...
...
@@ -67,6 +68,9 @@
for
p
,
t
in
tools
:
if
_findtool
(
ui
,
t
)
and
check
(
t
,
None
,
symlink
,
binary
):
return
t
toolpath
=
_findtool
(
ui
,
t
)
if
toolpath
and
check
(
t
,
None
,
symlink
,
binary
):
return
(
t
,
'"'
+
toolpath
+
'"'
)
# internal merge as last resort
return
(
not
(
symlink
or
binary
)
and
"
internal:merge
"
or
None
,
None
)
def
_eoltype
(
data
):
"
Guess the EOL type of a file
"
...
...
@@ -124,7 +128,7 @@
fca
=
fcm
.
ancestor
(
fco
)
or
repo
.
filectx
(
fw
,
fileid
=
nullrev
)
binary
=
isbin
(
fcm
)
or
isbin
(
fco
)
or
isbin
(
fca
)
symlink
=
fcm
.
islink
()
or
fco
.
islink
()
tool
=
_picktool
(
repo
,
ui
,
fw
,
binary
,
symlink
)
tool
,
toolpath
=
_picktool
(
repo
,
ui
,
fw
,
binary
,
symlink
)
ui
.
debug
(
_
(
"
picked tool
'
%s
'
for %s (binary %s symlink %s)
\n
"
)
%
(
tool
,
fw
,
binary
,
symlink
))
...
...
@@ -177,7 +181,6 @@
if
tool
==
"
internal:merge
"
:
r
=
simplemerge
.
simplemerge
(
a
,
b
,
c
,
label
=
[
'
local
'
,
'
other
'
])
else
:
toolpath
=
_findtool
(
ui
,
tool
)
args
=
_toolstr
(
ui
,
tool
,
"
args
"
,
'
$local $base $other
'
)
if
"
$output
"
in
args
:
out
,
a
=
a
,
back
# read input from backup, write to original
...
...
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