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