Patchwork [14,of,18] configitems: register the 'patch.eol' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 10:25 p.m.
Message ID <475ac995200f6e42fe7c.1499034331@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21936/
State Accepted
Headers show

Comments

Pierre-Yves David - July 2, 2017, 10:25 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498787015 -7200
#      Fri Jun 30 03:43:35 2017 +0200
# Node ID 475ac995200f6e42fe7c860f9a7c4080d10a1ddc
# Parent  8cee64d04d20deb1be1ff9eaa17dc4f0d5a8e094
# EXP-Topic config.register.patch
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 475ac995200f
configitems: register the 'patch.eol' config

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -110,6 +110,9 @@  coreconfigitem('hostsecurity', 'ciphers'
 coreconfigitem('hostsecurity', 'disabletls10warning',
     default=False,
 )
+coreconfigitem('patch', 'eol',
+    default='strict',
+)
 coreconfigitem('patch', 'fuzz',
     default=2,
 )
diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -2077,7 +2077,7 @@  def patchbackend(ui, backend, patchobj, 
     if files is None:
         files = set()
     if eolmode is None:
-        eolmode = ui.config('patch', 'eol', 'strict')
+        eolmode = ui.config('patch', 'eol')
     if eolmode.lower() not in eolmodes:
         raise error.Abort(_('unsupported line endings type: %s') % eolmode)
     eolmode = eolmode.lower()