Patchwork [1,of,6,mergedriver] filemerge: add some merge types

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 8, 2015, 7:33 a.m.
Message ID <95d03fa9c7b235dc81a5.1444289592@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10875/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 8, 2015, 7:33 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444256021 25200
#      Wed Oct 07 15:13:41 2015 -0700
# Node ID 95d03fa9c7b235dc81a5d09339c3dd92424f8ada
# Parent  b7c20c93021550829a4d6ea1ddfb472a28c01859
filemerge: add some merge types

We're going to turn the 'trymerge' boolean into a 'mergetype' enum with these
three possible values.

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -38,6 +38,11 @@  internals = {}
 # Merge tools to document.
 internalsdoc = {}
 
+# internal tool merge types
+nomerge = None
+mergeonly = 'mergeonly'  # just the full merge, no premerge
+fullmerge = 'fullmerge'  # both premerge and merge
+
 def internaltool(name, trymerge, onfailure=None, precheck=None):
     '''return a decorator for populating internal merge tool table'''
     def decorator(func):