mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-15 08:56:10 +02:00
UTF8: svn2revisioninc
git-svn-id: trunk@16294 -
This commit is contained in:
parent
88af0e037f
commit
4f55a8ff9d
@ -395,7 +395,7 @@ procedure TLazFindReplaceDialog.SetComboBoxText(AComboBox:TComboBox;
|
|||||||
var a:integer;
|
var a:integer;
|
||||||
begin
|
begin
|
||||||
a:=AComboBox.Items.IndexOf(AText);
|
a:=AComboBox.Items.IndexOf(AText);
|
||||||
//writeln('TLazFindReplaceDialog.SetComboBoxText ',AText,' ',a);
|
//debugln('TLazFindReplaceDialog.SetComboBoxText ',AText,' ',a);
|
||||||
if a>=0 then
|
if a>=0 then
|
||||||
AComboBox.ItemIndex:=a
|
AComboBox.ItemIndex:=a
|
||||||
else begin
|
else begin
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="/"/>
|
||||||
<Version Value="6"/>
|
<Version Value="6"/>
|
||||||
<General>
|
<General>
|
||||||
<Flags>
|
<Flags>
|
||||||
@ -37,8 +37,8 @@
|
|||||||
<Filename Value="lazres.pp"/>
|
<Filename Value="lazres.pp"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="LazRes"/>
|
<UnitName Value="LazRes"/>
|
||||||
<CursorPos X="26" Y="113"/>
|
<CursorPos X="10" Y="122"/>
|
||||||
<TopLine Value="82"/>
|
<TopLine Value="109"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<UsageCount Value="21"/>
|
<UsageCount Value="21"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -46,12 +46,10 @@
|
|||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="8"/>
|
||||||
<PathDelim Value="\"/>
|
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
<HeapSize Value="8000000"/>
|
<HeapSize Value="8000000"/>
|
||||||
<Generate Value="Faster"/>
|
<TargetProcessor Value="PENTIUM"/>
|
||||||
<TargetProcessor Value="1"/>
|
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
@ -60,7 +58,7 @@
|
|||||||
</Linking>
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<ConfigFile>
|
<ConfigFile>
|
||||||
<ConfigFilePath Value=".\fpc.cfg"/>
|
<ConfigFilePath Value="./fpc.cfg"/>
|
||||||
</ConfigFile>
|
</ConfigFile>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<PathDelim Value="/"/>
|
<PathDelim Value="/"/>
|
||||||
<Version Value="5"/>
|
<Version Value="6"/>
|
||||||
<General>
|
<General>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
@ -38,10 +38,9 @@
|
|||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="8"/>
|
||||||
<CodeGeneration>
|
<CodeGeneration>
|
||||||
<SmartLinkUnit Value="True"/>
|
<SmartLinkUnit Value="True"/>
|
||||||
<Generate Value="Faster"/>
|
|
||||||
</CodeGeneration>
|
</CodeGeneration>
|
||||||
<Linking>
|
<Linking>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
|
@ -46,7 +46,7 @@ program Svn2RevisionInc;
|
|||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, CustApp, SysUtils, Process, FileUtil, Dom, XmlRead, GetOpts;
|
Classes, CustApp, SysUtils, Process, LCLProc, FileUtil, Dom, XmlRead, GetOpts;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ begin
|
|||||||
writeln(RevisionIncText, RevisionIncComment);
|
writeln(RevisionIncText, RevisionIncComment);
|
||||||
writeln(RevisionIncText, ConstStart, RevisionStr, ''';');
|
writeln(RevisionIncText, ConstStart, RevisionStr, ''';');
|
||||||
CloseFile(RevisionIncText);
|
CloseFile(RevisionIncText);
|
||||||
writeln(format('Created %s for revision: %s',
|
debugln(format('Created %s for revision: %s',
|
||||||
[RevisionIncFileName, RevisionStr]));
|
[RevisionIncFileName, RevisionStr]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -235,28 +235,28 @@ procedure TSvn2RevisionApplication.ShowHelp;
|
|||||||
Result := ChangeFileExt(ExtractFileName(FileName), '');
|
Result := ChangeFileExt(ExtractFileName(FileName), '');
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
writeln;
|
debugln;
|
||||||
writeln(ParamStrUTF8(0));
|
debugln(ParamStrUTF8(0));
|
||||||
writeln;
|
debugln;
|
||||||
writeln(ExtractFileBaseName(ParamStrUTF8(0)), ' <repository path> <output file> [Options]');
|
debugln(ExtractFileBaseName(ParamStrUTF8(0)), ' <repository path> <output file> [Options]');
|
||||||
writeln('or');
|
debugln('or');
|
||||||
writeln(ExtractFileBaseName(ParamStrUTF8(0)), ' [Options] <repository path> <output file>');
|
debugln(ExtractFileBaseName(ParamStrUTF8(0)), ' [Options] <repository path> <output file>');
|
||||||
writeln('or');
|
debugln('or');
|
||||||
writeln(ExtractFileBaseName(ParamStrUTF8(0)), ' <repository path> [Options] <output file>');
|
debugln(ExtractFileBaseName(ParamStrUTF8(0)), ' <repository path> [Options] <output file>');
|
||||||
writeln;
|
debugln;
|
||||||
writeln('Options:');
|
debugln('Options:');
|
||||||
writeln(' --o Output file');
|
debugln(' --o Output file');
|
||||||
writeln(' --c=<name> Name of constant (default RevisionStr)');
|
debugln(' --c=<name> Name of constant (default RevisionStr)');
|
||||||
writeln(' --s write revision to stdout, do not create inc file');
|
debugln(' --s write revision to stdout, do not create inc file');
|
||||||
writeln(' --v Be more verbose');
|
debugln(' --v Be more verbose');
|
||||||
writeln(' --h This help screen');
|
debugln(' --h This help screen');
|
||||||
writeln;
|
debugln;
|
||||||
writeln('Note: <repository path> default current directory');
|
debugln('Note: <repository path> default current directory');
|
||||||
writeln(' <output file> default revision.inc');
|
debugln(' <output file> default revision.inc');
|
||||||
writeln(' --o overrides <output file>');
|
debugln(' --o overrides <output file>');
|
||||||
writeln;
|
debugln;
|
||||||
writeln(' 1st switchless parameter = <repository path>');
|
debugln(' 1st switchless parameter = <repository path>');
|
||||||
writeln(' 2nd switchless parameter = <output file>');
|
debugln(' 2nd switchless parameter = <output file>');
|
||||||
halt(1);
|
halt(1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -312,19 +312,19 @@ begin
|
|||||||
//checks
|
//checks
|
||||||
if not DirectoryExistsUTF8(SourceDirectory) then
|
if not DirectoryExistsUTF8(SourceDirectory) then
|
||||||
begin
|
begin
|
||||||
writeln('Error: Source directory "', SourceDirectory, '" doesn''t exist.');
|
debugln('Error: Source directory "', SourceDirectory, '" doesn''t exist.');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
RevisionIncDirName:=ExtractFilePath(ExpandFileNameUTF8(RevisionIncFileName));
|
RevisionIncDirName:=ExtractFilePath(ExpandFileNameUTF8(RevisionIncFileName));
|
||||||
if (not UseStdOut) and (not DirectoryExistsUTF8(RevisionIncDirName)) then begin
|
if (not UseStdOut) and (not DirectoryExistsUTF8(RevisionIncDirName)) then begin
|
||||||
writeln('Error: Target Directory "', RevisionIncDirName, '" doesn''t exist.');
|
debugln('Error: Target Directory "', RevisionIncDirName, '" doesn''t exist.');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if ConstName[1] in ['0'..'9'] then
|
if ConstName[1] in ['0'..'9'] then
|
||||||
begin
|
begin
|
||||||
writeln('Error: Invalid constant name ', ConstName, '.');
|
debugln('Error: Invalid constant name ', ConstName, '.');
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ end;
|
|||||||
procedure TSvn2RevisionApplication.Show(msg: string);
|
procedure TSvn2RevisionApplication.Show(msg: string);
|
||||||
begin
|
begin
|
||||||
if Verbose then
|
if Verbose then
|
||||||
Writeln(msg);
|
debugln(msg);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSvn2RevisionApplication.Run;
|
procedure TSvn2RevisionApplication.Run;
|
||||||
@ -359,7 +359,7 @@ begin
|
|||||||
|
|
||||||
if UseStdOut then begin
|
if UseStdOut then begin
|
||||||
if FindRevision then
|
if FindRevision then
|
||||||
writeln(RevisionStr);
|
debugln(RevisionStr);
|
||||||
end
|
end
|
||||||
else if FindRevision or not IsValidRevisionInc then
|
else if FindRevision or not IsValidRevisionInc then
|
||||||
WriteRevisionInc;
|
WriteRevisionInc;
|
||||||
|
Loading…
Reference in New Issue
Block a user