Patchwork D8515: filemerge: add a hacktastic version of internal:merge3 for merge diffs

login
register
mail settings
Submitter phabricator
Date May 11, 2020, 10:48 p.m.
Message ID <differential-rev-PHID-DREV-jqpa6yxpewaldzgmptjo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46299/
State New
Headers show

Comments

phabricator - May 11, 2020, 10:48 p.m.
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This is a version of merge3 that always reports success, so that
  conflict markers get preserved without us having to implement conflict
  storage for in-memory merge. Credit to martinvonz for the idea.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8515

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -528,6 +528,16 @@ 
         labels.append(b'base')
     return _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels)
 
+@internaltool(
+    b'merge3-lie-about-conflicts',
+    fullmerge,
+    b'',
+    precheck=_mergecheck,
+)
+def _imerge3alwaysgood(*args, **kwargs):
+    b1, junk, b2 = _imerge3(*args, **kwargs)
+    return b1, False, b2
+
 
 def _imergeauto(
     repo,