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
Admin message
This instance will be upgraded to Heptapod 17.9.0rc1 on 2025-03-27 between 17:00 and 18:00 UTC+2
Show more breadcrumbs
heptapod
Testing Projects
hg-pull-mirror-test2
Commits
4338e33c973b
Commit
4338e33c973b
authored
19 years ago
by
Brendan Cully
Browse files
Options
Downloads
Patches
Plain Diff
Safer version of FileMerge merge
parent
d529cdc0a3ee
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
hgmerge
+31
-8
31 additions, 8 deletions
hgmerge
with
31 additions
and
8 deletions
hgmerge
+
31
−
8
View file @
4338e33c
...
...
@@ -44,14 +44,37 @@
cp
"
$LOCAL
.orig"
"
$LOCAL
"
fi
# on MacOS X try opendiff
# (uses FileMerge.app, shipped with Apple's developer tools)
if
type
opendiff
>
/dev/null 2>&1
;
then
opendiff
"
$LOCAL
.orig"
"
$OTHER
"
-ancestor
"
$BASE
"
-merge
"
$LOCAL
"
||
exit
1
# prevent $OTHER from being removed too early
# can surely be done in a more elegant way
sleep
1
exit
0
# on MacOS X try FileMerge.app, shipped with Apple's developer tools
# TODO: make proper temp files. foo.orig and foo.link are dangerous
FILEMERGE
=
'/Developer/Applications/Utilities/FileMerge.app/Contents/MacOS/FileMerge'
if
type
"
$FILEMERGE
"
>
/dev/null 2>&1
;
then
cp
"
$LOCAL
.orig"
"
$LOCAL
"
ln
"
$LOCAL
"
"
$LOCAL
.link"
# filemerge prefers the right by default
if
!
"
$FILEMERGE
"
-left
"
$OTHER
"
-right
"
$LOCAL
"
-ancestor
"
$BASE
"
-merge
"
$LOCAL
"
then
echo
"FileMerge failed to launch"
exit
1
fi
if
!
test
"
$LOCAL
"
-ef
"
$LOCAL
.link"
then
rm
"
$LOCAL
.orig"
"
$LOCAL
.link"
exit
0
else
rm
"
$LOCAL
.link"
echo
"
$LOCAL
is unchanged. Was the merge successful?"
select
answer
in
yes
no
do
if
test
"
$answer
"
==
"yes"
then
rm
"
$LOCAL
.orig"
exit
0
else
exit
1
fi
done
exit
1
fi
fi
if
[
-n
"
$DISPLAY
"
]
;
then
...
...
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