Show More
@@ -695,7 +695,7 b' def overridefilemerge(' | |||||
695 | ) |
|
695 | ) | |
696 | ): |
|
696 | ): | |
697 | repo.wwrite(fcd.path(), fco.data(), fco.flags()) |
|
697 | repo.wwrite(fcd.path(), fco.data(), fco.flags()) | |
698 |
return |
|
698 | return 0, False | |
699 |
|
699 | |||
700 |
|
700 | |||
701 | @eh.wrapfunction(copiesmod, b'pathcopies') |
|
701 | @eh.wrapfunction(copiesmod, b'pathcopies') |
@@ -1031,7 +1031,7 b' def filemerge(repo, wctx, mynode, orig, ' | |||||
1031 | a boolean indicating whether the file was deleted from disk.""" |
|
1031 | a boolean indicating whether the file was deleted from disk.""" | |
1032 |
|
1032 | |||
1033 | if not fco.cmp(fcd): # files identical? |
|
1033 | if not fco.cmp(fcd): # files identical? | |
1034 |
return |
|
1034 | return None, False | |
1035 |
|
1035 | |||
1036 | ui = repo.ui |
|
1036 | ui = repo.ui | |
1037 | fd = fcd.path() |
|
1037 | fd = fcd.path() | |
@@ -1089,8 +1089,7 b' def filemerge(repo, wctx, mynode, orig, ' | |||||
1089 | toolconf = tool, toolpath, binary, symlink, scriptfn |
|
1089 | toolconf = tool, toolpath, binary, symlink, scriptfn | |
1090 |
|
1090 | |||
1091 | if mergetype == nomerge: |
|
1091 | if mergetype == nomerge: | |
1092 |
r |
|
1092 | return func(repo, mynode, fcd, fco, fca, toolconf, labels) | |
1093 | return True, r, deleted |
|
|||
1094 |
|
1093 | |||
1095 | if orig != fco.path(): |
|
1094 | if orig != fco.path(): | |
1096 | ui.status( |
|
1095 | ui.status( | |
@@ -1109,7 +1108,7 b' def filemerge(repo, wctx, mynode, orig, ' | |||||
1109 | b'in-memory merge does not support merge conflicts' |
|
1108 | b'in-memory merge does not support merge conflicts' | |
1110 | ) |
|
1109 | ) | |
1111 | ui.warn(onfailure % fduipath) |
|
1110 | ui.warn(onfailure % fduipath) | |
1112 |
return |
|
1111 | return 1, False | |
1113 |
|
1112 | |||
1114 | backup = _makebackup(repo, ui, wctx, fcd) |
|
1113 | backup = _makebackup(repo, ui, wctx, fcd) | |
1115 | r = 1 |
|
1114 | r = 1 | |
@@ -1150,7 +1149,7 b' def filemerge(repo, wctx, mynode, orig, ' | |||||
1150 | ) |
|
1149 | ) | |
1151 | # we're done if premerge was successful (r is 0) |
|
1150 | # we're done if premerge was successful (r is 0) | |
1152 | if not r: |
|
1151 | if not r: | |
1153 |
return |
|
1152 | return r, False | |
1154 |
|
1153 | |||
1155 | needcheck, r, deleted = func( |
|
1154 | needcheck, r, deleted = func( | |
1156 | repo, |
|
1155 | repo, | |
@@ -1177,7 +1176,7 b' def filemerge(repo, wctx, mynode, orig, ' | |||||
1177 | ui.warn(onfailure % fduipath) |
|
1176 | ui.warn(onfailure % fduipath) | |
1178 | _onfilemergefailure(ui) |
|
1177 | _onfilemergefailure(ui) | |
1179 |
|
1178 | |||
1180 |
return |
|
1179 | return r, deleted | |
1181 | finally: |
|
1180 | finally: | |
1182 | if not r and backup is not None: |
|
1181 | if not r and backup is not None: | |
1183 | backup.remove() |
|
1182 | backup.remove() |
@@ -354,7 +354,7 b' class _mergestate_base(object):' | |||||
354 | self._restore_backup(wctx[dfile], localkey, flags) |
|
354 | self._restore_backup(wctx[dfile], localkey, flags) | |
355 | else: |
|
355 | else: | |
356 | wctx[dfile].remove(ignoremissing=True) |
|
356 | wctx[dfile].remove(ignoremissing=True) | |
357 |
|
|
357 | merge_ret, deleted = filemerge.filemerge( | |
358 | self._repo, |
|
358 | self._repo, | |
359 | wctx, |
|
359 | wctx, | |
360 | self._local, |
|
360 | self._local, | |
@@ -371,26 +371,25 b' class _mergestate_base(object):' | |||||
371 | elif not merge_ret: |
|
371 | elif not merge_ret: | |
372 | self.mark(dfile, MERGE_RECORD_RESOLVED) |
|
372 | self.mark(dfile, MERGE_RECORD_RESOLVED) | |
373 |
|
373 | |||
374 | if complete: |
|
374 | action = None | |
375 | action = None |
|
375 | if deleted: | |
376 |
if |
|
376 | if fcd.isabsent(): | |
377 | if fcd.isabsent(): |
|
377 | # dc: local picked. Need to drop if present, which may | |
378 | # dc: local picked. Need to drop if present, which may |
|
378 | # happen on re-resolves. | |
379 | # happen on re-resolves. |
|
379 | action = ACTION_FORGET | |
380 | action = ACTION_FORGET |
|
380 | else: | |
|
381 | # cd: remote picked (or otherwise deleted) | |||
|
382 | action = ACTION_REMOVE | |||
|
383 | else: | |||
|
384 | if fcd.isabsent(): # dc: remote picked | |||
|
385 | action = ACTION_GET | |||
|
386 | elif fco.isabsent(): # cd: local picked | |||
|
387 | if dfile in self.localctx: | |||
|
388 | action = ACTION_ADD_MODIFIED | |||
381 | else: |
|
389 | else: | |
382 | # cd: remote picked (or otherwise deleted) |
|
390 | action = ACTION_ADD | |
383 | action = ACTION_REMOVE |
|
391 | # else: regular merges (no action necessary) | |
384 | else: |
|
392 | self._results[dfile] = merge_ret, action | |
385 | if fcd.isabsent(): # dc: remote picked |
|
|||
386 | action = ACTION_GET |
|
|||
387 | elif fco.isabsent(): # cd: local picked |
|
|||
388 | if dfile in self.localctx: |
|
|||
389 | action = ACTION_ADD_MODIFIED |
|
|||
390 | else: |
|
|||
391 | action = ACTION_ADD |
|
|||
392 | # else: regular merges (no action necessary) |
|
|||
393 | self._results[dfile] = merge_ret, action |
|
|||
394 |
|
393 | |||
395 | return merge_ret |
|
394 | return merge_ret | |
396 |
|
395 |
General Comments 0
You need to be logged in to leave comments.
Login now