Mercurial > hg-stable
changeset 7662:8aa338cd0df3
Update mercurial.ini file packaged in win32 installer
Update contrib/win32/mercurial.ini file with contrib/sample.hgrc
content and append contrib/mergetools.hgrc content during installation
author | Pascal Quantin <pascal.quantin@wavecom.com> |
---|---|
date | Sat, 17 Jan 2009 15:23:13 +0100 |
parents | 09b44d87dd28 |
children | b0a0eb28a933 |
files | contrib/win32/mercurial.ini contrib/win32/mercurial.iss |
diffstat | 2 files changed, 38 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/win32/mercurial.ini Sat Jan 17 15:19:41 2009 +0100 +++ b/contrib/win32/mercurial.ini Sat Jan 17 15:23:13 2009 +0100 @@ -5,6 +5,13 @@ [ui] editor = notepad +; show changed files and be a bit more verbose if True +; verbose = True + +; username data to appear in commits +; it usually takes the form: Joe User <joe.user@host.com> +; username = Joe User <j.user@example.com> + ; By default, we try to encode and decode all files that do not ; contain ASCII NUL characters. What this means is that we try to set @@ -37,5 +44,6 @@ ; Alternatively, you can explicitly specify each file extension that ; you want decoded (any you omit will be left untouched), like this: +; **.txt = dumbdecode: -; **.txt = dumbdecode: +
--- a/contrib/win32/mercurial.iss Sat Jan 17 15:19:41 2009 +0100 +++ b/contrib/win32/mercurial.iss Sat Jan 17 15:23:13 2009 +0100 @@ -1,8 +1,7 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! - [Setup] -AppCopyright=Copyright 2005-2008 Matt Mackall and others +AppCopyright=Copyright 2005-2009 Matt Mackall and others AppName=Mercurial AppVerName=Mercurial snapshot InfoAfterFile=contrib/win32/postinstall.txt @@ -18,7 +17,7 @@ DefaultDirName={pf}\Mercurial SourceDir=..\.. VersionInfoDescription=Mercurial distributed SCM -VersionInfoCopyright=Copyright 2005-2008 Matt Mackall and others +VersionInfoCopyright=Copyright 2005-2009 Matt Mackall and others VersionInfoCompany=Matt Mackall and others InternalCompressLevel=max SolidCompression=true @@ -32,7 +31,8 @@ Source: contrib\vim\*.*; DestDir: {app}/Contrib/Vim Source: contrib\zsh_completion; DestDir: {app}/Contrib Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme -Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Flags: confirmoverwrite +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') Source: dist\library.zip; DestDir: {app} @@ -64,8 +64,32 @@ [UninstallDelete] Type: files; Name: "{app}\hg.exe.local" +[Code] +var + WriteFile: Boolean; + CheckDone: Boolean; -[Code] +function CheckFile(): Boolean; +begin + if not CheckDone then begin + WriteFile := True; + if FileExists(ExpandConstant(CurrentFileName)) then begin + WriteFile := MsgBox('' + ExpandConstant(CurrentFileName) + '' #13#13 'The file already exists.' #13#13 'Would you like Setup to overwrite it?', mbConfirmation, MB_YESNO) = idYes; + end; + CheckDone := True; + end; + Result := WriteFile; +end; + +procedure ConcatenateFiles(); +var + MergeConfigs: TArrayOfString; +begin + if LoadStringsFromFile(ExpandConstant('{tmp}\mergetools.hgrc'),MergeConfigs) then begin + SaveStringsToFile(ExpandConstant(CurrentFileName),MergeConfigs,True); + end; +end; + procedure Touch(fn: String); begin SaveStringToFile(ExpandConstant(fn), '', False);