Patchwork [2,of,2] config: move mergetools configuration from contrib to default configuration

login
register
mail settings
Submitter Mads Kiilerich
Date Nov. 2, 2014, 4:06 p.m.
Message ID <a694e00352fdf48b1c0b.1414944360@localhost.localdomain>
Download mbox | patch
Permalink /patch/6532/
State Accepted
Headers show

Comments

Mads Kiilerich - Nov. 2, 2014, 4:06 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1413681743 -7200
#      Sun Oct 19 03:22:23 2014 +0200
# Branch stable
# Node ID a694e00352fdf48b1c0bdea7095e3a8067b71169
# Parent  5ae61db1890019841e9178c5b7fb56a9aba1af1e
config: move mergetools configuration from contrib to default configuration

The merge tool configuration is an essential part of a good initial user
experience. 'make osx' installers and direct 'make' installation did not have
merge tool configuration. Now they have.

Note: The installer fixes for windows have been done blindly and might require
additional changes.

diff --git a/contrib/mergetools.hgrc b/mercurial/default.d/mergetools.rc
rename from contrib/mergetools.hgrc
rename to mercurial/default.d/mergetools.rc
Matt Harbison - Nov. 3, 2014, 12:06 a.m.
On Sun, 02 Nov 2014 17:06:00 +0100, Mads Kiilerich wrote:

> # HG changeset patch # User Mads Kiilerich <madski@unity3d.com>
> # Date 1413681743 -7200 #      Sun Oct 19 03:22:23 2014 +0200 # Branch
> stable # Node ID a694e00352fdf48b1c0bdea7095e3a8067b71169 # Parent 
> 5ae61db1890019841e9178c5b7fb56a9aba1af1e config: move mergetools
> configuration from contrib to default configuration
> 
> The merge tool configuration is an essential part of a good initial user
> experience. 'make osx' installers and direct 'make' installation did not
> have merge tool configuration. Now they have.
> 
> Note: The installer fixes for windows have been done blindly and might
> require additional changes.

It's entirely possible I screwed something up with the Windows installer 
because it's the first time I attempted to build it, but I didn't get a 
hgrc.d folder created on my Win7 x64 system (I built a 32 bit installer).  
The merge-tools are still listed in the system mercurial.ini though:

$ hg.exe --debug showconfig merge-tools
read config from: c:\Program Files (x86)\Mercurial2\mercurial.ini
read config from: C:\MinGW\msys\1.0\home\Matt\mercurial.ini
read config from: C:\MinGW\msys\1.0\home\Matt\.hgrc
read config from: C:\Users\Matt\mercurial.ini
read config from: C:\Users\Matt\.hgrc
c:\Program Files (x86)\Mercurial2\mercurial.ini:102: merge-
tools.kdiff3.args=...

I very much like the idea of making a consistent stock configuration 
available to all platforms though.

--Matt
Matt Mackall - Nov. 3, 2014, 9:40 p.m.
On Sun, 2014-11-02 at 17:06 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1413681743 -7200
> #      Sun Oct 19 03:22:23 2014 +0200
> # Branch stable
> # Node ID a694e00352fdf48b1c0bdea7095e3a8067b71169
> # Parent  5ae61db1890019841e9178c5b7fb56a9aba1af1e
> config: move mergetools configuration from contrib to default configuration

These are queued for default, thanks.

Patch

diff --git a/contrib/mercurial.spec b/contrib/mercurial.spec
--- a/contrib/mercurial.spec
+++ b/contrib/mercurial.spec
@@ -126,7 +126,6 @@  install -m 644 contrib/mercurial.el $RPM
 install -m 644 contrib/mq.el $RPM_BUILD_ROOT%{emacs_lispdir}/
 
 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
-install -m 644 contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -149,7 +148,6 @@  rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{_sysconfdir}/bash_completion.d/mercurial.sh
 %dir %{_sysconfdir}/mercurial
 %dir %{_sysconfdir}/mercurial/hgrc.d
-%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
 %if "%{?withpython}"
 %{_bindir}/%{pythonhg}
 %{hgpyprefix}
diff --git a/contrib/win32/mercurial.iss b/contrib/win32/mercurial.iss
--- a/contrib/win32/mercurial.iss
+++ b/contrib/win32/mercurial.iss
@@ -67,7 +67,6 @@  Source: contrib\mq.el; DestDir: {app}/Co
 Source: contrib\hgweb.fcgi; DestDir: {app}/Contrib
 Source: contrib\hgweb.wsgi; DestDir: {app}/Contrib
 Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme
-Source: contrib\mergetools.hgrc; DestDir: {tmp};
 Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Check: CheckFile; AfterInstall: ConcatenateFiles;
 Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt
 Source: dist\hg.exe; DestDir: {app}; AfterInstall: Touch('{app}\hg.exe.local')
@@ -86,6 +85,7 @@  Source: dist\cacert.pem; Destdir: {app}
 Source: doc\*.html; DestDir: {app}\Docs
 Source: doc\style.css; DestDir: {app}\Docs
 Source: mercurial\help\*.txt; DestDir: {app}\help
+Source: mercurial\default-hgrc.d\*.rc; DestDir: {app}\default-hgrc.d
 Source: mercurial\locale\*.*; DestDir: {app}\locale; Flags: recursesubdirs createallsubdirs skipifsourcedoesntexist
 Source: mercurial\templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs
 Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt
diff --git a/contrib/wix/mercurial.wxs b/contrib/wix/mercurial.wxs
--- a/contrib/wix/mercurial.wxs
+++ b/contrib/wix/mercurial.wxs
@@ -79,7 +79,7 @@ 
                     ReadOnly='yes' KeyPath='yes'/>
             </Component>
             <Component Id='mergetools.rc' Guid='$(var.mergetools.rc.guid)' Win64='$(var.IsX64)'>
-              <File Id='mergetools.rc' Name='MergeTools.rc' Source='contrib\mergetools.hgrc'
+              <File Id='mergetools.rc' Name='MergeTools.rc' Source='mercurial\default-hgrc.d\mergetools.rc'
                     ReadOnly='yes' KeyPath='yes'/>
             </Component>
             <Component Id='paths.rc' Guid='$(var.paths.rc.guid)' Win64='$(var.IsX64)'>