Show More
@@ -101,7 +101,6 b' if [ -n "$MERGE" -o -n "$DIFF3" ]; then' | |||||
101 | failure |
|
101 | failure | |
102 | fi |
|
102 | fi | |
103 | fi |
|
103 | fi | |
104 | cp "$BACKUP" "$LOCAL" |
|
|||
105 |
|
104 | |||
106 | # on MacOS X try FileMerge.app, shipped with Apple's developer tools |
|
105 | # on MacOS X try FileMerge.app, shipped with Apple's developer tools | |
107 | if [ -n "$FILEMERGE" ]; then |
|
106 | if [ -n "$FILEMERGE" ]; then | |
@@ -111,7 +110,6 b' if [ -n "$FILEMERGE" ]; then' | |||||
111 | $FILEMERGE -left "$OTHER" -right "$LOCAL" -ancestor "$BASE" -merge "$LOCAL" |
|
110 | $FILEMERGE -left "$OTHER" -right "$LOCAL" -ancestor "$BASE" -merge "$LOCAL" | |
112 | [ $? -ne 0 ] && echo "FileMerge failed to launch" && failure |
|
111 | [ $? -ne 0 ] && echo "FileMerge failed to launch" && failure | |
113 | test "$LOCAL" -nt "$CHGTEST" && success || ask_if_merged |
|
112 | test "$LOCAL" -nt "$CHGTEST" && success || ask_if_merged | |
114 | failure |
|
|||
115 | fi |
|
113 | fi | |
116 |
|
114 | |||
117 | if [ -n "$DISPLAY" ]; then |
|
115 | if [ -n "$DISPLAY" ]; then | |
@@ -129,24 +127,13 b' if [ -n "$DISPLAY" ]; then' | |||||
129 | fi |
|
127 | fi | |
130 |
|
128 | |||
131 | # Attempt to do a merge with $EDITOR |
|
129 | # Attempt to do a merge with $EDITOR | |
132 | if [ -n "$MERGE" ]; then |
|
130 | if [ -n "$MERGE" -o -n "$DIFF3" ]; then | |
133 | echo "conflicts detected in $LOCAL" |
|
|||
134 | $MERGE "$LOCAL" "$BASE" "$OTHER" 2>/dev/null || $EDITOR "$LOCAL" |
|
|||
135 | success |
|
|||
136 | fi |
|
|||
137 |
|
||||
138 | if [ -n "$DIFF3" ]; then |
|
|||
139 | echo "conflicts detected in $LOCAL" |
|
131 | echo "conflicts detected in $LOCAL" | |
140 | $DIFF3 -m "$BACKUP" "$BASE" "$OTHER" > "$LOCAL" || { |
|
132 | cp "$BACKUP" "$CHGTEST" | |
141 | case $? in |
|
133 | $EDITOR "$LOCAL" || failure | |
142 | 1) |
|
134 | # Some editors do not return meaningful error codes | |
143 | $EDITOR "$LOCAL" ;; |
|
135 | # Do not take any chances | |
144 | 2) echo "$DIFF3 failed! Exiting." 1>&2 |
|
136 | test "$LOCAL" -nt "$CHGTEST" && success || ask_if_merged | |
145 | cp "$BACKUP" "$LOCAL" |
|
|||
146 | failure ;; |
|
|||
147 | esac |
|
|||
148 | success |
|
|||
149 | } |
|
|||
150 | fi |
|
137 | fi | |
151 |
|
138 | |||
152 | # attempt to manually merge with diff and patch |
|
139 | # attempt to manually merge with diff and patch | |
@@ -162,7 +149,8 b' if [ -n "$DIFF" -a -n "$PATCH" ]; then' | |||||
162 | success |
|
149 | success | |
163 | else |
|
150 | else | |
164 | # If rejects are empty after using the editor, merge was ok |
|
151 | # If rejects are empty after using the editor, merge was ok | |
165 |
$EDITOR "$LOCAL" "$LOCAL.rej" |
|
152 | $EDITOR "$LOCAL" "$LOCAL.rej" || failure | |
|
153 | test -s "$LOCAL.rej" || success | |||
166 | fi |
|
154 | fi | |
167 | failure |
|
155 | failure | |
168 | fi |
|
156 | fi |
General Comments 0
You need to be logged in to leave comments.
Login now