##// END OF EJS Templates
filemerge: move check for identical sides out of filemerge()...
Martin von Zweigbergk -
r49604:93d6f0e7 default
parent child Browse files
Show More
@@ -989,10 +989,6 b' def filemerge(repo, wctx, mynode, orig, '
989
989
990 Returns whether the merge is complete, the return value of the merge, and
990 Returns whether the merge is complete, the return value of the merge, and
991 a boolean indicating whether the file was deleted from disk."""
991 a boolean indicating whether the file was deleted from disk."""
992
993 if not fco.cmp(fcd): # files identical?
994 return None, False
995
996 ui = repo.ui
992 ui = repo.ui
997 fd = fcd.path()
993 fd = fcd.path()
998 uipathfn = scmutil.getuipathfn(repo)
994 uipathfn = scmutil.getuipathfn(repo)
@@ -421,6 +421,14 b' class _mergestate_base(object):'
421 self._restore_backup(wctx[dfile], localkey, flags)
421 self._restore_backup(wctx[dfile], localkey, flags)
422 else:
422 else:
423 wctx[dfile].remove(ignoremissing=True)
423 wctx[dfile].remove(ignoremissing=True)
424
425 if not fco.cmp(fcd): # files identical?
426 # If return value of merge is None, then there are no real conflict
427 del self._state[dfile]
428 self._results[dfile] = None, None
429 self._dirty = True
430 return None
431
424 merge_ret, deleted = filemerge.filemerge(
432 merge_ret, deleted = filemerge.filemerge(
425 self._repo,
433 self._repo,
426 wctx,
434 wctx,
@@ -431,12 +439,6 b' class _mergestate_base(object):'
431 fca,
439 fca,
432 labels=self._labels,
440 labels=self._labels,
433 )
441 )
434 if merge_ret is None:
435 # If return value of merge is None, then there are no real conflict
436 del self._state[dfile]
437 self._results[dfile] = None, None
438 self._dirty = True
439 return None
440
442
441 if not merge_ret:
443 if not merge_ret:
442 self.mark(dfile, MERGE_RECORD_RESOLVED)
444 self.mark(dfile, MERGE_RECORD_RESOLVED)
@@ -962,7 +962,7 b' Merge conflicts:'
962 what do you want to do? l
962 what do you want to do? l
963 getting changed largefiles
963 getting changed largefiles
964 1 largefiles updated, 0 removed
964 1 largefiles updated, 0 removed
965 0 files updated, 4 files merged, 0 files removed, 0 files unresolved
965 1 files updated, 3 files merged, 0 files removed, 0 files unresolved
966 (branch merge, don't forget to commit)
966 (branch merge, don't forget to commit)
967 $ cat f-different
967 $ cat f-different
968 1
968 1
General Comments 0
You need to be logged in to leave comments. Login now