mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 23:38:02 +02:00
initial import of the Lazarus SVN IDE plugin
documentation will be collected here: http://wiki.lazarus.freepascal.org/LazSVNPkg git-svn-id: trunk@17160 -
This commit is contained in:
parent
8436b0266e
commit
373eada5b8
34
.gitattributes
vendored
34
.gitattributes
vendored
@ -875,6 +875,40 @@ components/lazreport/source/lr_view.lrs svneol=native#text/plain
|
||||
components/lazreport/source/lr_view.pas svneol=native#text/pascal
|
||||
components/lazreport/source/sysutilsadds.pas svneol=native#text/pascal
|
||||
components/lazreport/tools/localize.sh svneol=native#text/plain
|
||||
components/lazsvnpkg/images/menu_svn.png -text
|
||||
components/lazsvnpkg/images/menu_svn_commit.png -text
|
||||
components/lazsvnpkg/images/menu_svn_diff.png -text
|
||||
components/lazsvnpkg/images/menu_svn_log.png -text
|
||||
components/lazsvnpkg/images/menu_svn_update.png -text
|
||||
components/lazsvnpkg/lazsvnintf.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/lazsvnpkg.lpk svneol=native#text/plain
|
||||
components/lazsvnpkg/lazsvnpkg.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/lazsvnpkg_images.bat svneol=native#text/plain
|
||||
components/lazsvnpkg/lazsvnpkg_images.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/lazsvnpkg_images.sh svneol=native#text/plain
|
||||
components/lazsvnpkg/lazsvnpkg_images_list.txt svneol=native#text/plain
|
||||
components/lazsvnpkg/svnaddprojectform.lfm svneol=native#text/plain
|
||||
components/lazsvnpkg/svnaddprojectform.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/svnaddprojectform.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/svnclasses.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/svncommitform.lfm svneol=native#text/plain
|
||||
components/lazsvnpkg/svncommitform.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/svncommitform.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/svndiffform.lfm svneol=native#text/plain
|
||||
components/lazsvnpkg/svndiffform.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/svndiffform.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/svnlogform.lfm svneol=native#text/plain
|
||||
components/lazsvnpkg/svnlogform.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/svnlogform.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/svnsettingsform.lfm svneol=native#text/plain
|
||||
components/lazsvnpkg/svnsettingsform.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/svnsettingsform.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/svnstatusform.lfm svneol=native#text/plain
|
||||
components/lazsvnpkg/svnstatusform.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/svnstatusform.pas svneol=native#text/plain
|
||||
components/lazsvnpkg/svnupdateform.lfm svneol=native#text/plain
|
||||
components/lazsvnpkg/svnupdateform.lrs svneol=native#text/plain
|
||||
components/lazsvnpkg/svnupdateform.pas svneol=native#text/plain
|
||||
components/lazthread/lazthread.lpk svneol=native#text/plain
|
||||
components/lazthread/lazthread.pas svneol=native#text/plain
|
||||
components/lazthread/reglazthread.pas svneol=native#text/plain
|
||||
|
BIN
components/lazsvnpkg/images/menu_svn.png
Normal file
BIN
components/lazsvnpkg/images/menu_svn.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 590 B |
BIN
components/lazsvnpkg/images/menu_svn_commit.png
Normal file
BIN
components/lazsvnpkg/images/menu_svn_commit.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 609 B |
BIN
components/lazsvnpkg/images/menu_svn_diff.png
Normal file
BIN
components/lazsvnpkg/images/menu_svn_diff.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 935 B |
BIN
components/lazsvnpkg/images/menu_svn_log.png
Normal file
BIN
components/lazsvnpkg/images/menu_svn_log.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 574 B |
BIN
components/lazsvnpkg/images/menu_svn_update.png
Normal file
BIN
components/lazsvnpkg/images/menu_svn_update.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 647 B |
171
components/lazsvnpkg/lazsvnintf.pas
Normal file
171
components/lazsvnpkg/lazsvnintf.pas
Normal file
@ -0,0 +1,171 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit LazSVNIntf;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLtype, LResources, ProjectIntf;
|
||||
|
||||
procedure ProcSVNLog(Sender: TObject);
|
||||
procedure ProcSVNCommit(Sender: TObject);
|
||||
procedure ProcSVNUpdate(Sender: TObject);
|
||||
procedure ProcSVNDiff(Sender: TObject);
|
||||
procedure ProcSVNSettings(Sender: TObject);
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
MenuIntf, IDECommands, Controls, Forms, Dialogs,
|
||||
SVNLogForm, SVNUpdateForm, SVNDiffForm, SVNStatusForm, LazIDEIntf, SVNClasses,
|
||||
SVNSettingsForm, SrcEditorIntf;
|
||||
|
||||
var
|
||||
CmdSVNLog : TIDECommand;
|
||||
CmdSVNCommit : TIDECommand;
|
||||
CmdSVNUpdate : TIDECommand;
|
||||
CmdSVNDiff : TIDECommand;
|
||||
CmdSVNSettings : TIDECommand;
|
||||
|
||||
procedure Register;
|
||||
var
|
||||
Key: TIDEShortCut;
|
||||
Cat: TIDECommandCategory;
|
||||
mnuSVNMain : TIDEMenuSection;
|
||||
mnuSVNSection : TIDEMenuSection;
|
||||
begin
|
||||
Key:=IDEShortCut(VK_UNKNOWN,[],VK_UNKNOWN,[]);
|
||||
|
||||
{$ifndef USECustomCategory}
|
||||
Cat:=IDECommandList.CreateCategory(nil, 'SVN', rsSVNTools,
|
||||
IDECmdScopeSrcEditOnly);
|
||||
{$else}
|
||||
cat:=nil;
|
||||
{$endif}
|
||||
|
||||
CmdSVNLog:=RegisterIDECommand(Cat, 'SVNLog', 'SVN log', Key, nil, @ProcSVNLog);
|
||||
CmdSVNCommit:=RegisterIDECommand(Cat, 'SVNCommit', 'SVN commit', Key, nil, @ProcSVNCommit);
|
||||
CmdSVNUpdate:=RegisterIDECommand(Cat, 'SVNUpdate', 'SVN update', Key, nil, @ProcSVNUpdate);
|
||||
CmdSVNDiff:=RegisterIDECommand(Cat, 'SVNDiff', 'SVN diff', Key, nil, @ProcSVNDiff);
|
||||
CmdSVNSettings:=RegisterIDECommand(Cat, 'SVNSettings', 'SVN settings', Key, nil, @ProcSVNSettings);
|
||||
|
||||
{$note add menu_svn bitmap in the main menu}
|
||||
mnuSVNMain := RegisterIDEMenuSection(itmCustomTools, 'SVN');
|
||||
mnuSVNSection:=RegisterIDESubMenu(mnuSVNMain, 'SVN', 'SVN', nil, nil);
|
||||
RegisterIDEMenuCommand(mnuSVNSection, 'SVNLog', rsShowLog, nil, nil,
|
||||
CmdSVNLog, 'menu_svn_log');
|
||||
RegisterIDEMenuCommand(mnuSVNSection, 'SVNCommit', rsCommit, nil, nil,
|
||||
CmdSVNCommit, 'menu_svn_commit');
|
||||
RegisterIDEMenuCommand(mnuSVNSection, 'SVNUpdate', rsUpdate, nil, nil,
|
||||
CmdSVNUpdate, 'menu_svn_update');
|
||||
RegisterIDEMenuCommand(mnuSVNSection, 'SVNDiff', rsShowDiff, nil, nil,
|
||||
CmdSVNDiff, 'menu_svn_diff');
|
||||
RegisterIDEMenuCommand(mnuSVNSection, 'SVNSettings', rsSettings, nil, nil,
|
||||
CmdSVNSettings, 'menu_environment_options');
|
||||
|
||||
SVNSettingsFrm := TSVNSettingsFrm.Create(nil);
|
||||
end;
|
||||
|
||||
procedure ProcSVNLog(Sender: TObject);
|
||||
var
|
||||
Repo: string;
|
||||
IsActive: boolean;
|
||||
begin
|
||||
If Assigned(LazarusIDE) and Assigned(LazarusIDE.ActiveProject) then
|
||||
begin
|
||||
Repo := ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||
IsActive := SVNSettings.RepositoryByPath(LazarusIDE.ActiveProject.ProjectInfoFile, Repo);
|
||||
|
||||
if IsActive then
|
||||
ShowSVNLogFrm(Repo)
|
||||
else
|
||||
ShowMessage(rsProjectIsNotActiveInSVNSettingsPleaseActivateFirst);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ProcSVNCommit(Sender: TObject);
|
||||
var
|
||||
Repo: string;
|
||||
IsActive: boolean;
|
||||
begin
|
||||
If Assigned(LazarusIDE) and Assigned(LazarusIDE.ActiveProject) then
|
||||
begin
|
||||
Repo := ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||
IsActive := SVNSettings.RepositoryByPath(LazarusIDE.ActiveProject.ProjectInfoFile, Repo);
|
||||
|
||||
if IsActive then
|
||||
ShowSVNStatusFrm(Repo)
|
||||
else
|
||||
ShowMessage(rsProjectIsNotActiveInSVNSettingsPleaseActivateFirst);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ProcSVNUpdate(Sender: TObject);
|
||||
var
|
||||
Repo: string;
|
||||
IsActive: boolean;
|
||||
begin
|
||||
If Assigned(LazarusIDE) and Assigned(LazarusIDE.ActiveProject) then
|
||||
begin
|
||||
Repo := ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||
IsActive := SVNSettings.RepositoryByPath(LazarusIDE.ActiveProject.ProjectInfoFile, Repo);
|
||||
|
||||
if IsActive then
|
||||
ShowSVNUpdateFrm(Repo)
|
||||
else
|
||||
ShowMessage(rsProjectIsNotActiveInSVNSettingsPleaseActivateFirst);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ProcSVNDiff(Sender: TObject);
|
||||
var
|
||||
Repo: string;
|
||||
IsActive: boolean;
|
||||
SrcFile: string;
|
||||
begin
|
||||
If Assigned(LazarusIDE) and Assigned(LazarusIDE.ActiveProject) then
|
||||
begin
|
||||
Repo := ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||
IsActive := SVNSettings.RepositoryByPath(LazarusIDE.ActiveProject.ProjectInfoFile, Repo);
|
||||
if IsActive then
|
||||
begin
|
||||
SrcFile := SourceEditorWindow.ActiveEditor.FileName;
|
||||
|
||||
if LazarusIDE.ActiveProject.FindFile(SrcFile, [pfsfOnlyEditorFiles]).IsPartOfProject then
|
||||
ShowSVNDiffFrm('-r PREV', SrcFile)
|
||||
else
|
||||
ShowMessage(rsSourceFileDoesNotBelongToTheProjectPleaseAddFirst);
|
||||
end
|
||||
else
|
||||
ShowMessage(rsProjectIsNotActiveInSVNSettingsPleaseActivateFirst);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure ProcSVNSettings(Sender: TObject);
|
||||
begin
|
||||
ShowSVNSettingsFrm;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I lazsvnpkg_images.lrs}
|
||||
|
||||
end.
|
137
components/lazsvnpkg/lazsvnpkg.lpk
Normal file
137
components/lazsvnpkg/lazsvnpkg.lpk
Normal file
@ -0,0 +1,137 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<Package Version="3">
|
||||
<PathDelim Value="\"/>
|
||||
<Name Value="lazsvnpkg"/>
|
||||
<Author Value="Darius Blaszyk"/>
|
||||
<CompilerOptions>
|
||||
<Version Value="8"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value="$(LazarusDir)\lcl\units\$(TargetCPU)-$(TargetOS)\;$(LazarusDir)\ideintf\units\$(TargetCPU)-$(TargetOS)\;$(LazarusDir)\components\lazsvnpkg\lib\$(TargetCPU)-$(TargetOS)\;$(LazarusDir)\units\$(TargetCPU)-$(TargetOS)\;$(LazarusDir)\components\codetools\units\$(TargetCPU)-$(TargetOS)\;$(LazarusDir)\components\synedit\units\$(TargetCPU)-$(TargetOS)\"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<CStyleOperator Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Description Value="A Lazarus SVN IDE plugin"/>
|
||||
<License Value="GPL"/>
|
||||
<Version Release="1"/>
|
||||
<Files Count="20">
|
||||
<Item1>
|
||||
<Filename Value="svnlogform.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="svnlogform.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="svnlogform.pas"/>
|
||||
<UnitName Value="SVNLogForm"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="svnupdateform.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<Filename Value="svnupdateform.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item5>
|
||||
<Item6>
|
||||
<Filename Value="svnupdateform.pas"/>
|
||||
<UnitName Value="SVNUpdateForm"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<Filename Value="svndiffform.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
</Item7>
|
||||
<Item8>
|
||||
<Filename Value="svndiffform.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item8>
|
||||
<Item9>
|
||||
<Filename Value="svndiffform.pas"/>
|
||||
<UnitName Value="SVNDiffForm"/>
|
||||
</Item9>
|
||||
<Item10>
|
||||
<Filename Value="svnsettingsform.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
</Item10>
|
||||
<Item11>
|
||||
<Filename Value="svnsettingsform.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item11>
|
||||
<Item12>
|
||||
<Filename Value="svnsettingsform.pas"/>
|
||||
<UnitName Value="SVNSettingsForm"/>
|
||||
</Item12>
|
||||
<Item13>
|
||||
<Filename Value="svnclasses.pas"/>
|
||||
<UnitName Value="SVNClasses"/>
|
||||
</Item13>
|
||||
<Item14>
|
||||
<Filename Value="svnstatusform.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
</Item14>
|
||||
<Item15>
|
||||
<Filename Value="svnstatusform.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item15>
|
||||
<Item16>
|
||||
<Filename Value="svnstatusform.pas"/>
|
||||
<UnitName Value="SVNStatusForm"/>
|
||||
</Item16>
|
||||
<Item17>
|
||||
<Filename Value="svncommitform.lfm"/>
|
||||
<Type Value="LFM"/>
|
||||
</Item17>
|
||||
<Item18>
|
||||
<Filename Value="svncommitform.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item18>
|
||||
<Item19>
|
||||
<Filename Value="svncommitform.pas"/>
|
||||
<UnitName Value="SVNCommitForm"/>
|
||||
</Item19>
|
||||
<Item20>
|
||||
<Filename Value="lazsvnintf.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="LazSVNIntf"/>
|
||||
</Item20>
|
||||
</Files>
|
||||
<Type Value="DesignTime"/>
|
||||
<RequiredPkgs Count="5">
|
||||
<Item1>
|
||||
<PackageName Value="IDEIntf"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="SynEdit"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="CodeTools"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<PackageName Value="FCL"/>
|
||||
<MinVersion Major="1" Valid="True"/>
|
||||
</Item5>
|
||||
</RequiredPkgs>
|
||||
<UsageOptions>
|
||||
<UnitPath Value="$(PkgOutDir)\"/>
|
||||
</UsageOptions>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<DestinationDirectory Value="$(TestDir)\publishedpackage\"/>
|
||||
<IgnoreBinaries Value="False"/>
|
||||
</PublishOptions>
|
||||
</Package>
|
||||
</CONFIG>
|
22
components/lazsvnpkg/lazsvnpkg.pas
Normal file
22
components/lazsvnpkg/lazsvnpkg.pas
Normal file
@ -0,0 +1,22 @@
|
||||
{ This file was automatically created by Lazarus. do not edit!
|
||||
This source is only used to compile and install the package.
|
||||
}
|
||||
|
||||
unit lazsvnpkg;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
SVNLogForm, SVNUpdateForm, SVNDiffForm, SVNSettingsForm, SVNClasses,
|
||||
SVNStatusForm, SVNCommitForm, LazSVNIntf, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
RegisterUnit('LazSVNIntf', @LazSVNIntf.Register);
|
||||
end;
|
||||
|
||||
initialization
|
||||
RegisterPackage('lazsvnpkg', @Register);
|
||||
end.
|
1
components/lazsvnpkg/lazsvnpkg_images.bat
Normal file
1
components/lazsvnpkg/lazsvnpkg_images.bat
Normal file
@ -0,0 +1 @@
|
||||
..\..\tools\lazres lazsvnpkg_images.lrs @lazsvnpkg_images_list.txt
|
145
components/lazsvnpkg/lazsvnpkg_images.lrs
Normal file
145
components/lazsvnpkg/lazsvnpkg_images.lrs
Normal file
@ -0,0 +1,145 @@
|
||||
LazarusResources.Add('menu_svn','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
+#0#0#0#1'sRGB'#0#174#206#28#233#0#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167
|
||||
+#147#0#0#0#9'pHYs'#0#0#11#19#0#0#11#19#1#0#154#156#24#0#0#0#7'tIME'#7#216#10
|
||||
+#23#6':'#11#3'18&'#0#0#0#25'tEXtComment'#0'Created with GIMPW'#129#14#23#0#0
|
||||
+#1#169'IDAT8'#203#197#147#203'n'#211'`'#16#133'?''v'#226#216#142'ss'#3'I'#218
|
||||
+#146#150' '#4#18']'#240':<'#7#15#129'X'#241#16#149#128#21#176#134#13#176'aA)'
|
||||
+'H'#136'6(m'#10'mR'#146'T&'#142#147#223'n'#140''#22#160'@'#213#11#149#186'`'
|
||||
+'V3'#163'9'#163'9gf'#20'!'#4#23#177#4#23'4'#245#222#234'{y'#222'b'''#175#179
|
||||
+'X'#206'R+[T'#29#147'R.'#131'z'#22#160#148#211'Y'#174#230#168'Wl'#22#202#22
|
||||
+#195'q'#200'n'#207#167#221#245'x'#243'q'#159#131'ap'#180'A2'#161'P'#175#216
|
||||
+'\_,pm!O"'#161#176#185#227#178#254#185#207#147#151'-'#166'Q|'#156#2'@'#189'b'
|
||||
+#179#210'p'#184'q'#165'@:'#149'dc'#199#229#217#235'-'#182';'#222'?i)'#7'C!'
|
||||
+#139#182'>K<~'#209#228'S'#219#157#197'i-'#137'ehd'#141#20#182#153'"'#251#219
|
||||
+'7u'#141#140#174#162'H)'#143#136'8'#9#166#140#131#8'MM`'#234#26#154'z'#246
|
||||
+#162#142'5'#144'R"'#194#8'o|'#136'/'#166'x'#227'CD'#24'!'#194#136'8'#150#204
|
||||
+#151#179#220'\*'#254#209#224#233#171'-D'#16#225#139'_'#0'2'#229'G|'#242'f'
|
||||
+#211'Z'#146#185#130'1'#139#221'Q'#128#186#222#236's'#247#206'm'#238#175#174
|
||||
+#157':fm'#206#228#214'U'#135#149#134#131#148#146#183#27'=>'#180#6'|'#217#31
|
||||
+#157'|'#7'VF'#163'^'#177'Y'#170#218'4'#230#243#136'0'#162#181'7'#228#225#243
|
||||
+'&_'#191#141#248#155#180#242#224#209';'#233#228'3\*'#26'\.'#25#212#28#139'XJ'
|
||||
+#218']'#143'v'#215'c'#187#227#225#139#233#233'"'#186#163'@'#14#190#11':'#131
|
||||
+'1{='#159#221#190#207'$'#136#206#253#11#202''#255#198#159'f'#250#179't'#227
|
||||
+'W'#25#240#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('menu_svn_commit','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
+#0#0#0#1'sRGB'#0#174#206#28#233#0#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167
|
||||
+#147#0#0#0#9'pHYs'#0#0#13#215#0#0#13#215#1'B('#155'x'#0#0#0#7'tIME'#7#216#10
|
||||
+#29#0#13'7'#215'ixC'#0#0#1#225'IDAT8'#203#165#146#189'kSa'#20#135#159#155'{'
|
||||
+#243'F'#210'$'#152'"'#137#193'R'#16#132'`'#227'G'#161#14'B'#131#16#131#144
|
||||
+#193'\p,:t'#241'nN'#14'n'#234#208#255'A'#184' '#148':'#24'D'#151't'#233#160
|
||||
+')'#218'h'#29'"~t'#208'*'#164#141#208'6'#138#145#154#146'4'#189#185#31'.5\/'
|
||||
+#177#25'<'#219#251#158#243'{8'#191's'#14#244#137'[3L'#170#186'pT]d'#24#16'>'
|
||||
+#239#135#170#139#204#199#152'(OOi'#0#165'A'#16#159'W'#12#148#166#167'4'#150
|
||||
+#215#31#147#206#157#25#8#145#250#137'_'#174'='#234#21#196#15#143'R^'#248#0'p'
|
||||
+#177#168#25#139'}'#1#170'.'#178#192'S'#175#184#15#228'\Q3'#222#252#5'Pu1'#1
|
||||
+'T'#246'='#211'1['#24'?'#150'X'#217'm'#2#160#133#194#236#180#187#148'"'#177
|
||||
+#190#16#5#168#0#204'>'#212#1#184'~'#245#6#13' '#237'W(wM^'#155#240#228'U'#29
|
||||
+#168#255#209'T'#220#214#149#162'f'#184#231#224't'#173#14#0#191#148' '#202#222
|
||||
+'v'#175'Uw'#221'Ak|'#135#227#244#30'Wh'#29'x'#3#11#5'E'#246#2#222'v'#27'kU)r'
|
||||
+#138']'#159'`+'#16'u'#175'x'#220#11'p@'#242#2#10#155#207#150#182'""NX2'#0'0'
|
||||
+#204'^GY'#207#205#132#238'5}'#9'/'#224#249#162'c4'#172#239'U;'#28#205#208'>'
|
||||
+#20'b'#220'nq)'#224'w'#128#219#170'.r'#251#226#220'e'#199#188#11'\'#144#221
|
||||
+#234#213'y'#203'J'#230#229#234#251'Z'#237#236#216#145#232'Hpx'#12#147'6'#201
|
||||
+#152#144'B?'#183#3'_'#12#233'Z2/'#223#201#202'N*5y'#242#219#242#215'FS'#246
|
||||
+#250'Z'#157#183'6'#146'yys'#165#182#30#27'u'#172#136'8:1'#180#19'>N"1'#204
|
||||
+#233'cQ'#251#252#137#145#206'PP'#217'x'#240#185#254#201#216'3'#11#210#191'&'
|
||||
+#172#234'"'#5#220#12#248'E'#218#178#237#184'i'#153#17'W'#250#5'p'#191#168#25
|
||||
+'s'#252'o'#252#6#235#254#187'''i'#245#194#185#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('menu_svn_update','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
+#0#0#0#1'sRGB'#0#174#206#28#233#0#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167
|
||||
+#147#0#0#0#9'pHYs'#0#0#11#19#0#0#11#19#1#0#154#156#24#0#0#0#7'tIME'#7#216#10
|
||||
+#29#0#13#15#255'k'#192#221#0#0#2#7'IDAT8'#203#165#147']HSa'#24#199#255#239
|
||||
+#249#236'8'#221'<'#139#197#152#212#250#208'4'#7'I'#150'W'#5'"'#20#221'xa'#8
|
||||
+'}@aT'#23']F'#23#193#194#213#133#23#134#23#221#4'A]'#25'D'#23#217#232#194#139
|
||||
+#152#160#172'X'#209#130'R'#130#172'i'#208#208'E'#24's'#186#205#206#220#206
|
||||
+#206'y'#186#200#29#166#156','#234#15'/'#188#239#243#188#207#143#231#249#243
|
||||
+#190#140#136#240'?b'#149'M'#244#209#158#155#0#174'p'#229'L='#177'- '#198#138
|
||||
+'D'#172'l'#24#165#143#207#19#203#157#3#131#186'f'#11#136#13#195'kJ'#234#221
|
||||
+'m'#254#246#30#213#227#131'R'#23#128#161'g'#24#207#229'Q\'#149'03'#249#164
|
||||
+#184#170#233#239#163#159#150'.'#15#12#234#239'6'#2#248#11#167'|'#231#154';N4'
|
||||
+#151'V'#150#26#23'f'''#216#247#212'3'#230#243#31'@:'#245#16#249#229#215'hj;#'
|
||||
+'(5hp#'#219#189#189#165#252#248'E'#204#204'U'#3'8"'#19'3/'#239#143',|'#30#223
|
||||
+#219'q2'#199#21'sf'#195#228#216#157'7.o'#31'd'#137'Gz'#254#1#28#181#26'v'#7
|
||||
+#246#251#142#182#186'"'#253#215'%'#135#173#7#213#138#220'C'#143#163#158'==xH'
|
||||
+'@'#246#135#23#0#224#244't'#227#213#216#200#7#130'<u'#172#239#235'Y'#171#3';'
|
||||
+#128'CF'#18#5#2'Ww'#201#138'i'#185#183'8|'#252't#'#204'R`'#221#8'v'#128'#'
|
||||
+#231'1'#181'1VXI'#2#224'd'#158'3'#189''#4'T+'#147#249#6'E'#169#133#211#185
|
||||
+#21'<'#207' '#209#226':'#128'P}'#136#13#195#246'U'#9#162#180#230#152#176#233
|
||||
+'=+'#169'/^'#179#214'tT'#160#194'\;eg'#247'Qi~'''#233#169'&'#210#243'a'#170
|
||||
+'@8'#155#249'Y|t'#8#0#240'e'#250'6v'#248'['#0#0#146#172#160'l'#170#128#235#22
|
||||
+#226#225'^'#232#6'<'#191#245' '#146#16#221#241#209'!'#236'j'#189#10#129#151
|
||||
+#192#0#144'i@t'#247'#'#30#238'E$!'#186#187'."'#189#169'y'#161#160#168#254#26
|
||||
+'''HZ'#178#205'j;'#20#20#213#191#254'i'#22#228'_'#138'+'#186#177#6#9#5#197#26
|
||||
+#187#252'O'#228#185#218'P'#168#236#241'|'#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('menu_svn_diff','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
+#0#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167#147#0#0#0#9'pHYs'#0#0#13#215#0#0
|
||||
+#13#215#1'B('#155'x'#0#0#0#7'tIME'#7#213#6#29#17#18#8#200#223'lx'#0#0#3'4IDA'
|
||||
+'T8'#203#165#147'[hTw'#16#198'g'#254#231#178#231#156#205#222#226'n6'#169#27
|
||||
+'4'#136#26#139#151'6'#27'['#179'T'#173#164'>'#24'|P4'#20#20#162#146'B'#169
|
||||
+#171#173#15'5M5TZ4D'#193#18#164'Thk'#21#164#133'&/}'#170#180#198#16'/H'#172
|
||||
+'h@'#163#193'['#196'd'#147#205#222#183#155#205#238#158'=9'#243#247'%'#27'Z'
|
||||
+#241#173#31#12'3'#204#195#143'o'#24'>'#132'W'#212#214'~'#248'7'#189#144#223
|
||||
+#138#136'*qB'#206#249#140#205'f'#191#216'y'#188#235#19'x'#141#196#210#240'E'
|
||||
+#251#225#13#185'|'#254#175#230#157#205#178#195'Q'#142'E'#195#228'&'#7#144#5
|
||||
+#180'NgR'#31'g2'#211'{'#237'v[c'#231#241#174#155#255#6' '#0#192#177#175';'
|
||||
+#214#166#211#233'['#193#253#159'a'#223#221#201#226'HR,('#154#166#154#196#165
|
||||
+'\6'#155#241#191#1'J'#227#219'>'#185#251#204'i'#170#240'T'#212'w'#28'=6'#244
|
||||
+#31#7#137'Dr'#224#211#3#135#240#247#219'QcJ'#183'K'#187'6'#249#178#11#23'h'
|
||||
+#255#152'D'#174#161#231#233#196#141#145#216#162#233#191#195#197#131#193'Cr'
|
||||
+#247#153'o'#175#1#128#173#4#16':'#190':'#210#230#175#171#223'<'#154#20#205
|
||||
+#209#25'M'#250#168'qI'#164#202#165#162'"3'#137#8'd'#213'"'#166'r'#250#236#195
|
||||
+#231'I'#170#177'P'#206#240#186#20'\'#189'fU'#246#234#192#181'['#0#0','#145
|
||||
+#136#159#244#215#249#165#193#23#134#28'X'#238'6'#4#6'n'#221'0'#157'y}V3'#137
|
||||
+#4#211'4'#221#145#148#238'A'#192#240'p'#4#228'w'#214#190#171'D'#163#145#238
|
||||
+#249#19'$I'#226#4#12#173'v'#7'('#178'x/'#147'7'#152'br]'#20#176'H'#196#151
|
||||
+#246#220#8#157'4'#136#202#128#131'+m'#136#159#171#170#6#146'$'#241'y'#0#17
|
||||
+#205'Z$Q'#146#24#231'O&'#166#167#24#218#152#171#12'L'#189'h'#134#199'b'#185
|
||||
+#144'N'#20#23'8'#18'0'#174#204#26#134#169#235#186'@D'#198'<'#192#235#245#222
|
||||
+#153#152#152#168'w'#200'2>'#30#143#151#143#199's79'#131'("'#139' q'#183#0'0'
|
||||
+#3#200#173#201'Xt}'#237#162'rL&'#19'zee'#213'`'#9#192'DQ'#252#177''#224'Jx'
|
||||
+#171#223'+'#168'V5`r'#178#1'G'#6#156#139#28#200'A'#8'r'#161'P'#168'py<'#239
|
||||
+'oy'#203#195'~'#190'p.'#147'N'#167#250#231#191'p'#165#175'h'#197#155#181'mV'
|
||||
+#139#168#175'\V'#163#141#198#139#245#177'p'#200#163#170#234'3'#226'T'#27#25
|
||||
+''#177#221#229'v'#239#222#177'J'#132#193#235'rU'#209'0'#22#139'5'#212',Y|'
|
||||
+#225#225#131#145#172#0#0#176'c'#231#246#203#195#15#238#239#231#185#212#212
|
||||
+#174#166#128#221#0#177'r'#166#200'?'#224'('#172#169'[ZQ'#181#205#239#134'sgO'
|
||||
+'S`]'#128'MNMJD'#166#196#24'kihX'#215#135'%+]'#167'N'#172#30#27#27#255#195
|
||||
+#227#246#20#156#206'r'#217'_'#231'wVWW'#219'zz{'#30'=y'#250'H'#213#243#198'7'
|
||||
+'N'#151#253#167#166'-Mpo'#248'>lxo#'#253#242#235'E'#134#175#134#163#235#212
|
||||
+#137'}'#0#208#28#10#133'6'#2#128#230#243#249'.'#1'@o{'#219#209#243#193'`'#176
|
||||
+#19#25#255'rO'#203'^'#176'Z'#203#224#251#179#223#1#190'&`l'#174#176#148#149
|
||||
+#185#206#1#0'Z[[[T'#205#242#195#220#238'C'#248#191'z'#9';'#169'f'#147'hO'#162
|
||||
+#5#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
||||
LazarusResources.Add('menu_svn_log','PNG',[
|
||||
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#16#0#0#0#16#8#6#0#0#0#31#243#255'a'
|
||||
+#0#0#0#6'bKGD'#0#255#0#255#0#255#160#189#167#147#0#0#0#9'pHYs'#0#0#11#19#0#0
|
||||
+#11#19#1#0#154#156#24#0#0#0#7'tIME'#7#213#9#22#18'7);R'#2'H'#0#0#1#203'IDAT8'
|
||||
+#203#165#147'Mh'#19'A'#20#199'3'#221#163'H'#22'"-'#226#177#224')'#160'X+'#1
|
||||
+#15#130#21#132'x'#236'E'#208#182''''#175#165#23#21'<'#138' '#197' '#245'"~'
|
||||
+#128#154#22#138'1'#189'['#26#17'M\'#16#237#193'b'#211#141#27'L'#253#192#213
|
||||
+'l'#235#16#21'Z'#145#205'x0C'#179'mj+'#190#203#255#13#204#251#207'of'#222#131
|
||||
+#255#12'a'#146#226']'#250#128#25#224#216'Vzx'#136#188#169#147#0#151'G/'#157#1
|
||||
+'f'#14#30'w'#216#142#182#18'XM'#189#1#240#237#249'9'#182#163'WOJ'#221#172';-'
|
||||
+#141#211#222'T@Y'#21'X'#221#147#167#172#10#252#232'z'#216'V_LK'#6#199#138#28
|
||||
+#233#31#6#24'7'#4#196#227'q'#196#137#165'?'#139'}MeM}'#223'''O2t'#237#25#31
|
||||
+#158#140'3'#183#16#132'@'#135#213'z'#31#165#20#245'z}'#195'K'#7'A'#128#155'I'
|
||||
+#173#21'{'#203'|-Mu'#0'='#17#3#219#182#177'm;R'#236#251'>n&'#197#224'X'#145
|
||||
+#197#199#25'^'#149#151'Q'#165#28'@'#207#200'dc'#246#175#4#230#228#129't'#129
|
||||
+#197'|'#134#185#183#10'U'#202#241's'#255'E'#206#159#189'0'#11#136'M'#9#180
|
||||
+#214#20#210#189#12'\y'#138'7}'#135#202#231#239#168#249#7#188#239#26#166#179
|
||||
+#205'7F'#8#180#214'd'#179'Y~'#201'C'#204';'#14#239'>'#213'Yz='#5#189'iv'#173
|
||||
+#172#0#218'4'#161'nK'#16#134'!'#187'?'#166'y'#244#165#155#251#185#28#221#242
|
||||
+'%;'#251'n'#145'L&q]'#151'7'#149#5#140#139'\OP'#173'V'#241'<'#143#145#201#6
|
||||
+'G;+'#172#238'H'#16#30#24'%'#145'H`Y'#22#150'eE'#186'x'#3'A,'#22'CkM'#173'VC'
|
||||
+'k'#141#148#18#173'5B'#8#132#16#173#219#27#17#3#165#20#142#227'l:u'#198'd}'
|
||||
+#24#131#137#155#183#175#159#250#135')'#158'0'#201'oZ'#157#232#152'y'#9#252#18
|
||||
+#0#0#0#0'IEND'#174'B`'#130
|
||||
]);
|
2
components/lazsvnpkg/lazsvnpkg_images.sh
Normal file
2
components/lazsvnpkg/lazsvnpkg_images.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
../../tools/lazres lazsvnpkg_images.lrs @lazsvnpkg_images_list.txt
|
5
components/lazsvnpkg/lazsvnpkg_images_list.txt
Normal file
5
components/lazsvnpkg/lazsvnpkg_images_list.txt
Normal file
@ -0,0 +1,5 @@
|
||||
images/menu_svn.png
|
||||
images/menu_svn_commit.png
|
||||
images/menu_svn_update.png
|
||||
images/menu_svn_diff.png
|
||||
images/menu_svn_log.png
|
270
components/lazsvnpkg/svnaddprojectform.lfm
Normal file
270
components/lazsvnpkg/svnaddprojectform.lfm
Normal file
@ -0,0 +1,270 @@
|
||||
object SVNAddProjectFrm: TSVNAddProjectFrm
|
||||
Left = 290
|
||||
Height = 195
|
||||
Top = 175
|
||||
Width = 372
|
||||
HelpContext = 0
|
||||
ActiveControl = ProjectEdit
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'SVNAddProjectFrm'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 195
|
||||
ClientWidth = 372
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnCreate = FormCreate
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poDesigned
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object ProjectLabel: TLabel
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 6
|
||||
Width = 360
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
Alignment = taLeftJustify
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'ProjectLabel'
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Layout = tlTop
|
||||
ParentBidiMode = True
|
||||
ParentColor = False
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ShowAccelChar = True
|
||||
Transparent = True
|
||||
Visible = True
|
||||
WordWrap = False
|
||||
OptimalFill = False
|
||||
end
|
||||
object RepositoryLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ProjectEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 59
|
||||
Width = 101
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
Alignment = taLeftJustify
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'RepositoryLabel'
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Layout = tlTop
|
||||
ParentBidiMode = True
|
||||
ParentColor = False
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ShowAccelChar = True
|
||||
Transparent = True
|
||||
Visible = True
|
||||
WordWrap = False
|
||||
OptimalFill = False
|
||||
end
|
||||
object ButtonPanel1: TButtonPanel
|
||||
Left = 6
|
||||
Height = 48
|
||||
Top = 147
|
||||
Width = 360
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 0
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
end
|
||||
object ProjectEdit: TEdit
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ProjectLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 30
|
||||
Width = 360
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
AutoSize = False
|
||||
AutoSelect = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
CharCase = ecNormal
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
EchoMode = emNormal
|
||||
Enabled = False
|
||||
MaxLength = -1
|
||||
ParentBidiMode = True
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
PasswordChar = #0
|
||||
ReadOnly = False
|
||||
TabStop = True
|
||||
TabOrder = 1
|
||||
Text = 'ProjectEdit'
|
||||
Visible = True
|
||||
end
|
||||
object RepositoryEdit: TEdit
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = RepositoryLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = RepositoryButton
|
||||
Left = 6
|
||||
Height = 23
|
||||
Top = 83
|
||||
Width = 330
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = False
|
||||
AutoSelect = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
CharCase = ecNormal
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
EchoMode = emNormal
|
||||
Enabled = True
|
||||
MaxLength = -1
|
||||
ParentBidiMode = True
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
PasswordChar = #0
|
||||
ReadOnly = False
|
||||
TabStop = True
|
||||
TabOrder = 2
|
||||
Text = 'RepositoryEdit'
|
||||
Visible = True
|
||||
end
|
||||
object RepositoryButton: TButton
|
||||
AnchorSideTop.Control = RepositoryLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = RepositoryEdit
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 342
|
||||
Height = 23
|
||||
Top = 83
|
||||
Width = 24
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
Anchors = [akTop, akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Cancel = False
|
||||
Caption = '...'
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = RepositoryButtonClick
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 3
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object ActiveCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = RepositoryEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 112
|
||||
Width = 360
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
AllowGrayed = False
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'ActiveCheckBox'
|
||||
Checked = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentColor = True
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ParentBidiMode = True
|
||||
State = cbUnchecked
|
||||
TabOrder = 4
|
||||
TabStop = True
|
||||
UseOnChange = False
|
||||
Visible = True
|
||||
end
|
||||
object SelectDirectoryDialog: TSelectDirectoryDialog
|
||||
Width = 0
|
||||
Height = 0
|
||||
left = 21
|
||||
top = 74
|
||||
end
|
||||
end
|
91
components/lazsvnpkg/svnaddprojectform.lrs
Normal file
91
components/lazsvnpkg/svnaddprojectform.lrs
Normal file
@ -0,0 +1,91 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSVNAddProjectFrm','FORMDATA',[
|
||||
'TPF0'#17'TSVNAddProjectFrm'#16'SVNAddProjectFrm'#4'Left'#3'"'#1#6'Height'#3
|
||||
+#195#0#3'Top'#3#175#0#5'Width'#3't'#1#11'HelpContext'#2#0#13'ActiveControl'#7
|
||||
+#11'ProjectEdit'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8
|
||||
+'AutoSize'#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaximiz'
|
||||
+'e'#0#11'BorderStyle'#7#10'bsSizeable'#7'Caption'#6#16'SVNAddProjectFrm'#28
|
||||
+'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'C'
|
||||
+'hildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'Ch'
|
||||
+'ildSizing.ControlsPerLine'#2#0#12'ClientHeight'#3#195#0#11'ClientWidth'#3't'
|
||||
+#1#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'
|
||||
+#9#11'Font.Height'#2#0#10'Font.Style'#11#0#9'FormStyle'#7#8'fsNormal'#8'OnCr'
|
||||
+'eate'#7#10'FormCreate'#14'ParentBiDiMode'#9#10'ParentFont'#8#8'Position'#7
|
||||
+#10'poDesigned'#13'ShowInTaskBar'#7#9'stDefault'#14'UseDockManager'#8#10'LCL'
|
||||
+'Version'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0#6'TLabel'#12'ProjectLa'
|
||||
+'bel'#4'Left'#2#6#6'Height'#2#18#3'Top'#2#6#5'Width'#3'h'#1#11'HelpContext'#2
|
||||
+#0#5'Align'#7#5'alTop'#9'Alignment'#7#13'taLeftJustify'#8'AutoSize'#9#18'Bor'
|
||||
+'derSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0
|
||||
+#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.Ce'
|
||||
+'llAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'cca'
|
||||
+'Fill'#7'Caption'#6#12'ProjectLabel'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7
|
||||
+#8'dmManual'#7'Enabled'#9#6'Layout'#7#5'tlTop'#14'ParentBidiMode'#9#11'Paren'
|
||||
+'tColor'#8#10'ParentFont'#9#14'ParentShowHint'#9#13'ShowAccelChar'#9#11'Tran'
|
||||
+'sparent'#9#7'Visible'#9#8'WordWrap'#8#11'OptimalFill'#8#0#0#6'TLabel'#15'Re'
|
||||
+'positoryLabel'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Contr'
|
||||
+'ol'#7#11'ProjectEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'H'
|
||||
+'eight'#2#18#3'Top'#2';'#5'Width'#2'e'#11'HelpContext'#2#0#5'Align'#7#6'alNo'
|
||||
+'ne'#9'Alignment'#7#13'taLeftJustify'#8'AutoSize'#9#18'BorderSpacing.Left'#2
|
||||
+#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bo'
|
||||
+'ttom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7
|
||||
+#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#15
|
||||
+'RepositoryLabel'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Ena'
|
||||
+'bled'#9#6'Layout'#7#5'tlTop'#14'ParentBidiMode'#9#11'ParentColor'#8#10'Pare'
|
||||
+'ntFont'#9#14'ParentShowHint'#9#13'ShowAccelChar'#9#11'Transparent'#9#7'Visi'
|
||||
+'ble'#9#8'WordWrap'#8#11'OptimalFill'#8#0#0#12'TButtonPanel'#12'ButtonPanel1'
|
||||
+#4'Left'#2#6#6'Height'#2'0'#3'Top'#3#147#0#5'Width'#3'h'#1#11'HelpContext'#2
|
||||
+#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#11'ButtonOrder'#7#9'boDefault'#8'Tab'
|
||||
+'Order'#2#0#13'DefaultButton'#7#4'pbOK'#11'ShowButtons'#11#4'pbOK'#8'pbCance'
|
||||
+'l'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClose'#6'pbHelp'#0#7'Visible'
|
||||
+#9#0#0#5'TEdit'#11'ProjectEdit'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anc'
|
||||
+'horSideTop.Control'#7#12'ProjectLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'
|
||||
+#4'Left'#2#6#6'Height'#2#23#3'Top'#2#30#5'Width'#3'h'#1#11'HelpContext'#2#0#5
|
||||
+'Align'#7#5'alTop'#8'AutoSize'#8#10'AutoSelect'#8#18'BorderSpacing.Left'#2#0
|
||||
+#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bott'
|
||||
+'om'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7
|
||||
+'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#8'CharCase'#7#8'e'
|
||||
+'cNormal'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#8'EchoMode'#7
|
||||
+#8'emNormal'#7'Enabled'#8#9'MaxLength'#2#255#14'ParentBidiMode'#9#10'ParentF'
|
||||
+'ont'#9#14'ParentShowHint'#9#12'PasswordChar'#6#1#0#8'ReadOnly'#8#7'TabStop'
|
||||
+#9#8'TabOrder'#2#1#4'Text'#6#11'ProjectEdit'#7'Visible'#9#0#0#5'TEdit'#14'Re'
|
||||
+'positoryEdit'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Contro'
|
||||
+'l'#7#15'RepositoryLabel'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSid'
|
||||
+'eRight.Control'#7#16'RepositoryButton'#4'Left'#2#6#6'Height'#2#23#3'Top'#2
|
||||
+'S'#5'Width'#3'J'#1#11'HelpContext'#2#0#5'Align'#7#6'alNone'#7'Anchors'#11#5
|
||||
+'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#8#10'AutoSelect'#8#18'BorderSpaci'
|
||||
+'ng.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'Borde'
|
||||
+'rSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignH'
|
||||
+'orizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#8
|
||||
+'CharCase'#7#8'ecNormal'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'
|
||||
+#8'EchoMode'#7#8'emNormal'#7'Enabled'#9#9'MaxLength'#2#255#14'ParentBidiMode'
|
||||
+#9#10'ParentFont'#9#14'ParentShowHint'#9#12'PasswordChar'#6#1#0#8'ReadOnly'#8
|
||||
+#7'TabStop'#9#8'TabOrder'#2#2#4'Text'#6#14'RepositoryEdit'#7'Visible'#9#0#0#7
|
||||
+'TButton'#16'RepositoryButton'#21'AnchorSideTop.Control'#7#15'RepositoryLabe'
|
||||
+'l'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Ow'
|
||||
+'ner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7
|
||||
+#14'RepositoryEdit'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'V'#1#6
|
||||
,'Height'#2#23#3'Top'#2'S'#5'Width'#2#24#11'HelpContext'#2#0#5'Align'#7#6'alN'
|
||||
+'one'#7'Anchors'#11#5'akTop'#7'akRight'#8'akBottom'#0#8'AutoSize'#9#18'Borde'
|
||||
+'rSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2#6#20
|
||||
+'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellA'
|
||||
+'lignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFil'
|
||||
+'l'#6'Cancel'#8#7'Caption'#6#3'...'#7'Default'#8#10'DragCursor'#7#6'crDrag'#8
|
||||
+'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'ModalResult'#2
|
||||
+#0#7'OnClick'#7#21'RepositoryButtonClick'#10'ParentFont'#9#14'ParentShowHint'
|
||||
+#9#8'TabOrder'#2#3#7'TabStop'#9#7'Visible'#9#0#0#9'TCheckBox'#14'ActiveCheck'
|
||||
+'Box'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#14'R'
|
||||
+'epositoryEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Con'
|
||||
+'trol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#6#6'Heig'
|
||||
+'ht'#2#22#3'Top'#2'p'#5'Width'#3'h'#1#11'HelpContext'#2#0#5'Align'#7#6'alNon'
|
||||
+'e'#11'AllowGrayed'#8#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSi'
|
||||
+'ze'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing'
|
||||
+'.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!Bord'
|
||||
+'erSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVerti'
|
||||
+'cal'#7#7'ccaFill'#7'Caption'#6#14'ActiveCheckBox'#7'Checked'#8#10'DragCurso'
|
||||
+'r'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'
|
||||
+#9#11'ParentColor'#9#10'ParentFont'#9#14'ParentShowHint'#9#14'ParentBidiMode'
|
||||
+#9#5'State'#7#11'cbUnchecked'#8'TabOrder'#2#4#7'TabStop'#9#11'UseOnChange'#8
|
||||
+#7'Visible'#9#0#0#22'TSelectDirectoryDialog'#21'SelectDirectoryDialog'#5'Wid'
|
||||
+'th'#2#0#6'Height'#2#0#4'left'#2#21#3'top'#2'J'#0#0#0
|
||||
]);
|
98
components/lazsvnpkg/svnaddprojectform.pas
Normal file
98
components/lazsvnpkg/svnaddprojectform.pas
Normal file
@ -0,0 +1,98 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit SVNAddProjectForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ButtonPanel, StdCtrls;
|
||||
|
||||
type
|
||||
|
||||
{ TSVNAddProjectFrm }
|
||||
|
||||
TSVNAddProjectFrm = class(TForm)
|
||||
ActiveCheckBox: TCheckBox;
|
||||
RepositoryButton: TButton;
|
||||
ButtonPanel1: TButtonPanel;
|
||||
ProjectEdit: TEdit;
|
||||
RepositoryEdit: TEdit;
|
||||
ProjectLabel: TLabel;
|
||||
RepositoryLabel: TLabel;
|
||||
SelectDirectoryDialog: TSelectDirectoryDialog;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure RepositoryButtonClick(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
function ShowSVNAddProjectFrm(AProject: string; var ARepository: string; AActive: boolean = true): TModalResult;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SVNClasses;
|
||||
|
||||
function ShowSVNAddProjectFrm(AProject: string; var ARepository: string; AActive: boolean = true): TModalResult;
|
||||
var
|
||||
SVNAddProjectFrm: TSVNAddProjectFrm;
|
||||
begin
|
||||
SVNAddProjectFrm := TSVNAddProjectFrm.Create(nil);
|
||||
|
||||
SVNAddProjectFrm.ProjectEdit.Text:=AProject;
|
||||
SVNAddProjectFrm.RepositoryEdit.Text:=ARepository;
|
||||
SVNAddProjectFrm.ActiveCheckBox.Checked:=AActive;
|
||||
|
||||
Result := SVNAddProjectFrm.ShowModal;
|
||||
|
||||
ARepository := SVNAddProjectFrm.RepositoryEdit.Text;
|
||||
|
||||
if Result = mrOK then
|
||||
SVNSettings.UpdateProject(SVNAddProjectFrm.ProjectEdit.Text,
|
||||
SVNAddProjectFrm.RepositoryEdit.Text,
|
||||
SVNAddProjectFrm.ActiveCheckBox.Checked);
|
||||
|
||||
SVNAddProjectFrm.Free;
|
||||
end;
|
||||
|
||||
{ TSVNAddProjectFrm }
|
||||
|
||||
procedure TSVNAddProjectFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
ProjectLabel.Caption := rsProjectFilename;
|
||||
RepositoryLabel.Caption := rsRepositoryPath;
|
||||
ActiveCheckBox.Caption:=rsProjectIsActive;
|
||||
end;
|
||||
|
||||
procedure TSVNAddProjectFrm.RepositoryButtonClick(Sender: TObject);
|
||||
begin
|
||||
if SelectDirectoryDialog.Execute then
|
||||
RepositoryEdit.Text := SelectDirectoryDialog.FileName;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I svnaddprojectform.lrs}
|
||||
|
||||
end.
|
||||
|
647
components/lazsvnpkg/svnclasses.pas
Normal file
647
components/lazsvnpkg/svnclasses.pas
Normal file
@ -0,0 +1,647 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit SVNClasses;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, ComCtrls, FileUtil, XMLCfg, LCLProc, Dialogs, Controls,
|
||||
XMLRead, DOM, Process;
|
||||
|
||||
resourcestring
|
||||
rsAction = 'Action';
|
||||
rsAdded = 'Added';
|
||||
rsAuthor = 'Author';
|
||||
rsCommit = 'Commit';
|
||||
rsCommitRevision = 'Commit revision';
|
||||
rsConflict = 'Conflict';
|
||||
rsCopyFromPath = 'Copy from path';
|
||||
rsDate = 'Date';
|
||||
rsDelete = 'Delete';
|
||||
rsDeleted = 'Deleted';
|
||||
rsDiffActiveFile = 'Diff active file';
|
||||
rsEdit = 'Edit';
|
||||
rsExtension = 'Extension';
|
||||
rsFileStatus = 'File status';
|
||||
rsIndexOutOfBoundsD = 'Index out of bounds (%d)';
|
||||
rsLazarusSVNCommit = 'LazarusSVN Commit';
|
||||
rsLazarusSVNDiff = '%s - LazarusSVN Diff...';
|
||||
rsLazarusSVNLog = '%s - LazarusSVN Log...';
|
||||
rsLazarusSVNUpdate = '%s - LazarusSVN Update...';
|
||||
rsMerged = 'Merged';
|
||||
rsMessage = 'Message';
|
||||
rsPath = 'Path';
|
||||
rsProjectFilename = 'Project filename';
|
||||
rsProjectIsActive = 'Project is active';
|
||||
rsProjectIsNotActiveInSVNSettingsPleaseActivateFirst = 'Project is not '
|
||||
+'active in SVN settings, please activate first.';
|
||||
rsProjectName = 'Project name';
|
||||
rsPropertyStatus = 'Property status';
|
||||
rsRepositoryPath = 'Repository path';
|
||||
rsRevision = 'Revision';
|
||||
rsSave = 'Save';
|
||||
rsSettings = 'Settings';
|
||||
rsShowDiff = 'Show diff';
|
||||
rsShowLog = 'Show log';
|
||||
rsSourceFileDoesNotBelongToTheProjectPleaseAddFirst = 'Source file does not '
|
||||
+'belong to the project. Please add first.';
|
||||
rsSVNTools = 'SVN tools';
|
||||
rsUpdate = 'Update';
|
||||
rsUpdated = 'Updated';
|
||||
|
||||
const
|
||||
READ_BYTES = 2048;
|
||||
|
||||
type
|
||||
TSortDirection = (sdAscending, sdDescending);
|
||||
//TColumnSortInfo = record
|
||||
//Index: integer;
|
||||
//SortOrder: TSortOrder;
|
||||
//end;
|
||||
|
||||
{ TSVNSettings }
|
||||
|
||||
TSVNSettings = class(TObject)
|
||||
private
|
||||
{ private declarations }
|
||||
XML: TXMLConfig;
|
||||
function GetActive(Index: integer): boolean;
|
||||
function GetPath(Index: integer): string;
|
||||
function GetProjectCount: integer;
|
||||
function GetRepository(Index: integer): string;
|
||||
procedure SetActive(Index: integer; const AValue: boolean);
|
||||
procedure SetPath(Index: integer; const AValue: string);
|
||||
procedure SetProjectCount(const AValue: integer);
|
||||
procedure SetRepository(Index: integer; const AValue: string);
|
||||
public
|
||||
{ public declarations }
|
||||
constructor Create(const AFileName: string);
|
||||
destructor Destroy; override;
|
||||
|
||||
function RepositoryByPath(APath: string; var ARepo: string): boolean;
|
||||
procedure AddProject(APath, ARepo: string; AActive: boolean = False);
|
||||
procedure UpdateProject(APath, ARepo: string; AActive: boolean);
|
||||
procedure DeleteProjectByIndex(Index: integer);
|
||||
|
||||
property ProjectCount: integer read GetProjectCount write SetProjectCount;
|
||||
property Path[Index: integer]: string read GetPath write SetPath;
|
||||
property Repository[Index: integer]: string read GetRepository write SetRepository;
|
||||
property Active[Index: integer]: boolean read GetActive write SetActive;
|
||||
end;
|
||||
|
||||
TStatusItemName = (siChecked, siPath, siExtension, siPropStatus, siItemStatus,
|
||||
siRevision, siCommitRevision, siAuthor, siDate);
|
||||
|
||||
PSVNStatusItem = ^TSVNStatusItem;
|
||||
TSVNStatusItem = record
|
||||
Checked: boolean;
|
||||
Path: string;
|
||||
Extension: string;
|
||||
PropStatus: string;
|
||||
ItemStatus: string;
|
||||
Revision: integer;
|
||||
CommitRevision: integer;
|
||||
Author: string;
|
||||
Date: TDate;
|
||||
end;
|
||||
|
||||
{ TSVNStatus }
|
||||
|
||||
TSVNStatus = class(TObject)
|
||||
private
|
||||
FRepository: string;
|
||||
FSortDirection: TSortDirection;
|
||||
FSortItem: TStatusItemName;
|
||||
public
|
||||
List: TFPList;
|
||||
|
||||
constructor Create(const ARepoPath: string);
|
||||
destructor Destroy; override;
|
||||
|
||||
property Repository: string read FRepository write FRepository;
|
||||
procedure Sort(ASortItem: TStatusItemName; ADirection: TSortDirection);
|
||||
procedure ReverseSort(ASortItem: TStatusItemName);
|
||||
property SortDirection: TSortDirection read FSortDirection write FSortDirection;
|
||||
property SortItem: TStatusItemName read FSortItem write FSortItem;
|
||||
end;
|
||||
|
||||
var
|
||||
SVNSettings: TSVNSettings;
|
||||
|
||||
procedure SetColumn(ListView: TListView; ColNo, DefaultWidth: integer; AName: string; AutoSize: boolean = true);
|
||||
function SVNExecutable: string;
|
||||
function ReplaceLineEndings(const s, NewLineEnds: string): string;
|
||||
function ISO8601ToDateTime(DateTime: string): TDateTime;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SVNAddProjectForm;
|
||||
|
||||
procedure SetColumn(ListView: TListView; ColNo, DefaultWidth: integer; AName: string; AutoSize: boolean = true);
|
||||
begin
|
||||
ListView.Column[ColNo].Caption:=AName;
|
||||
ListView.Column[ColNo].AutoSize:=AutoSize;
|
||||
ListView.Column[ColNo].Width:=DefaultWidth;
|
||||
end;
|
||||
|
||||
function SVNExecutable: string;
|
||||
begin
|
||||
//encapsulate with " because of the incompatibility on windows
|
||||
//when svn in in "Program Files" directory
|
||||
Result := '"' + FindDefaultExecutablePath('svn') + '"';
|
||||
end;
|
||||
|
||||
function ReplaceLineEndings(const s, NewLineEnds: string): string;
|
||||
var
|
||||
p: Integer;
|
||||
StartPos: LongInt;
|
||||
begin
|
||||
Result:=s;
|
||||
p:=1;
|
||||
while (p<=length(Result)) do begin
|
||||
if Result[p] in [#10,#13] then begin
|
||||
StartPos:=p;
|
||||
if (p<length(Result))
|
||||
and (Result[p+1] in [#10,#13]) and (Result[p]<>Result[p+1]) then
|
||||
inc(p);
|
||||
Result:=copy(Result,1,StartPos-1)+NewLineEnds+copy(Result,p+1,length(Result));
|
||||
inc(p,length(NewLineEnds));
|
||||
end else begin
|
||||
inc(p);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function ISO8601ToDateTime(DateTime: string): TDateTime;
|
||||
var
|
||||
y, m, d, h, n, s: word;
|
||||
begin
|
||||
y := StrToInt(Copy(DateTime, 1, 4));
|
||||
m := StrToInt(Copy(DateTime, 6, 2));
|
||||
d := StrToInt(Copy(DateTime, 9, 2));
|
||||
h := StrToInt(Copy(DateTime, 12, 2));
|
||||
n := StrToInt(Copy(DateTime, 15, 2));
|
||||
s := StrToInt(Copy(DateTime, 18, 2));
|
||||
|
||||
Result := EncodeDate(y,m,d) + EncodeTime(h,n,s,0);
|
||||
end;
|
||||
|
||||
{ TSVNSettings }
|
||||
|
||||
function TSVNSettings.GetActive(Index: integer): boolean;
|
||||
begin
|
||||
Result := XML.GetValue('projects/item' + IntToStr(Index) + '/active', False);
|
||||
end;
|
||||
|
||||
function TSVNSettings.GetPath(Index: integer): string;
|
||||
begin
|
||||
Result := XML.GetValue('projects/item' + IntToStr(Index) + '/path', '');
|
||||
end;
|
||||
|
||||
function TSVNSettings.GetProjectCount: integer;
|
||||
begin
|
||||
Result := XML.GetValue('projects/count', 0);
|
||||
end;
|
||||
|
||||
function TSVNSettings.GetRepository(Index: integer): string;
|
||||
begin
|
||||
Result := XML.GetValue('projects/item' + IntToStr(Index) + '/repository', '');
|
||||
end;
|
||||
|
||||
procedure TSVNSettings.SetActive(Index: integer; const AValue: boolean);
|
||||
begin
|
||||
XML.SetValue('projects/item' + IntToStr(Index) + '/active', AValue);
|
||||
end;
|
||||
|
||||
procedure TSVNSettings.SetPath(Index: integer; const AValue: string);
|
||||
begin
|
||||
XML.SetValue('projects/item' + IntToStr(Index) + '/path', AValue);
|
||||
end;
|
||||
|
||||
procedure TSVNSettings.SetProjectCount(const AValue: integer);
|
||||
begin
|
||||
XML.SetValue('projects/count', AValue);
|
||||
end;
|
||||
|
||||
procedure TSVNSettings.SetRepository(Index: integer; const AValue: string);
|
||||
begin
|
||||
XML.SetValue('projects/item' + IntToStr(Index) + '/repository', AValue);
|
||||
end;
|
||||
|
||||
constructor TSVNSettings.Create(const AFileName: string);
|
||||
begin
|
||||
XML := TXMLConfig.Create(nil);
|
||||
XML.Filename:=AFileName;
|
||||
end;
|
||||
|
||||
destructor TSVNSettings.Destroy;
|
||||
begin
|
||||
XML.Flush;
|
||||
XML.Free;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TSVNSettings.AddProject(APath, ARepo: string; AActive: boolean);
|
||||
var
|
||||
count: integer;
|
||||
begin
|
||||
count := ProjectCount;
|
||||
Inc(Count);
|
||||
|
||||
ProjectCount := count;
|
||||
Path[Count - 1] := APath;
|
||||
Active[Count - 1] := AActive;
|
||||
Repository[Count - 1] := ARepo;
|
||||
end;
|
||||
|
||||
procedure TSVNSettings.UpdateProject(APath, ARepo: string; AActive: boolean);
|
||||
var
|
||||
count: integer;
|
||||
i: integer;
|
||||
begin
|
||||
debugln('TSVNSettings.UpdateProject searching for project');
|
||||
count := ProjectCount;
|
||||
|
||||
for i := 0 to Count - 1 do
|
||||
if Path[i] = APath then
|
||||
begin
|
||||
Active[i] := AActive;
|
||||
Repository[i] := ARepo;
|
||||
exit;
|
||||
end;
|
||||
|
||||
//project not found, so add it as new
|
||||
debugln('TSVNSettings.UpdateProject project not found adding a new one');
|
||||
AddProject(APath, ARepo, AActive);
|
||||
end;
|
||||
|
||||
procedure TSVNSettings.DeleteProjectByIndex(Index: integer);
|
||||
var
|
||||
i: integer;
|
||||
count: integer;
|
||||
begin
|
||||
count := ProjectCount;
|
||||
ProjectCount := count - 1;
|
||||
for i := Index to count - 1 do
|
||||
begin
|
||||
Active[i] := Active[i + 1];
|
||||
Path[i] := Path[i + 1];
|
||||
Repository[i] := Repository[i + 1];
|
||||
end;
|
||||
|
||||
XML.DeletePath('projects/item' + IntToStr(count - 1) + '/active');
|
||||
XML.DeletePath('projects/item' + IntToStr(count - 1) + '/path');
|
||||
XML.DeletePath('projects/item' + IntToStr(count - 1) + '/repository');
|
||||
end;
|
||||
|
||||
function TSVNSettings.RepositoryByPath(APath: string; var ARepo: string
|
||||
): boolean;
|
||||
var
|
||||
count: integer;
|
||||
i: integer;
|
||||
begin
|
||||
debugln('TSVNSettingsFrm.GetRepository APath=' + APath);
|
||||
|
||||
count := ProjectCount;
|
||||
|
||||
for i := 0 to Count - 1 do
|
||||
if Path[i] = APath then
|
||||
begin
|
||||
Result := Active[i];
|
||||
ARepo := Repository[i];
|
||||
exit;
|
||||
end;
|
||||
|
||||
if QuestionDlg('Project not found',
|
||||
'Current project not in project list. Would you like to add it?',
|
||||
mtWarning,
|
||||
[mrYes, mrNo],
|
||||
0) = mrYes then
|
||||
begin
|
||||
ShowSVNAddProjectFrm(APath, ARepo, True);
|
||||
Result := True;
|
||||
end;
|
||||
end;
|
||||
|
||||
function SortSelectedAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
if PSVNStatusItem(Item1)^.Checked > PSVNStatusItem(Item2)^.Checked then
|
||||
Result := 1
|
||||
else
|
||||
if PSVNStatusItem(Item1)^.Checked = PSVNStatusItem(Item2)^.Checked then
|
||||
Result := 0
|
||||
else
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function SortSelectedDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortSelectedAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortPathAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := CompareText(PSVNStatusItem(Item1)^.Path, PSVNStatusItem(Item2)^.Path);
|
||||
end;
|
||||
|
||||
function SortPathDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortPathAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortExtensionAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := CompareText(PSVNStatusItem(Item1)^.Extension, PSVNStatusItem(Item2)^.Extension);
|
||||
end;
|
||||
|
||||
function SortExtensionDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortExtensionAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortItemStatusAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := CompareText(PSVNStatusItem(Item1)^.ItemStatus, PSVNStatusItem(Item2)^.ItemStatus);
|
||||
end;
|
||||
|
||||
function SortItemStatusDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortItemStatusAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortPropStatusAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := CompareText(PSVNStatusItem(Item1)^.PropStatus, PSVNStatusItem(Item2)^.PropStatus);
|
||||
end;
|
||||
|
||||
function SortPropStatusDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortPropStatusAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortPropertyAuthorAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := CompareText(PSVNStatusItem(Item1)^.Author, PSVNStatusItem(Item2)^.Author);
|
||||
end;
|
||||
|
||||
function SortPropertyAuthorDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortPropertyAuthorAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortPropertyRevisionAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
if PSVNStatusItem(Item1)^.Revision > PSVNStatusItem(Item2)^.Revision then
|
||||
Result := 1
|
||||
else
|
||||
if PSVNStatusItem(Item1)^.Revision = PSVNStatusItem(Item2)^.Revision then
|
||||
Result := 0
|
||||
else
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function SortPropertyRevisionDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortPropertyRevisionAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortPropertyCommitRevisionAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
if PSVNStatusItem(Item1)^.CommitRevision > PSVNStatusItem(Item2)^.CommitRevision then
|
||||
Result := 1
|
||||
else
|
||||
if PSVNStatusItem(Item1)^.CommitRevision = PSVNStatusItem(Item2)^.CommitRevision then
|
||||
Result := 0
|
||||
else
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function SortPropertyCommitRevisionDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortPropertyCommitRevisionAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
function SortPropertyDateAscending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
if PSVNStatusItem(Item1)^.Date > PSVNStatusItem(Item2)^.Date then
|
||||
Result := 1
|
||||
else
|
||||
if PSVNStatusItem(Item1)^.Date = PSVNStatusItem(Item2)^.Date then
|
||||
Result := 0
|
||||
else
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function SortPropertyDateDescending(Item1, Item2: Pointer): Integer;
|
||||
begin
|
||||
Result := -SortPropertyDateAscending(Item1, Item2);
|
||||
end;
|
||||
|
||||
{ TSVNStatus }
|
||||
|
||||
constructor TSVNStatus.Create(const ARepoPath: string);
|
||||
var
|
||||
Doc: TXMLDocument;
|
||||
Node: TDOMNode;
|
||||
SubNode: TDOMNode;
|
||||
ListItem: PSVNStatusItem;
|
||||
AProcess: TProcess;
|
||||
i: integer;
|
||||
M: TMemoryStream;
|
||||
n: LongInt;
|
||||
BytesRead: LongInt;
|
||||
F: LongInt;
|
||||
Path: string;
|
||||
NodeName: string;
|
||||
NodeValue: string;
|
||||
begin
|
||||
List := TFPList.Create;
|
||||
Repository := ARepoPath;
|
||||
|
||||
M := TMemoryStream.Create;
|
||||
BytesRead := 0;
|
||||
|
||||
AProcess := TProcess.Create(nil);
|
||||
AProcess.CommandLine := SVNExecutable + ' stat --verbose --xml ' + Repository + ' --non-interactive';
|
||||
debugln('TSVNStatus.Create CommandLine ' + AProcess.CommandLine);
|
||||
AProcess.Options := AProcess.Options + [poUsePipes, poStdErrToOutput];
|
||||
AProcess.ShowWindow := swoHIDE;
|
||||
AProcess.Execute;
|
||||
|
||||
while AProcess.Running do
|
||||
begin
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0 then
|
||||
Inc(BytesRead, n)
|
||||
else
|
||||
// no data, wait 100 ms
|
||||
Sleep(100);
|
||||
end;
|
||||
// read last part
|
||||
repeat
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0 then
|
||||
Inc(BytesRead, n);
|
||||
until n <= 0;
|
||||
M.SetSize(BytesRead);
|
||||
|
||||
ReadXMLFile(Doc, M);
|
||||
|
||||
AProcess.Free;
|
||||
M.Free;
|
||||
|
||||
//now process the XML file
|
||||
Node := Doc.DocumentElement.FirstChild.FirstChild;
|
||||
repeat
|
||||
SubNode := Node;
|
||||
|
||||
New(ListItem);
|
||||
|
||||
Path := SubNode.Attributes.Item[0].NodeValue;
|
||||
|
||||
F:=FileGetAttr(Path);
|
||||
If F<>-1 then
|
||||
If (F and faDirectory)=0 then
|
||||
begin
|
||||
//path
|
||||
ListItem^.Path := Path;
|
||||
|
||||
//Extension
|
||||
ListItem^.Extension:=ExtractFileExt(Path);
|
||||
|
||||
//get the wc-status attributes
|
||||
ListItem^.ItemStatus:='';
|
||||
ListItem^.Checked:=False;
|
||||
ListItem^.PropStatus:='';
|
||||
for i := 0 to SubNode.ChildNodes.Item[0].Attributes.Length -1 do
|
||||
begin
|
||||
NodeName := SubNode.ChildNodes.Item[0].Attributes.Item[i].NodeName;
|
||||
NodeValue := SubNode.ChildNodes.Item[0].Attributes.Item[i].NodeValue;
|
||||
|
||||
if NodeName = 'item' then
|
||||
begin
|
||||
//ItemStatus
|
||||
ListItem^.ItemStatus := NodeValue;
|
||||
|
||||
//Checked
|
||||
ListItem^.Checked:=(NodeValue<>'unversioned') and (NodeValue<>'normal');
|
||||
end;
|
||||
|
||||
if NodeName = 'props' then
|
||||
//PropStatus
|
||||
ListItem^.PropStatus := NodeValue;
|
||||
|
||||
if NodeName = 'revision' then
|
||||
//Revision
|
||||
ListItem^.Revision := StrToInt(NodeValue);
|
||||
end;
|
||||
|
||||
//get the commit attributes
|
||||
if Assigned(SubNode.ChildNodes.Item[0].ChildNodes.Item[0]) then
|
||||
begin
|
||||
//CommitRevision
|
||||
ListItem^.CommitRevision:=StrToInt(SubNode.ChildNodes.Item[0].ChildNodes.Item[0].Attributes.Item[0].NodeValue);
|
||||
|
||||
if Assigned(SubNode.ChildNodes.Item[0].ChildNodes.Item[0].ChildNodes.Item[0]) then
|
||||
begin
|
||||
//Author
|
||||
ListItem^.Author:=SubNode.ChildNodes.Item[0].ChildNodes.Item[0].ChildNodes.Item[0].FirstChild.NodeValue;
|
||||
//Date
|
||||
ListItem^.Date:=ISO8601ToDateTime(SubNode.ChildNodes.Item[0].ChildNodes.Item[0].ChildNodes.Item[0].NextSibling.FirstChild.NodeValue);
|
||||
end;
|
||||
end;
|
||||
|
||||
List.Add(ListItem);
|
||||
end;
|
||||
|
||||
Node := Node.NextSibling;
|
||||
until not Assigned(Node);
|
||||
end;
|
||||
|
||||
destructor TSVNStatus.Destroy;
|
||||
begin
|
||||
List.Free;
|
||||
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TSVNStatus.Sort(ASortItem: TStatusItemName; ADirection: TSortDirection);
|
||||
begin
|
||||
SortDirection := ADirection;
|
||||
SortItem := ASortItem;
|
||||
|
||||
if ADirection = sdDescending then
|
||||
case ASortItem of
|
||||
siChecked: List.Sort(@SortSelectedAscending);
|
||||
siPath: List.Sort(@SortPathAscending);
|
||||
siExtension: List.Sort(@SortExtensionAscending);
|
||||
siItemStatus: List.Sort(@SortItemStatusAscending);
|
||||
siPropStatus: List.Sort(@SortPropStatusAscending);
|
||||
siAuthor: List.Sort(@SortPropertyAuthorAscending);
|
||||
siRevision: List.Sort(@SortPropertyRevisionAscending);
|
||||
siCommitRevision: List.Sort(@SortPropertyCommitRevisionAscending);
|
||||
siDate: List.Sort(@SortPropertyDateAscending);
|
||||
end
|
||||
else
|
||||
case ASortItem of
|
||||
siChecked: List.Sort(@SortSelectedDescending);
|
||||
siPath: List.Sort(@SortPathDescending);
|
||||
siExtension: List.Sort(@SortExtensionDescending);
|
||||
siItemStatus: List.Sort(@SortItemStatusDescending);
|
||||
siPropStatus: List.Sort(@SortPropStatusDescending);
|
||||
siAuthor: List.Sort(@SortPropertyAuthorDescending);
|
||||
siRevision: List.Sort(@SortPropertyRevisionDescending);
|
||||
siCommitRevision: List.Sort(@SortPropertyCommitRevisionDescending);
|
||||
siDate: List.Sort(@SortPropertyDateDescending);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSVNStatus.ReverseSort(ASortItem: TStatusItemName);
|
||||
begin
|
||||
if SortItem = ASortItem then
|
||||
begin
|
||||
if SortDirection = sdDescending then
|
||||
Sort(ASortItem, sdAscending)
|
||||
else
|
||||
Sort(ASortItem, sdDescending)
|
||||
end
|
||||
else
|
||||
Sort(ASortItem, sdAscending);
|
||||
end;
|
||||
|
||||
initialization
|
||||
//GetAppConfigDir(False) + 'lazsvnsettings.xml';
|
||||
SVNSettings := TSVNSettings.Create('lazsvnsettings.xml');
|
||||
|
||||
finalization
|
||||
SVNSettings.Free;
|
||||
|
||||
end.
|
||||
|
80
components/lazsvnpkg/svncommitform.lfm
Normal file
80
components/lazsvnpkg/svncommitform.lfm
Normal file
@ -0,0 +1,80 @@
|
||||
object SVNCommitFrm: TSVNCommitFrm
|
||||
Left = 187
|
||||
Height = 300
|
||||
Top = 316
|
||||
Width = 400
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'SVNCommitFrm'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 300
|
||||
ClientWidth = 400
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnShow = FormShow
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poDesigned
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 40
|
||||
Top = 260
|
||||
Width = 388
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 0
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
end
|
||||
object SVNCommitMemo: TMemo
|
||||
Left = 6
|
||||
Height = 248
|
||||
Top = 6
|
||||
Width = 388
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
Alignment = taLeftJustify
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
MaxLength = -1
|
||||
ParentBidiMode = True
|
||||
ParentFont = True
|
||||
ReadOnly = False
|
||||
ScrollBars = ssNone
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
Visible = True
|
||||
WantReturns = True
|
||||
WantTabs = False
|
||||
end
|
||||
end
|
29
components/lazsvnpkg/svncommitform.lrs
Normal file
29
components/lazsvnpkg/svncommitform.lrs
Normal file
@ -0,0 +1,29 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSVNCommitFrm','FORMDATA',[
|
||||
'TPF0'#13'TSVNCommitFrm'#12'SVNCommitFrm'#4'Left'#3#187#0#6'Height'#3','#1#3
|
||||
+'Top'#3'<'#1#5'Width'#3#144#1#11'HelpContext'#2#0#5'Align'#7#6'alNone'#14'Al'
|
||||
+'lowDropFiles'#8#10'AutoScroll'#9#8'AutoSize'#8#11'BorderIcons'#11#12'biSyst'
|
||||
+'emMenu'#10'biMinimize'#10'biMaximize'#0#11'BorderStyle'#7#10'bsSizeable'#7
|
||||
+'Caption'#6#12'SVNCommitFrm'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSi'
|
||||
+'zing.TopBottomSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSi'
|
||||
+'zing.VerticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeig'
|
||||
+'ht'#3','#1#11'ClientWidth'#3#144#1#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8
|
||||
+'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'#2#0#10'Font.Style'#11#0
|
||||
+#9'FormStyle'#7#8'fsNormal'#6'OnShow'#7#8'FormShow'#14'ParentBiDiMode'#9#10
|
||||
+'ParentFont'#8#8'Position'#7#10'poDesigned'#13'ShowInTaskBar'#7#9'stDefault'
|
||||
+#14'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNorma'
|
||||
+'l'#0#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6'Height'#2'('#3'Top'#3#4
|
||||
+#1#5'Width'#3#132#1#11'HelpContext'#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9
|
||||
+#11'ButtonOrder'#7#9'boDefault'#8'TabOrder'#2#0#13'DefaultButton'#7#4'pbOK'
|
||||
+#11'ShowButtons'#11#4'pbOK'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClos'
|
||||
+'e'#6'pbHelp'#0#7'Visible'#9#0#0#5'TMemo'#13'SVNCommitMemo'#4'Left'#2#6#6'He'
|
||||
+'ight'#3#248#0#3'Top'#2#6#5'Width'#3#132#1#11'HelpContext'#2#0#5'Align'#7#8
|
||||
+'alClient'#9'Alignment'#7#13'taLeftJustify'#18'BorderSpacing.Left'#2#0#17'Bo'
|
||||
+'rderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2
|
||||
+#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaF'
|
||||
+'ill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#10'DragCursor'#7#6'cr'
|
||||
+'Drag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#9'MaxLength'#2#255#14'ParentBi'
|
||||
+'diMode'#9#10'ParentFont'#9#8'ReadOnly'#8#10'ScrollBars'#7#6'ssNone'#8'TabOr'
|
||||
+'der'#2#1#7'TabStop'#9#7'Visible'#9#11'WantReturns'#9#8'WantTabs'#8#0#0#0
|
||||
]);
|
100
components/lazsvnpkg/svncommitform.pas
Normal file
100
components/lazsvnpkg/svncommitform.pas
Normal file
@ -0,0 +1,100 @@
|
||||
unit SVNCommitForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ButtonPanel, StdCtrls, Process, LCLProc;
|
||||
|
||||
type
|
||||
|
||||
{ TSVNCommitFrm }
|
||||
|
||||
TSVNCommitFrm = class(TForm)
|
||||
ButtonPanel: TButtonPanel;
|
||||
SVNCommitMemo: TMemo;
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
FSVNCommandLine: string;
|
||||
public
|
||||
{ public declarations }
|
||||
property SVNCommandLine: string read FSVNCommandLine write FSVNCommandLine;
|
||||
end;
|
||||
|
||||
procedure ShowSVNCommitFrm(ACmdLine: string);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SVNClasses;
|
||||
|
||||
procedure ShowSVNCommitFrm(ACmdLine: string);
|
||||
var
|
||||
SVNCommitFrm: TSVNCommitFrm;
|
||||
begin
|
||||
SVNCommitFrm := TSVNCommitFrm.Create(nil);
|
||||
|
||||
SVNCommitFrm.SVNCommandLine:=ACmdLine;
|
||||
SVNCommitFrm.ShowModal;
|
||||
|
||||
SVNCommitFrm.Free;
|
||||
end;
|
||||
|
||||
{ TSVNCommitFrm }
|
||||
|
||||
procedure TSVNCommitFrm.FormShow(Sender: TObject);
|
||||
var
|
||||
AProcess: TProcess;
|
||||
M: TMemoryStream;
|
||||
BytesRead: LongInt;
|
||||
n: LongInt;
|
||||
begin
|
||||
Caption := rsLazarusSVNCommit;
|
||||
|
||||
//commit the checked files
|
||||
AProcess := TProcess.Create(nil);
|
||||
AProcess.CommandLine := SVNCommandLine;
|
||||
debugln('TSVNCommitFrm.FormShow CommandLine ' + AProcess.CommandLine);
|
||||
AProcess.Options := AProcess.Options + [poUsePipes, poStdErrToOutput];
|
||||
AProcess.ShowWindow := swoHIDE;
|
||||
AProcess.Execute;
|
||||
|
||||
M := TMemoryStream.Create;
|
||||
BytesRead := 0;
|
||||
|
||||
while AProcess.Running do
|
||||
begin
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0 then
|
||||
Inc(BytesRead, n)
|
||||
else
|
||||
// no data, wait 100 ms
|
||||
Sleep(100);
|
||||
end;
|
||||
// read last part
|
||||
repeat
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0 then
|
||||
Inc(BytesRead, n);
|
||||
until n <= 0;
|
||||
M.SetSize(BytesRead);
|
||||
|
||||
SVNCommitMemo.Lines.LoadFromStream(M);
|
||||
M.Free;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I svncommitform.lrs}
|
||||
|
||||
end.
|
||||
|
161
components/lazsvnpkg/svndiffform.lfm
Normal file
161
components/lazsvnpkg/svndiffform.lfm
Normal file
@ -0,0 +1,161 @@
|
||||
object SVNDiffFrm: TSVNDiffFrm
|
||||
Left = 154
|
||||
Height = 416
|
||||
Top = 200
|
||||
Width = 731
|
||||
HelpContext = 0
|
||||
ActiveControl = SVNDiffMemo
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'SVNDiffFrm'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 416
|
||||
ClientWidth = 731
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poScreenCenter
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 48
|
||||
Top = 368
|
||||
Width = 719
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 0
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
object SaveButton: TBitBtn
|
||||
Left = 78
|
||||
Height = 34
|
||||
Top = 8
|
||||
Width = 106
|
||||
HelpContext = 0
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Cancel = False
|
||||
Caption = 'SaveButton'
|
||||
Default = False
|
||||
Enabled = True
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000683B1EFF834B
|
||||
26FFAC6231FFB76835FFB56835FFB46734FFB26634FFB06533FFAE6433FFAC63
|
||||
32FFAA6232FFA96132FFA86031FFA66031FF9D5B2EFF814B26FFA25C2EFFEBC6
|
||||
ADFFEAC5ADFFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFB
|
||||
F8FFFEFBF8FFFEFBF8FFFEFBF8FFC89A7CFFC79879FF9B592EFFB96B37FFEDCA
|
||||
B3FFE0A27AFFFEFAF7FF62C088FF62C088FF62C088FF62C088FF62C088FF62C0
|
||||
88FF62C088FF62C088FFFDF9F6FFCA8D65FFC99B7CFFA66031FFBB6C38FFEECC
|
||||
B6FFE1A27AFFFEFAF7FFBFDCC2FFBFDCC2FFBFDCC2FFBFDCC2FFBFDCC2FFBFDC
|
||||
C2FFBFDCC2FFBFDCC2FFFDF9F6FFCD9068FFCC9E81FFA86132FFBB6B38FFEFCE
|
||||
B8FFE1A279FFFEFAF7FF62C088FF62C088FF62C088FF62C088FF62C088FF62C0
|
||||
88FF62C088FF62C088FFFDF9F6FFCF936AFFCEA384FFAA6132FFBA6A36FFEFD0
|
||||
BBFFE2A27AFFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFBF8FFFEFB
|
||||
F8FFFEFBF8FFFEFBF8FFFEFBF8FFD3966DFFD2A78AFFAB6232FFBB6A36FFF0D2
|
||||
BEFFE2A37AFFE2A37AFFE1A37AFFE2A37BFFE1A37BFFE0A178FFDE9F77FFDD9F
|
||||
76FFDC9D74FFD99B72FFD89971FFD69970FFD5AB8EFFAD6333FFBB6A36FFF2D5
|
||||
C2FFE3A37AFFE3A37AFFE2A37BFFE2A37BFFE2A47BFFE1A279FFE0A178FFDEA0
|
||||
77FFDE9E75FFDC9D74FFDA9B73FFD99B73FFDAB095FFAF6433FFBB6A36FFF2D8
|
||||
C5FFE3A47BFFE3A37AFFE3A47AFFE2A47BFFE2A37BFFE1A37BFFE1A279FFDFA0
|
||||
77FFDE9F76FFDD9E74FFDB9C72FFDC9D74FFDDB59AFFB16534FFBB6B36FFF4D9
|
||||
C7FFE6A67DFFC88C64FFC98D65FFC98E67FFCB926CFFCB926DFFCA9069FFC88C
|
||||
65FFC88C64FFC88C64FFC88C64FFDA9C74FFE1BA9FFFB36634FFBB6C37FFF4DC
|
||||
C9FFE7A77DFFF9ECE1FFF9ECE1FFF9EDE3FFFCF4EEFFFDFAF7FFFDF7F3FFFAED
|
||||
E5FFF7E7DBFFF7E5D9FFF6E5D8FFDEA077FFE4BEA4FFB46734FFBC6D39FFF5DD
|
||||
CCFFE7A87EFFFAF0E8FFFAF0E8FFC98D66FFFAF0E9FFFDF8F3FFFEFAF8FFFCF4
|
||||
EFFFF9E9DFFFF7E7DBFFF7E5D9FFE0A278FFE7C2A9FFB66835FFB16533FFF6DF
|
||||
D0FFE8A87EFFFCF6F1FFFCF6F1FFC88C64FFFAF1E9FFFBF4EEFFFDFAF7FFFDF9
|
||||
F6FFFAF0E8FFF8E8DDFFF7E6DBFFE1A37AFFEFD5C3FFB66935FF9F5B2EFFF6DF
|
||||
D1FFE9AA80FFFEFAF6FFFDFAF6FFC88C64FFFBF3EEFFFBF1EAFFFCF6F2FFFEFB
|
||||
F8FFFCF6F1FFF9ECE2FFF8E7DBFFEED0BAFFECD0BDFFB66D3CFF724121FFF6E0
|
||||
D1FFF7E0D1FFFEFBF8FFFEFBF7FFFDF9F6FFFCF5F0FFFAF0EAFFFBF2EDFFFDF9
|
||||
F6FFFDFAF7FFFBF1EBFFF8E9DFFFE8CDBAFFBA7F57FF46291500532F18006A3C
|
||||
1EFF96562BFFAF6432FFBC6D39FFBB6C37FFBB6B36FFBB6A36FFBB6A36FFBC6C
|
||||
39FFBD6E3BFFBB6D3AFFAF6434FF955931FF3C23110000000000
|
||||
}
|
||||
Kind = bkCustom
|
||||
Layout = blGlyphLeft
|
||||
Margin = -1
|
||||
ModalResult = 0
|
||||
NumGlyphs = 0
|
||||
OnClick = SaveButtonClick
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
Spacing = 3
|
||||
TabOrder = 4
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
end
|
||||
object SVNDiffMemo: TMemo
|
||||
Left = 6
|
||||
Height = 356
|
||||
Top = 6
|
||||
Width = 719
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
Alignment = taLeftJustify
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier'
|
||||
Font.Style = []
|
||||
MaxLength = -1
|
||||
ParentBidiMode = True
|
||||
ParentFont = False
|
||||
ReadOnly = False
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
Visible = True
|
||||
WantReturns = True
|
||||
WantTabs = False
|
||||
end
|
||||
object SaveDialog: TSaveDialog
|
||||
Width = 0
|
||||
Height = 0
|
||||
DefaultExt = '.diff'
|
||||
Filter = 'Patch|.diff;.patch'
|
||||
left = 21
|
||||
top = 317
|
||||
end
|
||||
end
|
94
components/lazsvnpkg/svndiffform.lrs
Normal file
94
components/lazsvnpkg/svndiffform.lrs
Normal file
@ -0,0 +1,94 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSVNDiffFrm','FORMDATA',[
|
||||
'TPF0'#11'TSVNDiffFrm'#10'SVNDiffFrm'#4'Left'#3#154#0#6'Height'#3#160#1#3'Top'
|
||||
+#3#200#0#5'Width'#3#219#2#11'HelpContext'#2#0#13'ActiveControl'#7#11'SVNDiff'
|
||||
+'Memo'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8'AutoSize'
|
||||
+#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaximize'#0#11'Bo'
|
||||
+'rderStyle'#7#10'bsSizeable'#7'Caption'#6#10'SVNDiffFrm'#28'ChildSizing.Left'
|
||||
+'RightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'ChildSizing.Horiz'
|
||||
+'ontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'ChildSizing.Contro'
|
||||
+'lsPerLine'#2#0#12'ClientHeight'#3#160#1#11'ClientWidth'#3#219#2#8'DockSite'
|
||||
+#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.He'
|
||||
+'ight'#2#0#10'Font.Style'#11#0#9'FormStyle'#7#8'fsNormal'#8'OnCreate'#7#10'F'
|
||||
+'ormCreate'#6'OnShow'#7#8'FormShow'#14'ParentBiDiMode'#9#10'ParentFont'#8#8
|
||||
+'Position'#7#14'poScreenCenter'#13'ShowInTaskBar'#7#9'stDefault'#14'UseDockM'
|
||||
+'anager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0#12'TBu'
|
||||
+'ttonPanel'#11'ButtonPanel'#4'Left'#2#6#6'Height'#2'0'#3'Top'#3'p'#1#5'Width'
|
||||
+#3#207#2#11'HelpContext'#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#11'ButtonO'
|
||||
+'rder'#7#9'boDefault'#8'TabOrder'#2#0#13'DefaultButton'#7#4'pbOK'#11'ShowBut'
|
||||
+'tons'#11#4'pbOK'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClose'#6'pbHel'
|
||||
+'p'#0#7'Visible'#9#0#7'TBitBtn'#10'SaveButton'#4'Left'#2'N'#6'Height'#2'"'#3
|
||||
+'Top'#2#8#5'Width'#2'j'#11'HelpContext'#2#0#5'Align'#7#6'alLeft'#8'AutoSize'
|
||||
+#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Rig'
|
||||
+'ht'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSp'
|
||||
+'acing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'
|
||||
+#7#7'ccaFill'#6'Cancel'#8#7'Caption'#6#10'SaveButton'#7'Default'#8#7'Enabled'
|
||||
+#9#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0
|
||||
+#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0
|
||||
+'h;'#30#255#131'K&'#255#172'b1'#255#183'h5'#255#181'h5'#255#180'g4'#255#178
|
||||
+'f4'#255#176'e3'#255#174'd3'#255#172'c2'#255#170'b2'#255#169'a2'#255#168'`1'
|
||||
+#255#166'`1'#255#157'[.'#255#129'K&'#255#162'\.'#255#235#198#173#255#234#197
|
||||
+#173#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254
|
||||
+#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255
|
||||
+#254#251#248#255#200#154'|'#255#199#152'y'#255#155'Y.'#255#185'k7'#255#237
|
||||
+#202#179#255#224#162'z'#255#254#250#247#255'b'#192#136#255'b'#192#136#255'b'
|
||||
+#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'
|
||||
+#192#136#255#253#249#246#255#202#141'e'#255#201#155'|'#255#166'`1'#255#187'l'
|
||||
+'8'#255#238#204#182#255#225#162'z'#255#254#250#247#255#191#220#194#255#191
|
||||
+#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255#191#220#194#255
|
||||
+#191#220#194#255#191#220#194#255#253#249#246#255#205#144'h'#255#204#158#129
|
||||
+#255#168'a2'#255#187'k8'#255#239#206#184#255#225#162'y'#255#254#250#247#255
|
||||
+'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255'b'#192#136#255
|
||||
+'b'#192#136#255'b'#192#136#255'b'#192#136#255#253#249#246#255#207#147'j'#255
|
||||
+#206#163#132#255#170'a2'#255#186'j6'#255#239#208#187#255#226#162'z'#255#254
|
||||
+#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255
|
||||
+#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248#255#254#251#248
|
||||
+#255#211#150'm'#255#210#167#138#255#171'b2'#255#187'j6'#255#240#210#190#255
|
||||
+#226#163'z'#255#226#163'z'#255#225#163'z'#255#226#163'{'#255#225#163'{'#255
|
||||
+#224#161'x'#255#222#159'w'#255#221#159'v'#255#220#157't'#255#217#155'r'#255
|
||||
+#216#153'q'#255#214#153'p'#255#213#171#142#255#173'c3'#255#187'j6'#255#242
|
||||
+#213#194#255#227#163'z'#255#227#163'z'#255#226#163'{'#255#226#163'{'#255#226
|
||||
+#164'{'#255#225#162'y'#255#224#161'x'#255#222#160'w'#255#222#158'u'#255#220
|
||||
+#157't'#255#218#155's'#255#217#155's'#255#218#176#149#255#175'd3'#255#187'j6'
|
||||
+#255#242#216#197#255#227#164'{'#255#227#163'z'#255#227#164'z'#255#226#164'{'
|
||||
+#255#226#163'{'#255#225#163'{'#255#225#162'y'#255#223#160'w'#255#222#159'v'
|
||||
+#255#221#158't'#255#219#156'r'#255#220#157't'#255#221#181#154#255#177'e4'#255
|
||||
+#187'k6'#255#244#217#199#255#230#166'}'#255#200#140'd'#255#201#141'e'#255#201
|
||||
+#142'g'#255#203#146'l'#255#203#146'm'#255#202#144'i'#255#200#140'e'#255#200
|
||||
+#140'd'#255#200#140'd'#255#200#140'd'#255#218#156't'#255#225#186#159#255#179
|
||||
+'f4'#255#187'l7'#255#244#220#201#255#231#167'}'#255#249#236#225#255#249#236
|
||||
+#225#255#249#237#227#255#252#244#238#255#253#250#247#255#253#247#243#255#250
|
||||
+#237#229#255#247#231#219#255#247#229#217#255#246#229#216#255#222#160'w'#255
|
||||
+#228#190#164#255#180'g4'#255#188'm9'#255#245#221#204#255#231#168'~'#255#250
|
||||
+#240#232#255#250#240#232#255#201#141'f'#255#250#240#233#255#253#248#243#255
|
||||
+#254#250#248#255#252#244#239#255#249#233#223#255#247#231#219#255#247#229#217
|
||||
+#255#224#162'x'#255#231#194#169#255#182'h5'#255#177'e3'#255#246#223#208#255
|
||||
+#232#168'~'#255#252#246#241#255#252#246#241#255#200#140'd'#255#250#241#233
|
||||
,#255#251#244#238#255#253#250#247#255#253#249#246#255#250#240#232#255#248#232
|
||||
+#221#255#247#230#219#255#225#163'z'#255#239#213#195#255#182'i5'#255#159'[.'
|
||||
+#255#246#223#209#255#233#170#128#255#254#250#246#255#253#250#246#255#200#140
|
||||
+'d'#255#251#243#238#255#251#241#234#255#252#246#242#255#254#251#248#255#252
|
||||
+#246#241#255#249#236#226#255#248#231#219#255#238#208#186#255#236#208#189#255
|
||||
+#182'm<'#255'rA!'#255#246#224#209#255#247#224#209#255#254#251#248#255#254#251
|
||||
+#247#255#253#249#246#255#252#245#240#255#250#240#234#255#251#242#237#255#253
|
||||
+#249#246#255#253#250#247#255#251#241#235#255#248#233#223#255#232#205#186#255
|
||||
+#186'W'#255'F)'#21#0'S/'#24#0'j<'#30#255#150'V+'#255#175'd2'#255#188'm9'#255
|
||||
+#187'l7'#255#187'k6'#255#187'j6'#255#187'j6'#255#188'l9'#255#189'n;'#255#187
|
||||
+'m:'#255#175'd4'#255#149'Y1'#255'<#'#17#0#0#0#0#0#4'Kind'#7#8'bkCustom'#6'La'
|
||||
+'yout'#7#11'blGlyphLeft'#6'Margin'#2#255#11'ModalResult'#2#0#9'NumGlyphs'#2#0
|
||||
+#7'OnClick'#7#15'SaveButtonClick'#10'ParentFont'#9#14'ParentShowHint'#9#7'Sp'
|
||||
+'acing'#2#3#8'TabOrder'#2#4#7'TabStop'#9#7'Visible'#9#0#0#0#5'TMemo'#11'SVND'
|
||||
+'iffMemo'#4'Left'#2#6#6'Height'#3'd'#1#3'Top'#2#6#5'Width'#3#207#2#11'HelpCo'
|
||||
+'ntext'#2#0#5'Align'#7#8'alClient'#9'Alignment'#7#13'taLeftJustify'#18'Borde'
|
||||
+'rSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20
|
||||
+'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellA'
|
||||
+'lignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFil'
|
||||
+'l'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Fon'
|
||||
+'t.Height'#2#243#9'Font.Name'#6#7'Courier'#10'Font.Style'#11#0#9'MaxLength'#2
|
||||
+#255#14'ParentBidiMode'#9#10'ParentFont'#8#8'ReadOnly'#8#10'ScrollBars'#7#10
|
||||
+'ssAutoBoth'#8'TabOrder'#2#1#7'TabStop'#9#7'Visible'#9#11'WantReturns'#9#8'W'
|
||||
+'antTabs'#8#0#0#11'TSaveDialog'#10'SaveDialog'#5'Width'#2#0#6'Height'#2#0#10
|
||||
+'DefaultExt'#6#5'.diff'#6'Filter'#6#18'Patch|.diff;.patch'#4'left'#2#21#3'to'
|
||||
+'p'#3'='#1#0#0#0
|
||||
]);
|
145
components/lazsvnpkg/svndiffform.pas
Normal file
145
components/lazsvnpkg/svndiffform.pas
Normal file
@ -0,0 +1,145 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit SVNDiffForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ButtonPanel, StdCtrls, Process, Buttons, LCLProc;
|
||||
|
||||
type
|
||||
|
||||
{ TSVNDiffFrm }
|
||||
|
||||
TSVNDiffFrm = class(TForm)
|
||||
SaveButton: TBitBtn;
|
||||
ButtonPanel: TButtonPanel;
|
||||
SaveDialog: TSaveDialog;
|
||||
SVNDiffMemo: TMemo;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure SaveButtonClick(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
FSwitches: string;
|
||||
FRepoPath: string;
|
||||
public
|
||||
{ public declarations }
|
||||
procedure Execute;
|
||||
end;
|
||||
|
||||
procedure ShowSVNDiffFrm(ASwitches, ARepoPath: string);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SVNClasses;
|
||||
|
||||
procedure ShowSVNDiffFrm(ASwitches, ARepoPath: string);
|
||||
var
|
||||
SVNDiffFrm: TSVNDiffFrm;
|
||||
begin
|
||||
SVNDiffFrm := TSVNDiffFrm.Create(nil);
|
||||
|
||||
SVNDiffFrm.FRepoPath:=ARepoPath;
|
||||
SVNDiffFrm.FSwitches:=ASwitches;
|
||||
SVNDiffFrm.ShowModal;
|
||||
|
||||
SVNDiffFrm.Free;
|
||||
end;
|
||||
|
||||
{ TSVNDiffFrm }
|
||||
|
||||
procedure TSVNDiffFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Caption := Format(rsLazarusSVNDiff, [FRepoPath]);
|
||||
Execute;
|
||||
end;
|
||||
|
||||
procedure TSVNDiffFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SaveButton.Caption:=rsSave;
|
||||
end;
|
||||
|
||||
procedure TSVNDiffFrm.SaveButtonClick(Sender: TObject);
|
||||
begin
|
||||
if SaveDialog.Execute then
|
||||
SVNDiffMemo.Lines.SaveToFile(SaveDialog.FileName);
|
||||
end;
|
||||
|
||||
procedure TSVNDiffFrm.Execute;
|
||||
var
|
||||
AProcess: TProcess;
|
||||
BytesRead: LongInt;
|
||||
n: LongInt;
|
||||
M: TMemoryStream;
|
||||
begin
|
||||
AProcess := TProcess.Create(nil);
|
||||
AProcess.CommandLine := SVNExecutable + ' diff ' + FSwitches + ' ' + FRepoPath + ' --non-interactive';
|
||||
debugln('TSVNDiffFrm.Execute commandline=', AProcess.CommandLine);
|
||||
AProcess.Options := AProcess.Options + [poUsePipes, poStdErrToOutput];
|
||||
AProcess.ShowWindow := swoHIDE;
|
||||
AProcess.Execute;
|
||||
|
||||
M := TMemoryStream.Create;
|
||||
BytesRead := 0;
|
||||
|
||||
while AProcess.Running do
|
||||
begin
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0
|
||||
then begin
|
||||
Inc(BytesRead, n);
|
||||
end
|
||||
else begin
|
||||
// no data, wait 100 ms
|
||||
Sleep(100);
|
||||
end;
|
||||
end;
|
||||
// read last part
|
||||
repeat
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0
|
||||
then begin
|
||||
Inc(BytesRead, n);
|
||||
end;
|
||||
until n <= 0;
|
||||
M.SetSize(BytesRead);
|
||||
|
||||
SVNDiffMemo.Lines.LoadFromStream(M);
|
||||
SVNDiffMemo.Lines.Text := ReplaceLineEndings(SVNDiffMemo.Lines.Text, LineEnding);
|
||||
|
||||
AProcess.Free;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I svndiffform.lrs}
|
||||
|
||||
end.
|
||||
|
330
components/lazsvnpkg/svnlogform.lfm
Normal file
330
components/lazsvnpkg/svnlogform.lfm
Normal file
@ -0,0 +1,330 @@
|
||||
object SVNLogFrm: TSVNLogFrm
|
||||
Left = 290
|
||||
Height = 566
|
||||
Top = 175
|
||||
Width = 726
|
||||
HelpContext = 0
|
||||
ActiveControl = LogListView
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'SVNLogFrm'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 566
|
||||
ClientWidth = 726
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnShow = FormShow
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poScreenCenter
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = SVNLogLimit
|
||||
Left = 6
|
||||
Height = 14
|
||||
Top = 497
|
||||
Width = 97
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
Alignment = taLeftJustify
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'Show last X commits'
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Layout = tlTop
|
||||
ParentBidiMode = True
|
||||
ParentColor = False
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ShowAccelChar = True
|
||||
Transparent = True
|
||||
Visible = True
|
||||
WordWrap = False
|
||||
OptimalFill = False
|
||||
end
|
||||
object LogListView: TListView
|
||||
Left = 6
|
||||
Height = 159
|
||||
Top = 6
|
||||
Width = 714
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BorderWidth = 0
|
||||
Checkboxes = False
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
Width = 546
|
||||
end>
|
||||
ColumnClick = True
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
HideSelection = True
|
||||
MultiSelect = False
|
||||
ParentShowHint = True
|
||||
ReadOnly = False
|
||||
RowSelect = True
|
||||
ScrollBars = ssBoth
|
||||
ShowColumnHeaders = True
|
||||
SortColumn = 0
|
||||
SortType = stNone
|
||||
TabStop = True
|
||||
TabOrder = 0
|
||||
ToolTips = True
|
||||
Visible = True
|
||||
ViewStyle = vsReport
|
||||
OnSelectItem = LogListViewSelectItem
|
||||
end
|
||||
object SVNLogMsgMemo: TMemo
|
||||
Left = 6
|
||||
Height = 151
|
||||
Top = 170
|
||||
Width = 714
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
Alignment = taLeftJustify
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
MaxLength = -1
|
||||
ParentBidiMode = True
|
||||
ParentFont = False
|
||||
ReadOnly = False
|
||||
ScrollBars = ssNone
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
Visible = True
|
||||
WantReturns = True
|
||||
WantTabs = False
|
||||
end
|
||||
object SVNActionsListView: TListView
|
||||
AnchorSideBottom.Control = RefreshButton
|
||||
Left = 6
|
||||
Height = 163
|
||||
Top = 326
|
||||
Width = 714
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BorderWidth = 0
|
||||
Checkboxes = False
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
Width = 546
|
||||
end>
|
||||
ColumnClick = True
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
HideSelection = True
|
||||
MultiSelect = False
|
||||
ParentShowHint = True
|
||||
PopupMenu = SVNActionsPopupMenu
|
||||
ReadOnly = False
|
||||
RowSelect = True
|
||||
ScrollBars = ssBoth
|
||||
ShowColumnHeaders = True
|
||||
SortColumn = 0
|
||||
SortType = stNone
|
||||
TabStop = True
|
||||
TabOrder = 2
|
||||
ToolTips = True
|
||||
Visible = True
|
||||
ViewStyle = vsReport
|
||||
end
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 40
|
||||
Top = 526
|
||||
Width = 714
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 3
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 165
|
||||
Width = 726
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
AutoSnap = True
|
||||
Beveled = False
|
||||
MinSize = 30
|
||||
ParentColor = True
|
||||
ParentShowHint = True
|
||||
ResizeAnchor = akTop
|
||||
ResizeStyle = rsUpdate
|
||||
Visible = True
|
||||
end
|
||||
object Splitter2: TSplitter
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 321
|
||||
Width = 726
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
AutoSnap = True
|
||||
Beveled = False
|
||||
MinSize = 30
|
||||
ParentColor = True
|
||||
ParentShowHint = True
|
||||
ResizeAnchor = akTop
|
||||
ResizeStyle = rsUpdate
|
||||
Visible = True
|
||||
end
|
||||
object SVNLogLimit: TSpinEdit
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonPanel
|
||||
Left = 109
|
||||
Height = 23
|
||||
Top = 497
|
||||
Width = 94
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSelect = False
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Enabled = True
|
||||
Increment = 1
|
||||
MaxValue = 100000
|
||||
MinValue = 0
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ReadOnly = False
|
||||
TabStop = True
|
||||
TabOrder = 6
|
||||
Value = 100
|
||||
Visible = True
|
||||
end
|
||||
object RefreshButton: TButton
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = ButtonPanel
|
||||
Left = 645
|
||||
Height = 25
|
||||
Top = 495
|
||||
Width = 75
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Cancel = False
|
||||
Caption = 'Refresh'
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = RefreshButtonClick
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 7
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object SVNActionsPopupMenu: TPopupMenu
|
||||
left = 37
|
||||
top = 369
|
||||
object mnuShowDiff: TMenuItem
|
||||
Caption = 'New Item1'
|
||||
RightJustify = False
|
||||
ShowAlwaysCheckable = False
|
||||
OnClick = mnuShowDiffClick
|
||||
end
|
||||
end
|
||||
end
|
98
components/lazsvnpkg/svnlogform.lrs
Normal file
98
components/lazsvnpkg/svnlogform.lrs
Normal file
@ -0,0 +1,98 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSVNLogFrm','FORMDATA',[
|
||||
'TPF0'#10'TSVNLogFrm'#9'SVNLogFrm'#4'Left'#3'"'#1#6'Height'#3'6'#2#3'Top'#3
|
||||
+#175#0#5'Width'#3#214#2#11'HelpContext'#2#0#13'ActiveControl'#7#11'LogListVi'
|
||||
+'ew'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8'AutoSize'#8
|
||||
+#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaximize'#0#11'Bord'
|
||||
+'erStyle'#7#10'bsSizeable'#7'Caption'#6#9'SVNLogFrm'#28'ChildSizing.LeftRigh'
|
||||
+'tSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'ChildSizing.Horizonta'
|
||||
+'lSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'ChildSizing.ControlsPe'
|
||||
+'rLine'#2#0#12'ClientHeight'#3'6'#2#11'ClientWidth'#3#214#2#8'DockSite'#8#8
|
||||
+'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'
|
||||
+#2#0#10'Font.Style'#11#0#9'FormStyle'#7#8'fsNormal'#8'OnCreate'#7#10'FormCre'
|
||||
+'ate'#9'OnDestroy'#7#11'FormDestroy'#6'OnShow'#7#8'FormShow'#14'ParentBiDiMo'
|
||||
+'de'#9#10'ParentFont'#8#8'Position'#7#14'poScreenCenter'#13'ShowInTaskBar'#7
|
||||
+#9'stDefault'#14'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'
|
||||
+#7#8'wsNormal'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21
|
||||
+'AnchorSideTop.Control'#7#11'SVNLogLimit'#4'Left'#2#6#6'Height'#2#14#3'Top'#3
|
||||
+#241#1#5'Width'#2'a'#11'HelpContext'#2#0#5'Align'#7#6'alNone'#9'Alignment'#7
|
||||
+#13'taLeftJustify'#8'AutoSize'#9#18'BorderSpacing.Left'#2#6#17'BorderSpacing'
|
||||
+'.Top'#2#0#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bottom'#2#0#20'Borde'
|
||||
+'rSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'Bo'
|
||||
+'rderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#19'Show last X com'
|
||||
+'mits'#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#6'L'
|
||||
+'ayout'#7#5'tlTop'#14'ParentBidiMode'#9#11'ParentColor'#8#10'ParentFont'#9#14
|
||||
+'ParentShowHint'#9#13'ShowAccelChar'#9#11'Transparent'#9#7'Visible'#9#8'Word'
|
||||
+'Wrap'#8#11'OptimalFill'#8#0#0#9'TListView'#11'LogListView'#4'Left'#2#6#6'He'
|
||||
+'ight'#3#159#0#3'Top'#2#6#5'Width'#3#202#2#11'HelpContext'#2#0#5'Align'#7#5
|
||||
+'alTop'#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#19'BorderSpacin'
|
||||
+'g.Right'#2#6#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#0'!Bor'
|
||||
+'derSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVert'
|
||||
+'ical'#7#7'ccaFill'#11'BorderWidth'#2#0#10'Checkboxes'#8#7'Columns'#14#1#8'A'
|
||||
+'utoSize'#8#0#1#8'AutoSize'#8#0#1#8'AutoSize'#8#0#1#8'AutoSize'#8#5'Width'#3
|
||||
+'"'#2#0#0#11'ColumnClick'#9#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmMan'
|
||||
+'ual'#7'Enabled'#9#13'HideSelection'#9#11'MultiSelect'#8#14'ParentShowHint'#9
|
||||
+#8'ReadOnly'#8#9'RowSelect'#9#10'ScrollBars'#7#6'ssBoth'#17'ShowColumnHeader'
|
||||
+'s'#9#10'SortColumn'#2#0#8'SortType'#7#6'stNone'#7'TabStop'#9#8'TabOrder'#2#0
|
||||
+#8'ToolTips'#9#7'Visible'#9#9'ViewStyle'#7#8'vsReport'#12'OnSelectItem'#7#21
|
||||
+'LogListViewSelectItem'#0#0#5'TMemo'#13'SVNLogMsgMemo'#4'Left'#2#6#6'Height'
|
||||
+#3#151#0#3'Top'#3#170#0#5'Width'#3#202#2#11'HelpContext'#2#0#5'Align'#7#5'al'
|
||||
+'Top'#9'Alignment'#7#13'taLeftJustify'#18'BorderSpacing.Left'#2#6#17'BorderS'
|
||||
+'pacing.Top'#2#0#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bottom'#2#0#20
|
||||
+'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'
|
||||
+#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#10'DragCursor'#7#6'crDrag'
|
||||
+#8'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'#2#0#10'Font.Style'#11
|
||||
+#0#9'MaxLength'#2#255#14'ParentBidiMode'#9#10'ParentFont'#8#8'ReadOnly'#8#10
|
||||
+'ScrollBars'#7#6'ssNone'#8'TabOrder'#2#1#7'TabStop'#9#7'Visible'#9#11'WantRe'
|
||||
+'turns'#9#8'WantTabs'#8#0#0#9'TListView'#18'SVNActionsListView'#24'AnchorSid'
|
||||
+'eBottom.Control'#7#13'RefreshButton'#4'Left'#2#6#6'Height'#3#163#0#3'Top'#3
|
||||
+'F'#1#5'Width'#3#202#2#11'HelpContext'#2#0#5'Align'#7#5'alTop'#7'Anchors'#11
|
||||
+#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#17'B'
|
||||
+'orderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bottom'#2
|
||||
+#6#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7#7'ccaF'
|
||||
+'ill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#11'BorderWidth'#2#0#10
|
||||
+'Checkboxes'#8#7'Columns'#14#1#8'AutoSize'#8#0#1#8'AutoSize'#8#0#1#8'AutoSiz'
|
||||
+'e'#8#0#1#8'AutoSize'#8#5'Width'#3'"'#2#0#0#11'ColumnClick'#9#10'DragCursor'
|
||||
+#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#13'HideSelection'#9#11'M'
|
||||
+'ultiSelect'#8#14'ParentShowHint'#9#9'PopupMenu'#7#19'SVNActionsPopupMenu'#8
|
||||
+'ReadOnly'#8#9'RowSelect'#9#10'ScrollBars'#7#6'ssBoth'#17'ShowColumnHeaders'
|
||||
+#9#10'SortColumn'#2#0#8'SortType'#7#6'stNone'#7'TabStop'#9#8'TabOrder'#2#2#8
|
||||
+'ToolTips'#9#7'Visible'#9#9'ViewStyle'#7#8'vsReport'#0#0#12'TButtonPanel'#11
|
||||
+'ButtonPanel'#4'Left'#2#6#6'Height'#2'('#3'Top'#3#14#2#5'Width'#3#202#2#11'H'
|
||||
+'elpContext'#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#11'ButtonOrder'#7#9'bo'
|
||||
+'Default'#8'TabOrder'#2#3#13'DefaultButton'#7#4'pbOK'#11'ShowButtons'#11#4'p'
|
||||
+'bOK'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClose'#6'pbHelp'#0#7'Visib'
|
||||
+'le'#9#0#0#9'TSplitter'#9'Splitter1'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0#6'H'
|
||||
+'eight'#2#5#3'Top'#3#165#0#5'Width'#3#214#2#11'HelpContext'#2#0#5'Align'#7#5
|
||||
,'alTop'#8'AutoSnap'#9#7'Beveled'#8#7'MinSize'#2#30#11'ParentColor'#9#14'Pare'
|
||||
+'ntShowHint'#9#12'ResizeAnchor'#7#5'akTop'#11'ResizeStyle'#7#8'rsUpdate'#7'V'
|
||||
+'isible'#9#0#0#9'TSplitter'#9'Splitter2'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0
|
||||
+#6'Height'#2#5#3'Top'#3'A'#1#5'Width'#3#214#2#11'HelpContext'#2#0#5'Align'#7
|
||||
+#5'alTop'#8'AutoSnap'#9#7'Beveled'#8#7'MinSize'#2#30#11'ParentColor'#9#14'Pa'
|
||||
+'rentShowHint'#9#12'ResizeAnchor'#7#5'akTop'#11'ResizeStyle'#7#8'rsUpdate'#7
|
||||
+'Visible'#9#0#0#9'TSpinEdit'#11'SVNLogLimit'#22'AnchorSideLeft.Control'#7#6
|
||||
+'Label1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'
|
||||
+#7#11'ButtonPanel'#4'Left'#2'm'#6'Height'#2#23#3'Top'#3#241#1#5'Width'#2'^'
|
||||
+#11'HelpContext'#2#0#5'Align'#7#6'alNone'#7'Anchors'#11#6'akLeft'#8'akBottom'
|
||||
+#0#10'AutoSelect'#8#8'AutoSize'#8#18'BorderSpacing.Left'#2#0#17'BorderSpacin'
|
||||
+'g.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'Bord'
|
||||
+'erSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'B'
|
||||
+'orderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Enabled'#9#9'Increment'#2#1#8
|
||||
+'MaxValue'#4#160#134#1#0#8'MinValue'#2#0#10'ParentFont'#9#14'ParentShowHint'
|
||||
+#9#8'ReadOnly'#8#7'TabStop'#9#8'TabOrder'#2#6#5'Value'#2'd'#7'Visible'#9#0#0
|
||||
+#7'TButton'#13'RefreshButton'#23'AnchorSideRight.Control'#7#5'Owner'#20'Anch'
|
||||
+'orSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#11'ButtonPa'
|
||||
+'nel'#4'Left'#3#133#2#6'Height'#2#25#3'Top'#3#239#1#5'Width'#2'K'#11'HelpCon'
|
||||
+'text'#2#0#5'Align'#7#6'alNone'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'Aut'
|
||||
+'oSize'#8#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpac'
|
||||
+'ing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!B'
|
||||
+'orderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVe'
|
||||
+'rtical'#7#7'ccaFill'#6'Cancel'#8#7'Caption'#6#7'Refresh'#7'Default'#8#10'Dr'
|
||||
+'agCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiM'
|
||||
+'ode'#9#11'ModalResult'#2#0#7'OnClick'#7#18'RefreshButtonClick'#10'ParentFon'
|
||||
+'t'#9#14'ParentShowHint'#9#8'TabOrder'#2#7#7'TabStop'#9#7'Visible'#9#0#0#10
|
||||
+'TPopupMenu'#19'SVNActionsPopupMenu'#4'left'#2'%'#3'top'#3'q'#1#0#9'TMenuIte'
|
||||
+'m'#11'mnuShowDiff'#7'Caption'#6#9'New Item1'#12'RightJustify'#8#19'ShowAlwa'
|
||||
+'ysCheckable'#8#7'OnClick'#7#16'mnuShowDiffClick'#0#0#0#0
|
||||
]);
|
421
components/lazsvnpkg/svnlogform.pas
Normal file
421
components/lazsvnpkg/svnlogform.pas
Normal file
@ -0,0 +1,421 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit SVNLogForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ComCtrls, StdCtrls, ButtonPanel, ExtCtrls, Process, Spin, XMLRead, DOM,
|
||||
SrcEditorIntf, Menus, LCLProc;
|
||||
|
||||
type
|
||||
TActionItem = record
|
||||
Action: string;
|
||||
Path: string;
|
||||
CopyPath: string;
|
||||
CopyRev: string;
|
||||
end;
|
||||
|
||||
{ TSVNLogItem }
|
||||
|
||||
TSVNLogItem = class(TObject)
|
||||
FAuthor: string;
|
||||
FCount: integer;
|
||||
FDate: TDateTime;
|
||||
FMsg: string;
|
||||
FRevision: integer;
|
||||
FAction: array of TActionItem;
|
||||
|
||||
function GetAction(Index: Integer): TActionItem;
|
||||
private
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure AddAction(AActionItem: TActionItem);
|
||||
property Action[Index: Integer]: TActionItem read GetAction;
|
||||
property Count: integer read FCount write FCount;
|
||||
property Revision: integer read FRevision write FRevision;
|
||||
property Author: string read FAuthor write FAuthor;
|
||||
property Date: TDateTime read FDate write FDate;
|
||||
property Msg: string read FMsg write FMsg;
|
||||
end;
|
||||
|
||||
{ TSVNLogFrm }
|
||||
|
||||
TSVNLogFrm = class(TForm)
|
||||
mnuShowDiff: TMenuItem;
|
||||
SVNActionsPopupMenu: TPopupMenu;
|
||||
RefreshButton: TButton;
|
||||
ButtonPanel: TButtonPanel;
|
||||
Label1: TLabel;
|
||||
LogListView: TListView;
|
||||
SVNActionsListView: TListView;
|
||||
SVNLogMsgMemo: TMemo;
|
||||
SVNLogLimit: TSpinEdit;
|
||||
Splitter1: TSplitter;
|
||||
Splitter2: TSplitter;
|
||||
procedure mnuShowDiffClick(Sender: TObject);
|
||||
procedure RefreshButtonClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure LogListViewSelectItem(Sender: TObject; Item: TListItem;
|
||||
Selected: Boolean);
|
||||
private
|
||||
{ private declarations }
|
||||
FRepoPath: string;
|
||||
LogList: TFPList;
|
||||
procedure UpdateLogListView;
|
||||
public
|
||||
{ public declarations }
|
||||
procedure Execute;
|
||||
end;
|
||||
|
||||
procedure ShowSVNLogFrm(ARepoPath: string);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SVNDiffForm, SVNClasses;
|
||||
|
||||
procedure ShowSVNLogFrm(ARepoPath: string);
|
||||
var
|
||||
SVNLogFrm: TSVNLogFrm;
|
||||
begin
|
||||
SVNLogFrm := TSVNLogFrm.Create(nil);
|
||||
|
||||
SVNLogFrm.FRepoPath:=ARepoPath;
|
||||
SVNLogFrm.ShowModal;
|
||||
|
||||
SVNLogFrm.Free;
|
||||
end;
|
||||
|
||||
{ TSVNLogItem }
|
||||
|
||||
function TSVNLogItem.GetAction(Index: Integer): TActionItem;
|
||||
begin
|
||||
if (Index < 0) or (Index >= Count) then
|
||||
raise Exception.CreateFmt(rsIndexOutOfBoundsD, [Index]);
|
||||
|
||||
Result := FAction[Index];
|
||||
end;
|
||||
|
||||
constructor TSVNLogItem.Create;
|
||||
begin
|
||||
|
||||
end;
|
||||
|
||||
destructor TSVNLogItem.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TSVNLogItem.AddAction(AActionItem: TActionItem);
|
||||
begin
|
||||
Inc(FCount);
|
||||
SetLength(FAction, Count);
|
||||
|
||||
FAction[Count - 1] := AActionItem;
|
||||
end;
|
||||
|
||||
function FindSVNLogItemByRevision(List: TFPList; RevNo: integer): TSVNLogItem;
|
||||
function SearchLinear(List: TFPList; RevNo: integer): TSVNLogItem;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
Result := nil;
|
||||
for i := 0 to List.Count - 1 do
|
||||
if TSVNLogItem(List.Items[i]).Revision = RevNo then
|
||||
begin
|
||||
Result := TSVNLogItem(List.Items[i]);
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
var
|
||||
tmpRev: integer;
|
||||
index: integer;
|
||||
begin
|
||||
Result := nil;
|
||||
|
||||
tmpRev := TSVNLogItem(List.Items[0]).Revision;
|
||||
|
||||
//calculate most probable index
|
||||
index := tmpRev - RevNo;
|
||||
|
||||
if (index < 0) or (index >= List.Count) then
|
||||
//invalid index, so just do a linear search
|
||||
Result := SearchLinear(List, RevNo)
|
||||
else
|
||||
begin
|
||||
if TSVNLogItem(List.Items[index]).Revision = RevNo then
|
||||
//found!
|
||||
Result := TSVNLogItem(List.Items[index])
|
||||
else
|
||||
//revision not found on expected location, search linear
|
||||
Result := SearchLinear(List, RevNo);
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TSVNLogFrm }
|
||||
|
||||
procedure TSVNLogFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Caption := Format(rsLazarusSVNLog, [FRepoPath]);
|
||||
Execute;
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.LogListViewSelectItem(Sender: TObject; Item: TListItem;
|
||||
Selected: Boolean);
|
||||
var
|
||||
RevNo: integer;
|
||||
SVNLogItem: TSVNLogItem;
|
||||
i: integer;
|
||||
begin
|
||||
RevNo := StrToInt(Item.Caption);
|
||||
|
||||
SVNLogItem := FindSVNLogItemByRevision(LogList, RevNo);
|
||||
|
||||
SVNActionsListView.Clear;
|
||||
|
||||
if Assigned(SVNLogItem) then
|
||||
begin
|
||||
SVNLogMsgMemo.Lines.Text:=SVNLogItem.Msg;
|
||||
|
||||
for i := 0 to SVNLogItem.Count - 1 do
|
||||
with SVNActionsListView.Items.Add do
|
||||
begin
|
||||
Caption := SVNLogItem.Action[i].Action;
|
||||
SubItems.Add(SVNLogItem.Action[i].Path);
|
||||
SubItems.Add(SVNLogItem.Action[i].CopyPath);
|
||||
SubItems.Add(SVNLogItem.Action[i].CopyRev);
|
||||
end;
|
||||
end
|
||||
else
|
||||
SVNLogMsgMemo.Clear;
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.UpdateLogListView;
|
||||
var
|
||||
i: integer;
|
||||
LogItem : TSVNLogItem;
|
||||
begin
|
||||
LogListView.Clear;
|
||||
|
||||
for i := 0 to LogList.Count - 1 do
|
||||
with LogListView.Items.Add do
|
||||
begin
|
||||
LogItem := TSVNLogItem(LogList.Items[i]);
|
||||
|
||||
//revision
|
||||
Caption := IntToStr(LogItem.Revision);
|
||||
|
||||
//author
|
||||
SubItems.Add(LogItem.Author);
|
||||
|
||||
//date
|
||||
SubItems.Add(DateTimeToStr(LogItem.Date));
|
||||
|
||||
//message
|
||||
SubItems.Add(LogItem.Msg);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.RefreshButtonClick(Sender: TObject);
|
||||
begin
|
||||
Execute;
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.mnuShowDiffClick(Sender: TObject);
|
||||
var
|
||||
path: string;
|
||||
i: integer;
|
||||
begin
|
||||
{$note implement opening file in source editor}
|
||||
if Assigned(SVNActionsListView.Selected) then
|
||||
begin
|
||||
debugln('TSVNLogFrm.mnuShowDiffClick Path=' ,SVNActionsListView.Selected.SubItems[0]);
|
||||
path := SVNActionsListView.Selected.SubItems[0];
|
||||
Delete(path, 1, 1);
|
||||
i := pos('/', path);
|
||||
ShowSVNDiffFrm('-r PREV', FRepoPath + Copy(path, i, length(path) - i + 1));
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
LogList := TFPList.Create;
|
||||
|
||||
SetColumn(LogListView, 0, 75, rsRevision);
|
||||
SetColumn(LogListView, 1, 75, rsAuthor);
|
||||
SetColumn(LogListView, 2, 150, rsDate);
|
||||
SetColumn(LogListView, 3, 200, rsMessage);
|
||||
|
||||
SetColumn(SVNActionsListView, 0, 50, rsAction);
|
||||
SetColumn(SVNActionsListView, 1, 200, rsPath);
|
||||
SetColumn(SVNActionsListView, 2, 150, rsCopyFromPath);
|
||||
SetColumn(SVNActionsListView, 3, 75, rsRevision);
|
||||
|
||||
mnuShowDiff.Caption := rsShowDiff;
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
LogList.Free;
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.Execute;
|
||||
var
|
||||
M: TMemoryStream;
|
||||
Doc: TXMLDocument;
|
||||
Node: TDOMNode;
|
||||
SubNode: TDOMNode;
|
||||
ActionNode: TDOMNode;
|
||||
LogItem: TSVNLogItem;
|
||||
AProcess: TProcess;
|
||||
temp: TDomNode;
|
||||
ActionItem: TActionItem;
|
||||
i: integer;
|
||||
t: string;
|
||||
BytesRead: LongInt;
|
||||
n: LongInt;
|
||||
|
||||
procedure AddItem(Node: TDomNode);
|
||||
begin
|
||||
with LogListView.Items.Add do
|
||||
begin
|
||||
Caption := Node.NodeName;
|
||||
end;
|
||||
end;
|
||||
begin
|
||||
debugln('TSVNLogFrm.Execute FRepoPath=' ,FRepoPath);
|
||||
|
||||
AProcess := TProcess.Create(nil);
|
||||
AProcess.CommandLine := SVNExecutable + ' log --xml --verbose --limit ' + IntToStr(SVNLogLimit.Value) + ' ' + FRepoPath + ' --non-interactive';
|
||||
debugln('TSVNLogFrm.Execute CommandLine ' + AProcess.CommandLine);
|
||||
AProcess.Options := AProcess.Options + [poUsePipes, poStdErrToOutput];
|
||||
AProcess.ShowWindow := swoHIDE;
|
||||
AProcess.Execute;
|
||||
|
||||
M := TMemoryStream.Create;
|
||||
BytesRead := 0;
|
||||
|
||||
while AProcess.Running do
|
||||
begin
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0
|
||||
then begin
|
||||
Inc(BytesRead, n);
|
||||
end
|
||||
else begin
|
||||
// no data, wait 100 ms
|
||||
Sleep(100);
|
||||
end;
|
||||
end;
|
||||
|
||||
// read last part
|
||||
repeat
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
|
||||
// try reading it
|
||||
n := AProcess.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0
|
||||
then begin
|
||||
Inc(BytesRead, n);
|
||||
end;
|
||||
until n <= 0;
|
||||
M.SetSize(BytesRead);
|
||||
|
||||
ReadXMLFile(Doc, M);
|
||||
|
||||
M.Free;
|
||||
AProcess.Free;
|
||||
|
||||
LogList.Clear;
|
||||
|
||||
Node := Doc.DocumentElement.FirstChild;
|
||||
if Assigned(Node) then
|
||||
begin
|
||||
repeat
|
||||
SubNode := Node;
|
||||
|
||||
LogItem := TSVNLogItem.Create;
|
||||
|
||||
//revision
|
||||
LogItem.Revision := StrToInt(SubNode.Attributes.Item[0].NodeValue);
|
||||
|
||||
//author
|
||||
LogItem.Author:=SubNode.ChildNodes.Item[0].FirstChild.NodeValue;
|
||||
|
||||
//date
|
||||
LogItem.Date:=ISO8601ToDateTime(SubNode.ChildNodes.Item[1].FirstChild.NodeValue);
|
||||
|
||||
//action
|
||||
ActionItem.CopyRev := '';
|
||||
ActionItem.CopyPath := '';
|
||||
ActionNode := SubNode.ChildNodes.Item[2].FirstChild;
|
||||
repeat
|
||||
//attributes
|
||||
for i := 0 to ActionNode.Attributes.Length-1 do
|
||||
begin
|
||||
t := ActionNode.Attributes.Item[i].NodeName;
|
||||
|
||||
if t = 'action' then
|
||||
ActionItem.Action := ActionNode.Attributes.Item[i].NodeValue
|
||||
else
|
||||
if t = 'copyfrom-rev' then
|
||||
ActionItem.CopyRev := ActionNode.Attributes.Item[i].NodeValue
|
||||
else
|
||||
if t = 'copyfrom-path' then
|
||||
ActionItem.CopyPath := ActionNode.Attributes.Item[i].NodeValue;
|
||||
end;
|
||||
|
||||
//paths
|
||||
ActionItem.Path:=ActionNode.FirstChild.NodeValue;
|
||||
|
||||
LogItem.AddAction(ActionItem);
|
||||
|
||||
ActionNode := ActionNode.NextSibling;
|
||||
until not Assigned(ActionNode);
|
||||
|
||||
//message
|
||||
LogItem.Msg:=ReplaceLineEndings(SubNode.ChildNodes.Item[3].FirstChild.NodeValue, LineEnding);
|
||||
|
||||
LogList.Add(LogItem);
|
||||
|
||||
Node := Node.NextSibling;
|
||||
until not Assigned(Node);
|
||||
end;
|
||||
UpdateLogListView;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I svnlogform.lrs}
|
||||
|
||||
end.
|
||||
|
232
components/lazsvnpkg/svnsettingsform.lfm
Normal file
232
components/lazsvnpkg/svnsettingsform.lfm
Normal file
@ -0,0 +1,232 @@
|
||||
object SVNSettingsFrm: TSVNSettingsFrm
|
||||
Left = 290
|
||||
Height = 369
|
||||
Top = 175
|
||||
Width = 639
|
||||
HelpContext = 0
|
||||
ActiveControl = ProjectsListView
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'SVNSettingsFrm'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 369
|
||||
ClientWidth = 639
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poDesigned
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 48
|
||||
Top = 321
|
||||
Width = 627
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 0
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
object EditButton: TBitBtn
|
||||
Left = 78
|
||||
Height = 34
|
||||
Top = 8
|
||||
Width = 98
|
||||
HelpContext = 0
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Cancel = False
|
||||
Caption = 'EditButton'
|
||||
Default = False
|
||||
Enabled = True
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001340
|
||||
58FF15425EFF25699CFF2C76B4FF3B8BBAADFFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001242
|
||||
59FF5D9CD4FFA6CFF5FFA9CFECFF488BC1FF2C76B4FFFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001E6D
|
||||
93FFCBE3F9FF61AAECFF4098E8FF1567C2FF1660AAFF2C76B4FFFFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF001E6D
|
||||
93FFC8E1F2FFD1E7FAFF347DB5FF3199C3FF6DC4DCFF4A9CCFFF3483C7FFFFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF002063
|
||||
98202689B9FFB0CBE1FF67A9C8FF60DCF5FF44D6F4FF8EEEFAFF5DB4E6FF3B8F
|
||||
D9FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF002689B9FFBEE6F2FFB3F4FCFF60DCF5FF44D6F4FF8EEEFAFF5DB4
|
||||
E6FF3B8FD9FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF002790BFFFC3EDF8FFB3F4FCFF60DCF5FF44D6F4FF8EEE
|
||||
FAFF5DB4E6FF3B8FD9FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF002FBAE4FFC3EDF8FFB3F4FCFF60DCF5FF44D6
|
||||
F4FF8EEEFAFF5DB4E6FF3B8FD9FFFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF002FBAE4FFC3EDF8FFB3F4FCFF60DC
|
||||
F5FF44D6F4FF8EEEFAFF5DB4E6FF3B8FD9FFFFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF002FBAE4FFC3EDF8FFB3F4
|
||||
FCFF68D9F5FF6FCFF3FF599DD0FF73ABDDFF4F91C9FFFFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF002FBAE4FFC3ED
|
||||
F8FFA8E2F8FF6CAEDDFFA5CFF4FFA5CFF4FFBDDBF7FF5393CBF7FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF002FBA
|
||||
E4FFA7D4F4FFC5E1F8FFCCE3F9FFCCE3F9FFBDDBF7FF4F90C9FDFFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF0050A8D9FF6AA5D8FFC9E1F7FFCBE3F8FF4295CAFF3182C2AEFFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF002FBAE4094FAADBEA5093CAFD4E90C8FF2F9DD2DF35A4DE19FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
Kind = bkCustom
|
||||
Layout = blGlyphLeft
|
||||
Margin = -1
|
||||
ModalResult = 0
|
||||
NumGlyphs = 0
|
||||
OnClick = EditButtonClick
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
Spacing = 3
|
||||
TabOrder = 4
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object DeleteButton: TBitBtn
|
||||
Left = 182
|
||||
Height = 34
|
||||
Top = 8
|
||||
Width = 116
|
||||
HelpContext = 0
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Cancel = False
|
||||
Caption = 'DeleteButton'
|
||||
Default = False
|
||||
Enabled = True
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000004900
|
||||
0000A81D6B00D071DD00BABDB600BABDB600BABDB600BABDB600BABDB600BABD
|
||||
B600BABDB600BABDB60000000000000000000000000000000000F2DECA008989
|
||||
89FF898989FFF2DECA00898989FF898989FFF2DECA00898989FF898989FFF2DF
|
||||
CC00898989FF898989FFF2DFCC00898989FF898989FFF2DFCC001313FFFF0809
|
||||
FFFF0303FFFFF0DCC700F0DCC700F0DCC700F0DCC700F0DCC700F1DDC800F1DD
|
||||
C800F1DDC800F1DDC800F1DDC8007A7BFFFF898989FFF1DDC8001413FFFF0809
|
||||
FFFF0302FFFF0D0EFFFFEFD9C400EFD9C400EFD9C400EFD9C400F0DAC500F0DA
|
||||
C500F0DAC500F0DAC5006F70FFFF7A7AFFFFF0DAC500F0DAC5001414FFFF0909
|
||||
FFFF0202FFFF0E0DFFFFEED7C000EED7C000EED7C000EED7C000EFD8C200EFD8
|
||||
C200EFD8C2006464FFFF6F70FFFF7B7BFFFF898989FFEFD8C200EDD5BD000909
|
||||
FFFF0202FFFF0D0DFFFF1818FFFFEDD5BD00EDD5BD00EDD5BD00EDD6BF00EDD6
|
||||
BF00EDD6BF006465FFFF6F6FFFFFEDD6BF00898989FFEDD6BF00ECD2BA008989
|
||||
89FF0202FFFF0D0DFFFF1817FFFF2223FFFFECD2BA00ECD2BA00ECD4BC00ECD4
|
||||
BC005A5AFFFF6464FFFF6F70FFFFECD4BC00ECD4BC00ECD4BC00EAD0B7008989
|
||||
89FFEAD0B7000D0DFFFF1817FFFF2223FFFF2E2EFFFFEAD0B700EBD1B8004E4F
|
||||
FFFF595AFFFF6464FFFFEBD1B800EBD1B800898989FFEBD1B800F3E0CD00F3E0
|
||||
CD00F3E0CD00F3E0CD001717FFFF2222FFFF2D2DFFFF3938FFFF4343FFFF4E4E
|
||||
FFFF5959FFFFEACFB500EACFB500EACFB500898989FFEACFB500F4E2D1008989
|
||||
89FFF4E2D100F4E2D100F4E2D1002222FFFF2D2EFFFF3838FFFF4343FFFF4E4D
|
||||
FFFFF3E1CF00F3E1CF00F3E1CF00F3E1CF00F3E1CF00F3E1CF00F5E5D4008989
|
||||
89FFF5E5D400F5E5D400F5E5D4002222FFFF2D2DFFFF3738FFFF4242FFFF4E4E
|
||||
FFFFF4E3D300F4E3D300F4E3D300F4E3D300898989FFF4E3D300F6E7D800F6E7
|
||||
D800F6E7D8000C0CFFFF1717FFFF2222FFFF2C2DFFFF3737FFFF4343FFFF4E4D
|
||||
FFFF5859FFFFF5E6D600F5E6D600F5E6D600898989FFF5E6D600F6E9DB000B0A
|
||||
FFFF0101FFFF0B0BFFFF1617FFFF2222FFFF2C2DFFFFF6E9DB00F6E8DA00F6E8
|
||||
DA005858FFFF6363FFFF6E6EFFFFF6E8DA00F6E8DA00F6E8DA001616FFFF0A0B
|
||||
FFFF0000FFFF0B0BFFFF1616FFFFF7EBDF00F7EBDF00F7EBDF00F7EADD00F7EA
|
||||
DD00F7EADD00F7EADD006E6EFFFF7979FFFF8384FFFF7878FFFF1615FFFF0A0A
|
||||
FFFF0000FFFFF8EEE200898989FF898989FFF8EEE200898989FF898989FFF8ED
|
||||
E100898989FF898989FFF8EDE100898989FF898989FFF8EDE100F9F0E600F9F0
|
||||
E600F9F0E600F9F0E600F9F0E600F9F0E600F9F0E600F9F0E600F9EFE400F9EF
|
||||
E400F9EFE400F9EFE400F9EFE400F9EFE400F9EFE400F9EFE400
|
||||
}
|
||||
Kind = bkCustom
|
||||
Layout = blGlyphLeft
|
||||
Margin = -1
|
||||
ModalResult = 0
|
||||
NumGlyphs = 0
|
||||
OnClick = DeleteButtonClick
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
Spacing = 3
|
||||
TabOrder = 5
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
end
|
||||
object ProjectsListView: TListView
|
||||
Left = 6
|
||||
Height = 309
|
||||
Top = 6
|
||||
Width = 627
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BorderWidth = 0
|
||||
Checkboxes = True
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
Width = 559
|
||||
end>
|
||||
ColumnClick = True
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
HideSelection = True
|
||||
MultiSelect = False
|
||||
ParentShowHint = True
|
||||
ReadOnly = False
|
||||
RowSelect = True
|
||||
ScrollBars = ssBoth
|
||||
ShowColumnHeaders = True
|
||||
SortColumn = 0
|
||||
SortType = stNone
|
||||
TabStop = True
|
||||
TabOrder = 1
|
||||
ToolTips = True
|
||||
Visible = True
|
||||
ViewStyle = vsReport
|
||||
end
|
||||
end
|
150
components/lazsvnpkg/svnsettingsform.lrs
Normal file
150
components/lazsvnpkg/svnsettingsform.lrs
Normal file
@ -0,0 +1,150 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSVNSettingsFrm','FORMDATA',[
|
||||
'TPF0'#15'TSVNSettingsFrm'#14'SVNSettingsFrm'#4'Left'#3'"'#1#6'Height'#3'q'#1
|
||||
+#3'Top'#3#175#0#5'Width'#3''#2#11'HelpContext'#2#0#13'ActiveControl'#7#16'P'
|
||||
+'rojectsListView'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9
|
||||
+#8'AutoSize'#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaxim'
|
||||
+'ize'#0#11'BorderStyle'#7#10'bsSizeable'#7'Caption'#6#14'SVNSettingsFrm'#28
|
||||
+'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'C'
|
||||
+'hildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'Ch'
|
||||
+'ildSizing.ControlsPerLine'#2#0#12'ClientHeight'#3'q'#1#11'ClientWidth'#3''
|
||||
+#2#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'
|
||||
+#9#11'Font.Height'#2#0#10'Font.Style'#11#0#9'FormStyle'#7#8'fsNormal'#8'OnCr'
|
||||
+'eate'#7#10'FormCreate'#6'OnShow'#7#8'FormShow'#14'ParentBiDiMode'#9#10'Pare'
|
||||
+'ntFont'#8#8'Position'#7#10'poDesigned'#13'ShowInTaskBar'#7#9'stDefault'#14
|
||||
+'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0
|
||||
+#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6'Height'#2'0'#3'Top'#3'A'#1#5
|
||||
+'Width'#3's'#2#11'HelpContext'#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#11'B'
|
||||
+'uttonOrder'#7#9'boDefault'#8'TabOrder'#2#0#13'DefaultButton'#7#4'pbOK'#11'S'
|
||||
+'howButtons'#11#4'pbOK'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClose'#6
|
||||
+'pbHelp'#0#7'Visible'#9#0#7'TBitBtn'#10'EditButton'#4'Left'#2'N'#6'Height'#2
|
||||
+'"'#3'Top'#2#8#5'Width'#2'b'#11'HelpContext'#2#0#5'Align'#7#6'alLeft'#8'Auto'
|
||||
+'Size'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpaci'
|
||||
+'ng.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!Bo'
|
||||
+'rderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVer'
|
||||
+'tical'#7#7'ccaFill'#6'Cancel'#8#7'Caption'#6#10'EditButton'#7'Default'#8#7
|
||||
+'Enabled'#9#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0
|
||||
+'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0
|
||||
+#0#0#0#0#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
|
||||
+#255#255#0#255#255#255#0#19'@X'#255#21'B^'#255'%i'#156#255',v'#180#255';'#139
|
||||
+#186#173#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
|
||||
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
|
||||
+#255#255#0#18'BY'#255']'#156#212#255#166#207#245#255#169#207#236#255'H'#139
|
||||
+#193#255',v'#180#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
|
||||
+#255#255#0#30'm'#147#255#203#227#249#255'a'#170#236#255'@'#152#232#255#21'g'
|
||||
+#194#255#22'`'#170#255',v'#180#255#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
|
||||
+#255#255#0#30'm'#147#255#200#225#242#255#209#231#250#255'4}'#181#255'1'#153
|
||||
+#195#255'm'#196#220#255'J'#156#207#255'4'#131#199#255#255#255#255#0#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0' c'#152' &'#137#185#255#176#203#225#255'g'#169#200#255'`'#220
|
||||
+#245#255'D'#214#244#255#142#238#250#255']'#180#230#255';'#143#217#255#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0#255#255#255#0#255#255#255#0'&'#137#185#255#190#230#242#255#179
|
||||
+#244#252#255'`'#220#245#255'D'#214#244#255#142#238#250#255']'#180#230#255';'
|
||||
+#143#217#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0''''#144#191
|
||||
+#255#195#237#248#255#179#244#252#255'`'#220#245#255'D'#214#244#255#142#238
|
||||
+#250#255']'#180#230#255';'#143#217#255#255#255#255#0#255#255#255#0#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0'/'#186#228#255#195#237#248#255#179#244#252#255'`'#220#245#255
|
||||
+'D'#214#244#255#142#238#250#255']'#180#230#255';'#143#217#255#255#255#255#0
|
||||
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
|
||||
+#255#255#0#255#255#255#0#255#255#255#0'/'#186#228#255#195#237#248#255#179#244
|
||||
+#252#255'`'#220#245#255'D'#214#244#255#142#238#250#255']'#180#230#255';'#143
|
||||
+#217#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255
|
||||
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'/'#186#228#255#195
|
||||
+#237#248#255#179#244#252#255'h'#217#245#255'o'#207#243#255'Y'#157#208#255's'
|
||||
+#171#221#255'O'#145#201#255#255#255#255#0#255#255#255#0#255#255#255#0#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+'/'#186#228#255#195#237#248#255#168#226#248#255'l'#174#221#255#165#207#244
|
||||
+#255#165#207#244#255#189#219#247#255'S'#147#203#247#255#255#255#0#255#255#255
|
||||
+#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
|
||||
+#255#255#0#255#255#255#0'/'#186#228#255#167#212#244#255#197#225#248#255#204
|
||||
,#227#249#255#204#227#249#255#189#219#247#255'O'#144#201#253#255#255#255#0#255
|
||||
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0'P'#168#217#255'j'#165#216
|
||||
+#255#201#225#247#255#203#227#248#255'B'#149#202#255'1'#130#194#174#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0'/'#186#228#9'O'#170
|
||||
+#219#234'P'#147#202#253'N'#144#200#255'/'#157#210#223'5'#164#222#25#255#255
|
||||
+#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0
|
||||
+#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255
|
||||
+#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#255#255#255#0#4'Kind'#7
|
||||
+#8'bkCustom'#6'Layout'#7#11'blGlyphLeft'#6'Margin'#2#255#11'ModalResult'#2#0
|
||||
+#9'NumGlyphs'#2#0#7'OnClick'#7#15'EditButtonClick'#10'ParentFont'#9#14'Paren'
|
||||
+'tShowHint'#9#7'Spacing'#2#3#8'TabOrder'#2#4#7'TabStop'#9#7'Visible'#9#0#0#7
|
||||
+'TBitBtn'#12'DeleteButton'#4'Left'#3#182#0#6'Height'#2'"'#3'Top'#2#8#5'Width'
|
||||
+#2't'#11'HelpContext'#2#0#5'Align'#7#6'alLeft'#8'AutoSize'#9#18'BorderSpacin'
|
||||
+'g.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'Border'
|
||||
+'Spacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHo'
|
||||
+'rizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#6'C'
|
||||
+'ancel'#8#7'Caption'#6#12'DeleteButton'#7'Default'#8#7'Enabled'#9#10'Glyph.D'
|
||||
+'ata'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0
|
||||
+#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0'I'#0
|
||||
+#0#0#168#29'k'#0#208'q'#221#0#186#189#182#0#186#189#182#0#186#189#182#0#186
|
||||
+#189#182#0#186#189#182#0#186#189#182#0#186#189#182#0#186#189#182#0#0#0#0#0#0
|
||||
+#0#0#0#0#0#0#0#0#0#0#0#242#222#202#0#137#137#137#255#137#137#137#255#242#222
|
||||
+#202#0#137#137#137#255#137#137#137#255#242#222#202#0#137#137#137#255#137#137
|
||||
+#137#255#242#223#204#0#137#137#137#255#137#137#137#255#242#223#204#0#137#137
|
||||
+#137#255#137#137#137#255#242#223#204#0#19#19#255#255#8#9#255#255#3#3#255#255
|
||||
+#240#220#199#0#240#220#199#0#240#220#199#0#240#220#199#0#240#220#199#0#241
|
||||
+#221#200#0#241#221#200#0#241#221#200#0#241#221#200#0#241#221#200#0'z{'#255
|
||||
+#255#137#137#137#255#241#221#200#0#20#19#255#255#8#9#255#255#3#2#255#255#13
|
||||
+#14#255#255#239#217#196#0#239#217#196#0#239#217#196#0#239#217#196#0#240#218
|
||||
+#197#0#240#218#197#0#240#218#197#0#240#218#197#0'op'#255#255'zz'#255#255#240
|
||||
+#218#197#0#240#218#197#0#20#20#255#255#9#9#255#255#2#2#255#255#14#13#255#255
|
||||
+#238#215#192#0#238#215#192#0#238#215#192#0#238#215#192#0#239#216#194#0#239
|
||||
+#216#194#0#239#216#194#0'dd'#255#255'op'#255#255'{{'#255#255#137#137#137#255
|
||||
+#239#216#194#0#237#213#189#0#9#9#255#255#2#2#255#255#13#13#255#255#24#24#255
|
||||
+#255#237#213#189#0#237#213#189#0#237#213#189#0#237#214#191#0#237#214#191#0
|
||||
+#237#214#191#0'de'#255#255'oo'#255#255#237#214#191#0#137#137#137#255#237#214
|
||||
+#191#0#236#210#186#0#137#137#137#255#2#2#255#255#13#13#255#255#24#23#255#255
|
||||
+'"#'#255#255#236#210#186#0#236#210#186#0#236#212#188#0#236#212#188#0'ZZ'#255
|
||||
+#255'dd'#255#255'op'#255#255#236#212#188#0#236#212#188#0#236#212#188#0#234
|
||||
+#208#183#0#137#137#137#255#234#208#183#0#13#13#255#255#24#23#255#255'"#'#255
|
||||
+#255'..'#255#255#234#208#183#0#235#209#184#0'NO'#255#255'YZ'#255#255'dd'#255
|
||||
+#255#235#209#184#0#235#209#184#0#137#137#137#255#235#209#184#0#243#224#205#0
|
||||
+#243#224#205#0#243#224#205#0#243#224#205#0#23#23#255#255'""'#255#255'--'#255
|
||||
+#255'98'#255#255'CC'#255#255'NN'#255#255'YY'#255#255#234#207#181#0#234#207
|
||||
+#181#0#234#207#181#0#137#137#137#255#234#207#181#0#244#226#209#0#137#137#137
|
||||
+#255#244#226#209#0#244#226#209#0#244#226#209#0'""'#255#255'-.'#255#255'88'
|
||||
+#255#255'CC'#255#255'NM'#255#255#243#225#207#0#243#225#207#0#243#225#207#0
|
||||
+#243#225#207#0#243#225#207#0#243#225#207#0#245#229#212#0#137#137#137#255#245
|
||||
+#229#212#0#245#229#212#0#245#229#212#0'""'#255#255'--'#255#255'78'#255#255'B'
|
||||
+'B'#255#255'NN'#255#255#244#227#211#0#244#227#211#0#244#227#211#0#244#227#211
|
||||
+#0#137#137#137#255#244#227#211#0#246#231#216#0#246#231#216#0#246#231#216#0#12
|
||||
+#12#255#255#23#23#255#255'""'#255#255',-'#255#255'77'#255#255'CC'#255#255'NM'
|
||||
+#255#255'XY'#255#255#245#230#214#0#245#230#214#0#245#230#214#0#137#137#137
|
||||
+#255#245#230#214#0#246#233#219#0#11#10#255#255#1#1#255#255#11#11#255#255#22
|
||||
+#23#255#255'""'#255#255',-'#255#255#246#233#219#0#246#232#218#0#246#232#218#0
|
||||
+'XX'#255#255'cc'#255#255'nn'#255#255#246#232#218#0#246#232#218#0#246#232#218
|
||||
+#0#22#22#255#255#10#11#255#255#0#0#255#255#11#11#255#255#22#22#255#255#247
|
||||
+#235#223#0#247#235#223#0#247#235#223#0#247#234#221#0#247#234#221#0#247#234
|
||||
+#221#0#247#234#221#0'nn'#255#255'yy'#255#255#131#132#255#255'xx'#255#255#22
|
||||
+#21#255#255#10#10#255#255#0#0#255#255#248#238#226#0#137#137#137#255#137#137
|
||||
+#137#255#248#238#226#0#137#137#137#255#137#137#137#255#248#237#225#0#137#137
|
||||
+#137#255#137#137#137#255#248#237#225#0#137#137#137#255#137#137#137#255#248
|
||||
,#237#225#0#249#240#230#0#249#240#230#0#249#240#230#0#249#240#230#0#249#240
|
||||
+#230#0#249#240#230#0#249#240#230#0#249#240#230#0#249#239#228#0#249#239#228#0
|
||||
+#249#239#228#0#249#239#228#0#249#239#228#0#249#239#228#0#249#239#228#0#249
|
||||
+#239#228#0#4'Kind'#7#8'bkCustom'#6'Layout'#7#11'blGlyphLeft'#6'Margin'#2#255
|
||||
+#11'ModalResult'#2#0#9'NumGlyphs'#2#0#7'OnClick'#7#17'DeleteButtonClick'#10
|
||||
+'ParentFont'#9#14'ParentShowHint'#9#7'Spacing'#2#3#8'TabOrder'#2#5#7'TabStop'
|
||||
+#9#7'Visible'#9#0#0#0#9'TListView'#16'ProjectsListView'#4'Left'#2#6#6'Height'
|
||||
+#3'5'#1#3'Top'#2#6#5'Width'#3's'#2#11'HelpContext'#2#0#5'Align'#7#8'alClient'
|
||||
+#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'
|
||||
+#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Around'#2#6'!BorderSpacin'
|
||||
+'g.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7
|
||||
+'ccaFill'#11'BorderWidth'#2#0#10'Checkboxes'#9#7'Columns'#14#1#8'AutoSize'#8
|
||||
+#0#1#8'AutoSize'#8#5'Width'#3'/'#2#0#0#11'ColumnClick'#9#10'DragCursor'#7#6
|
||||
+'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#13'HideSelection'#9#11'Multi'
|
||||
+'Select'#8#14'ParentShowHint'#9#8'ReadOnly'#8#9'RowSelect'#9#10'ScrollBars'#7
|
||||
+#6'ssBoth'#17'ShowColumnHeaders'#9#10'SortColumn'#2#0#8'SortType'#7#6'stNone'
|
||||
+#7'TabStop'#9#8'TabOrder'#2#1#8'ToolTips'#9#7'Visible'#9#9'ViewStyle'#7#8'vs'
|
||||
+'Report'#0#0#0
|
||||
]);
|
124
components/lazsvnpkg/svnsettingsform.pas
Normal file
124
components/lazsvnpkg/svnsettingsform.pas
Normal file
@ -0,0 +1,124 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit SVNSettingsForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ButtonPanel, ComCtrls, SVNClasses, LCLProc, Buttons, SVNAddProjectForm;
|
||||
|
||||
type
|
||||
{ TSVNSettingsFrm }
|
||||
|
||||
TSVNSettingsFrm = class(TForm)
|
||||
DeleteButton: TBitBtn;
|
||||
EditButton: TBitBtn;
|
||||
ButtonPanel: TButtonPanel;
|
||||
ProjectsListView: TListView;
|
||||
procedure DeleteButtonClick(Sender: TObject);
|
||||
procedure EditButtonClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
procedure UpdateProjectListView;
|
||||
end;
|
||||
|
||||
procedure ShowSVNSettingsFrm;
|
||||
|
||||
var
|
||||
SVNSettingsFrm: TSVNSettingsFrm;
|
||||
|
||||
implementation
|
||||
|
||||
procedure ShowSVNSettingsFrm;
|
||||
begin
|
||||
SVNSettingsFrm.ShowModal;
|
||||
end;
|
||||
|
||||
{ TSVNSettingsFrm }
|
||||
|
||||
procedure TSVNSettingsFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
UpdateProjectListView;
|
||||
end;
|
||||
|
||||
procedure TSVNSettingsFrm.UpdateProjectListView;
|
||||
var
|
||||
count: integer;
|
||||
i: integer;
|
||||
begin
|
||||
ProjectsListView.Clear;
|
||||
|
||||
count := SVNSettings.ProjectCount;
|
||||
|
||||
for i := 0 to Count - 1 do
|
||||
with ProjectsListView.Items.Add do
|
||||
begin
|
||||
Caption := SVNSettings.Path[i];
|
||||
Checked := SVNSettings.Active[i];
|
||||
SubItems.Add(SVNSettings.Repository[i]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSVNSettingsFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SetColumn(ProjectsListView, 0, 250, rsProjectName);
|
||||
SetColumn(ProjectsListView, 1, 250, rsRepositoryPath);
|
||||
|
||||
EditButton.Caption := rsEdit;
|
||||
DeleteButton.Caption := rsDelete;
|
||||
end;
|
||||
|
||||
procedure TSVNSettingsFrm.EditButtonClick(Sender: TObject);
|
||||
var
|
||||
AProject: string;
|
||||
ARepository: string;
|
||||
AChecked: boolean;
|
||||
begin
|
||||
if Assigned(ProjectsListView.Selected) then
|
||||
begin
|
||||
AProject:=ProjectsListView.Selected.Caption;
|
||||
ARepository:=ProjectsListView.Selected.SubItems[0];
|
||||
AChecked:=ProjectsListView.Selected.Checked;
|
||||
|
||||
if ShowSVNAddProjectFrm(AProject, ARepository, AChecked) = mrOK then
|
||||
UpdateProjectListView;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSVNSettingsFrm.DeleteButtonClick(Sender: TObject);
|
||||
begin
|
||||
if Assigned(ProjectsListView.Selected) then
|
||||
begin
|
||||
SVNSettings.DeleteProjectByIndex(ProjectsListView.Selected.Index);
|
||||
UpdateProjectListView;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I svnsettingsform.lrs}
|
||||
|
||||
end.
|
||||
|
184
components/lazsvnpkg/svnstatusform.lfm
Normal file
184
components/lazsvnpkg/svnstatusform.lfm
Normal file
@ -0,0 +1,184 @@
|
||||
object SVNStatusFrm: TSVNStatusFrm
|
||||
Left = 150
|
||||
Height = 408
|
||||
Top = 200
|
||||
Width = 738
|
||||
HelpContext = 0
|
||||
ActiveControl = SVNFileListView
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'SVNStatusFrm'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 408
|
||||
ClientWidth = 738
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poScreenCenter
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object SVNFileListView: TListView
|
||||
Left = 6
|
||||
Height = 274
|
||||
Top = 88
|
||||
Width = 726
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BorderWidth = 0
|
||||
Checkboxes = True
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
Width = 329
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
Width = 179
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
end>
|
||||
ColumnClick = True
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
HideSelection = True
|
||||
MultiSelect = False
|
||||
ParentShowHint = True
|
||||
PopupMenu = PopupMenu1
|
||||
ReadOnly = False
|
||||
RowSelect = True
|
||||
ScrollBars = ssBoth
|
||||
ShowColumnHeaders = True
|
||||
SortColumn = 1
|
||||
SortType = stText
|
||||
TabStop = True
|
||||
TabOrder = 0
|
||||
ToolTips = True
|
||||
Visible = True
|
||||
ViewStyle = vsReport
|
||||
OnColumnClick = SVNFileListViewColumnClick
|
||||
OnSelectItem = SVNFileListViewSelectItem
|
||||
end
|
||||
object SVNCommitMsgMemo: TMemo
|
||||
Left = 6
|
||||
Height = 77
|
||||
Top = 6
|
||||
Width = 726
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
Alignment = taLeftJustify
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 0
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
Font.Style = []
|
||||
MaxLength = -1
|
||||
ParentBidiMode = True
|
||||
ParentFont = False
|
||||
ReadOnly = False
|
||||
ScrollBars = ssNone
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
Visible = True
|
||||
WantReturns = True
|
||||
WantTabs = False
|
||||
end
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 40
|
||||
Top = 368
|
||||
Width = 726
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 2
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
end
|
||||
object Splitter: TSplitter
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 83
|
||||
Width = 738
|
||||
HelpContext = 0
|
||||
Align = alTop
|
||||
AutoSnap = True
|
||||
Beveled = False
|
||||
MinSize = 30
|
||||
ParentColor = True
|
||||
ParentShowHint = True
|
||||
ResizeAnchor = akTop
|
||||
ResizeStyle = rsUpdate
|
||||
Visible = True
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
left = 53
|
||||
top = 213
|
||||
object mnuShowDiff: TMenuItem
|
||||
Caption = 'New Item1'
|
||||
RightJustify = False
|
||||
ShowAlwaysCheckable = False
|
||||
OnClick = mnuShowDiffClick
|
||||
end
|
||||
end
|
||||
end
|
54
components/lazsvnpkg/svnstatusform.lrs
Normal file
54
components/lazsvnpkg/svnstatusform.lrs
Normal file
@ -0,0 +1,54 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSVNStatusFrm','FORMDATA',[
|
||||
'TPF0'#13'TSVNStatusFrm'#12'SVNStatusFrm'#4'Left'#3#150#0#6'Height'#3#152#1#3
|
||||
+'Top'#3#200#0#5'Width'#3#226#2#11'HelpContext'#2#0#13'ActiveControl'#7#15'SV'
|
||||
+'NFileListView'#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8
|
||||
+'AutoSize'#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaximiz'
|
||||
+'e'#0#11'BorderStyle'#7#10'bsSizeable'#7'Caption'#6#12'SVNStatusFrm'#28'Chil'
|
||||
+'dSizing.LeftRightSpacing'#2#0#28'ChildSizing.TopBottomSpacing'#2#0#29'Child'
|
||||
+'Sizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#27'ChildS'
|
||||
+'izing.ControlsPerLine'#2#0#12'ClientHeight'#3#152#1#11'ClientWidth'#3#226#2
|
||||
+#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9
|
||||
+#11'Font.Height'#2#0#10'Font.Style'#11#0#9'FormStyle'#7#8'fsNormal'#8'OnCrea'
|
||||
+'te'#7#10'FormCreate'#6'OnShow'#7#8'FormShow'#14'ParentBiDiMode'#9#10'Parent'
|
||||
+'Font'#8#8'Position'#7#14'poScreenCenter'#13'ShowInTaskBar'#7#9'stDefault'#14
|
||||
+'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowState'#7#8'wsNormal'#0
|
||||
+#9'TListView'#15'SVNFileListView'#4'Left'#2#6#6'Height'#3#18#1#3'Top'#2'X'#5
|
||||
+'Width'#3#214#2#11'HelpContext'#2#0#5'Align'#7#8'alClient'#18'BorderSpacing.'
|
||||
+'Left'#2#6#17'BorderSpacing.Top'#2#0#19'BorderSpacing.Right'#2#6#20'BorderSp'
|
||||
+'acing.Bottom'#2#6#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHori'
|
||||
+'zontal'#7#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#11'Bo'
|
||||
+'rderWidth'#2#0#10'Checkboxes'#9#7'Columns'#14#1#8'AutoSize'#8#0#1#8'AutoSiz'
|
||||
+'e'#8#0#1#8'AutoSize'#8#0#1#8'AutoSize'#8#0#1#8'AutoSize'#8#5'Width'#3'I'#1#0
|
||||
+#1#8'AutoSize'#8#5'Width'#3#179#0#0#1#8'AutoSize'#8#0#1#8'AutoSize'#8#0#1#8
|
||||
+'AutoSize'#8#0#0#11'ColumnClick'#9#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8
|
||||
+'dmManual'#7'Enabled'#9#13'HideSelection'#9#11'MultiSelect'#8#14'ParentShowH'
|
||||
+'int'#9#9'PopupMenu'#7#10'PopupMenu1'#8'ReadOnly'#8#9'RowSelect'#9#10'Scroll'
|
||||
+'Bars'#7#6'ssBoth'#17'ShowColumnHeaders'#9#10'SortColumn'#2#1#8'SortType'#7#6
|
||||
+'stText'#7'TabStop'#9#8'TabOrder'#2#0#8'ToolTips'#9#7'Visible'#9#9'ViewStyle'
|
||||
+#7#8'vsReport'#13'OnColumnClick'#7#26'SVNFileListViewColumnClick'#12'OnSelec'
|
||||
+'tItem'#7#25'SVNFileListViewSelectItem'#0#0#5'TMemo'#16'SVNCommitMsgMemo'#4
|
||||
+'Left'#2#6#6'Height'#2'M'#3'Top'#2#6#5'Width'#3#214#2#11'HelpContext'#2#0#5
|
||||
+'Align'#7#5'alTop'#9'Alignment'#7#13'taLeftJustify'#18'BorderSpacing.Left'#2
|
||||
+#6#17'BorderSpacing.Top'#2#6#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bo'
|
||||
+'ttom'#2#0#20'BorderSpacing.Around'#2#0'!BorderSpacing.CellAlignHorizontal'#7
|
||||
+#7'ccaFill'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#10'DragCursor'#7
|
||||
+#6'crDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#12'Font.CharSet'#7#12'ANSI'
|
||||
+'_CHARSET'#10'Font.Color'#7#7'clBlack'#11'Font.Height'#2#243#9'Font.Name'#6#7
|
||||
+'Courier'#10'Font.Pitch'#7#7'fpFixed'#12'Font.Quality'#7#7'fqDraft'#10'Font.'
|
||||
+'Style'#11#0#9'MaxLength'#2#255#14'ParentBidiMode'#9#10'ParentFont'#8#8'Read'
|
||||
+'Only'#8#10'ScrollBars'#7#6'ssNone'#8'TabOrder'#2#1#7'TabStop'#9#7'Visible'#9
|
||||
+#11'WantReturns'#9#8'WantTabs'#8#0#0#12'TButtonPanel'#11'ButtonPanel'#4'Left'
|
||||
+#2#6#6'Height'#2'('#3'Top'#3'p'#1#5'Width'#3#214#2#11'HelpContext'#2#0#5'Ali'
|
||||
+'gn'#7#8'alBottom'#8'AutoSize'#9#11'ButtonOrder'#7#9'boDefault'#8'TabOrder'#2
|
||||
+#2#13'DefaultButton'#7#4'pbOK'#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#0#10'S'
|
||||
+'howGlyphs'#11#4'pbOK'#8'pbCancel'#7'pbClose'#6'pbHelp'#0#7'Visible'#9#0#0#9
|
||||
+'TSplitter'#8'Splitter'#6'Cursor'#7#8'crVSplit'#4'Left'#2#0#6'Height'#2#5#3
|
||||
+'Top'#2'S'#5'Width'#3#226#2#11'HelpContext'#2#0#5'Align'#7#5'alTop'#8'AutoSn'
|
||||
+'ap'#9#7'Beveled'#8#7'MinSize'#2#30#11'ParentColor'#9#14'ParentShowHint'#9#12
|
||||
+'ResizeAnchor'#7#5'akTop'#11'ResizeStyle'#7#8'rsUpdate'#7'Visible'#9#0#0#10
|
||||
+'TPopupMenu'#10'PopupMenu1'#4'left'#2'5'#3'top'#3#213#0#0#9'TMenuItem'#11'mn'
|
||||
+'uShowDiff'#7'Caption'#6#9'New Item1'#12'RightJustify'#8#19'ShowAlwaysChecka'
|
||||
+'ble'#8#7'OnClick'#7#16'mnuShowDiffClick'#0#0#0#0
|
||||
]);
|
227
components/lazsvnpkg/svnstatusform.pas
Normal file
227
components/lazsvnpkg/svnstatusform.pas
Normal file
@ -0,0 +1,227 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit SVNStatusForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ComCtrls, StdCtrls, ButtonPanel, ExtCtrls, LCLProc,
|
||||
SVNClasses, Menus;
|
||||
|
||||
type
|
||||
{ TSVNStatusFrm }
|
||||
|
||||
TSVNStatusFrm = class(TForm)
|
||||
ButtonPanel: TButtonPanel;
|
||||
mnuShowDiff: TMenuItem;
|
||||
PopupMenu1: TPopupMenu;
|
||||
Splitter: TSplitter;
|
||||
SVNCommitMsgMemo: TMemo;
|
||||
SVNFileListView: TListView;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure mnuShowDiffClick(Sender: TObject);
|
||||
procedure OKButtonClick(Sender: TObject);
|
||||
procedure SVNFileListViewColumnClick(Sender: TObject; Column: TListColumn);
|
||||
procedure SVNFileListViewSelectItem(Sender: TObject; Item: TListItem;
|
||||
Selected: Boolean);
|
||||
private
|
||||
{ private declarations }
|
||||
FRepoPath: string;
|
||||
SVNStatus: TSVNStatus;
|
||||
procedure UpdateFilesListView;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
procedure ShowSVNStatusFrm(ARepoPath: string);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SVNDiffForm, SVNCommitForm;
|
||||
|
||||
procedure ShowSVNStatusFrm(ARepoPath: string);
|
||||
var
|
||||
SVNStatusFrm: TSVNStatusFrm;
|
||||
begin
|
||||
SVNStatusFrm := TSVNStatusFrm.Create(nil);
|
||||
|
||||
SVNStatusFrm.FRepoPath:=ARepoPath;
|
||||
SVNStatusFrm.ShowModal;
|
||||
|
||||
SVNStatusFrm.Free;
|
||||
end;
|
||||
|
||||
{ TSVNStatusFrm }
|
||||
|
||||
procedure TSVNStatusFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
SVNStatus := TSVNStatus.Create(FRepoPath);
|
||||
SVNStatus.Sort(siChecked, sdAscending);
|
||||
|
||||
Caption := Format('%s - %s...', [FRepoPath, rsLazarusSVNCommit]);
|
||||
UpdateFilesListView;
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.mnuShowDiffClick(Sender: TObject);
|
||||
begin
|
||||
{$note implement opening file in source editor}
|
||||
if Assigned(SVNFileListView.Selected) then
|
||||
begin
|
||||
debugln('TSVNStatusFrm.mnuShowDiffClick Path=' ,SVNFileListView.Selected.SubItems[0]);
|
||||
|
||||
if pos(FRepoPath,SVNFileListView.Selected.SubItems[0]) <> 0 then
|
||||
ShowSVNDiffFrm('-r HEAD', SVNFileListView.Selected.SubItems[0])
|
||||
else
|
||||
ShowSVNDiffFrm('-r HEAD', AppendPathDelim(FRepoPath) + SVNFileListView.Selected.SubItems[0]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.OKButtonClick(Sender: TObject);
|
||||
var
|
||||
i: integer;
|
||||
CmdLine: string;
|
||||
StatusItem : PSVNStatusItem;
|
||||
begin
|
||||
//commit the checked files
|
||||
CmdLine := SVNExecutable + ' commit';
|
||||
|
||||
for i := 0 to SVNStatus.List.Count - 1 do
|
||||
begin
|
||||
StatusItem := PSVNStatusItem(SVNStatus.List.Items[i]);
|
||||
|
||||
if StatusItem^.Checked then
|
||||
if pos(FRepoPath,StatusItem^.Path) = 0 then
|
||||
CmdLine := CmdLine + ' ' + AppendPathDelim(FRepoPath) + StatusItem^.Path
|
||||
else
|
||||
CmdLine := CmdLine + ' ' + StatusItem^.Path;
|
||||
end;
|
||||
|
||||
CmdLine := CmdLine + ' -m"' + SVNCommitMsgMemo.Text + '"';
|
||||
|
||||
ShowSVNCommitFrm(CmdLine);
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.SVNFileListViewColumnClick(Sender: TObject;
|
||||
Column: TListColumn);
|
||||
begin
|
||||
case Column.Index of
|
||||
0: SVNStatus.ReverseSort(siChecked);
|
||||
1: SVNStatus.ReverseSort(siPath);
|
||||
2: SVNStatus.ReverseSort(siExtension);
|
||||
3: SVNStatus.ReverseSort(siItemStatus);
|
||||
4: SVNStatus.ReverseSort(siPropStatus);
|
||||
5: SVNStatus.ReverseSort(siAuthor);
|
||||
6: SVNStatus.ReverseSort(siRevision);
|
||||
7: SVNStatus.ReverseSort(siCommitRevision);
|
||||
8: SVNStatus.ReverseSort(siDate);
|
||||
end;
|
||||
|
||||
UpdateFilesListView;
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.SVNFileListViewSelectItem(Sender: TObject;
|
||||
Item: TListItem; Selected: Boolean);
|
||||
begin
|
||||
PSVNStatusItem(SVNStatus.List.Items[Item.Index])^.Checked:=Item.Checked;
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.UpdateFilesListView;
|
||||
var
|
||||
i: integer;
|
||||
StatusItem : PSVNStatusItem;
|
||||
begin
|
||||
SVNFileListView.BeginUpdate;
|
||||
SVNFileListView.Clear;
|
||||
|
||||
for i := 0 to SVNStatus.List.Count - 1 do
|
||||
begin
|
||||
|
||||
with SVNFileListView.Items.Add do
|
||||
begin
|
||||
StatusItem := PSVNStatusItem(SVNStatus.List.Items[i]);
|
||||
|
||||
//checkboxes
|
||||
Caption := '';
|
||||
Checked := StatusItem^.Checked;
|
||||
|
||||
//path
|
||||
SubItems.Add(StatusItem^.Path);
|
||||
|
||||
//extension
|
||||
SubItems.Add(StatusItem^.Extension);
|
||||
|
||||
//file status
|
||||
SubItems.Add(StatusItem^.ItemStatus);
|
||||
|
||||
//property status
|
||||
SubItems.Add(StatusItem^.PropStatus);
|
||||
|
||||
//check if file is versioned
|
||||
if LowerCase(StatusItem^.ItemStatus) <> 'unversioned' then
|
||||
begin
|
||||
//revision
|
||||
SubItems.Add(IntToStr(StatusItem^.Revision));
|
||||
|
||||
//commit revision
|
||||
SubItems.Add(IntToStr(StatusItem^.CommitRevision));
|
||||
|
||||
//author
|
||||
SubItems.Add(StatusItem^.Author);
|
||||
|
||||
//date
|
||||
SubItems.Add(DateTimeToStr(StatusItem^.Date));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
SVNFileListView.EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
mnuShowDiff.Caption:=rsShowDiff;
|
||||
|
||||
ButtonPanel.OKButton.OnClick:=@OKButtonClick;
|
||||
|
||||
SetColumn(SVNFileListView, 0, 25, '', False);
|
||||
SetColumn(SVNFileListView, 1, 300, rsPath, False);
|
||||
SetColumn(SVNFileListView, 2, 75, rsExtension, True);
|
||||
SetColumn(SVNFileListView, 3, 100, rsFileStatus, True);
|
||||
SetColumn(SVNFileListView, 4, 125, rsPropertyStatus, True);
|
||||
SetColumn(SVNFileListView, 5, 75, rsRevision, True);
|
||||
SetColumn(SVNFileListView, 6, 75, rsCommitRevision, True);
|
||||
SetColumn(SVNFileListView, 7, 75, rsAuthor, True);
|
||||
SetColumn(SVNFileListView, 8, 75, rsDate, True);
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.FormDestroy(Sender: TObject);
|
||||
begin
|
||||
SVNStatus.Free;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I svnstatusform.lrs}
|
||||
|
||||
end.
|
||||
|
175
components/lazsvnpkg/svnupdateform.lfm
Normal file
175
components/lazsvnpkg/svnupdateform.lfm
Normal file
@ -0,0 +1,175 @@
|
||||
object SVNUpdateFrm: TSVNUpdateFrm
|
||||
Left = 286
|
||||
Height = 300
|
||||
Top = 209
|
||||
Width = 640
|
||||
HelpContext = 0
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'SVNUpdateFrm'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 300
|
||||
ClientWidth = 640
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poScreenCenter
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object SVNUpdateListView: TListView
|
||||
Left = 6
|
||||
Height = 248
|
||||
Top = 6
|
||||
Width = 628
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
BorderWidth = 0
|
||||
Checkboxes = False
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = False
|
||||
Width = 75
|
||||
end
|
||||
item
|
||||
AutoSize = False
|
||||
Width = 553
|
||||
end>
|
||||
ColumnClick = True
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
HideSelection = True
|
||||
MultiSelect = False
|
||||
ParentShowHint = True
|
||||
PopupMenu = UpdatePopupMenu
|
||||
ReadOnly = False
|
||||
RowSelect = True
|
||||
ScrollBars = ssAutoBoth
|
||||
ShowColumnHeaders = True
|
||||
SortColumn = 0
|
||||
SortType = stNone
|
||||
TabStop = True
|
||||
TabOrder = 0
|
||||
ToolTips = True
|
||||
Visible = True
|
||||
ViewStyle = vsReport
|
||||
end
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 40
|
||||
Top = 260
|
||||
Width = 628
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 1
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
object ShowLogButton: TBitBtn
|
||||
Left = 78
|
||||
Height = 26
|
||||
Top = 8
|
||||
Width = 120
|
||||
HelpContext = 0
|
||||
Align = alLeft
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Cancel = False
|
||||
Caption = 'ShowLogButton'
|
||||
Default = False
|
||||
Enabled = True
|
||||
Glyph.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
20000000000000040000640000006400000000000000000000000000000080B1
|
||||
64FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A
|
||||
88FF858A88FF858A88FF858A88FF695857FF801960007FAB200000000000858A
|
||||
88FFEEEEEEFFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2
|
||||
B2FFB1B1B1FFB2B2B2FFB2B2B2FF858A88FFDE04CA000B007C0048346B00858A
|
||||
88FFFFFFFFFFECECECFFEBEBEBFFEAEAEAFFEAEAEAFFE9E9E9FFEBEBEBFFEAEA
|
||||
EAFFEBEBEBFFECECECFFB2B2B2FF858A88FF0100CA000000000070030000858A
|
||||
88FFFFFFFFFFDBDBDBFFCBCBCBFFC4C4C4FF000000FF02598FFF636363FF8C8C
|
||||
8CFFCACACAFFDADADAFFB2B2B2FF858A88FFCA00000019000000504B2600858A
|
||||
88FFFFFFFFFFECECECFFECECECFFE9E9E9FF02598FFF26424CFF36576BFF0259
|
||||
8FFF9D9D9DFFD6D6D6FFAEAEAEFF858A88FF09000000F817600000000000858A
|
||||
88FFFFFFFFFFDBDBDBFFCCCCCCFFCBCBCBFF757575FF395B70FF8AABC2FF5585
|
||||
A3FF02598FFF8F8F8FFF868686FF858A88FF401860007BAB200000000000858A
|
||||
88FFFFFFFFFFECECECFFECECECFFECECECFFEBEBEBFF02598FFFC4E5EDFF649F
|
||||
C8FF5787A4FF02598FFF717171FF858A88FFDE04CA000A007C0048346B00858A
|
||||
88FFFFFFFFFFDBDBDBFFCCCCCCFFCCCCCCFFCCCCCCFFB7B7B7FF02598FFFC5E6
|
||||
EDFF68A6CEFF5784A0FF02598FFF858A88FF0300CA000000000030020000858A
|
||||
88FFFFFFFFFFECECECFFECECECFFECECECFFECECECFFECECECFFD3D3D3FF0259
|
||||
8FFFC6EAEEFF69AACFFF5683A0FF02598FFFA3121D0019000000504B2600858A
|
||||
88FFFFFFFFFFDBDBDBFFCCCCCCFFCCCCCCFFCCCCCCFFCCCCCCFFCCCCCCFFB7B7
|
||||
B7FF02598FFFC7EBEFFF6AACD2FF5787A4FF02598FFF93246A0000000000858A
|
||||
88FFFFFFFFFFECECECFFECECECFFECECECFFECECECFFECECECFFECECECFFECEC
|
||||
ECFFD3D3D3FF02598FFFC7EBEFFF6AACD2FF5481A0FF02598FFF00000000858A
|
||||
88FFEBEBEBFF00A0C4FFBCBCBCFF00A0C4FFB8B8B8FF00A0C4FFB8B8B8FF00A0
|
||||
C4FFB8B8B8FF00A0C4FF02598FFFC6EAEEFF71ADCFFF02598FFF48346B00858A
|
||||
88FF00A0C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0C4FF3DB1EBFF00A0C4FF3DB1
|
||||
EBFF00A0C4FF3DB1EBFF00A0C4FF02598FFF02598FFF01203400F00000005737
|
||||
360000A0C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0C4FFC6E8F9FF00A0C4FFC6E8
|
||||
F9FF00A0C4FFC6E8F9FF00A0C4FF00000000CC00000019000000504B2600E0B0
|
||||
4A00A32EC80000A0C4FF002B340000A0C4FF012BC80000A0C4FF002B340000A0
|
||||
C4FF962B340000A0C4FF35518200F815600009000000781560000000000078F6
|
||||
25000100CA00000000000000000000000000CC0000001900000048346B00A815
|
||||
60000900000028156000A000000038000000C015600073AB2000
|
||||
}
|
||||
Kind = bkCustom
|
||||
Layout = blGlyphLeft
|
||||
Margin = -1
|
||||
ModalResult = 0
|
||||
NumGlyphs = 0
|
||||
OnClick = ShowLogButtonClick
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
Spacing = 3
|
||||
TabOrder = 4
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
end
|
||||
object UpdatePopupMenu: TPopupMenu
|
||||
left = 40
|
||||
top = 64
|
||||
object mnuShowDiff: TMenuItem
|
||||
Caption = 'New Item1'
|
||||
RightJustify = False
|
||||
ShowAlwaysCheckable = False
|
||||
OnClick = mnuShowDiffClick
|
||||
end
|
||||
end
|
||||
end
|
93
components/lazsvnpkg/svnupdateform.lrs
Normal file
93
components/lazsvnpkg/svnupdateform.lrs
Normal file
@ -0,0 +1,93 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSVNUpdateFrm','FORMDATA',[
|
||||
'TPF0'#13'TSVNUpdateFrm'#12'SVNUpdateFrm'#4'Left'#3#30#1#6'Height'#3','#1#3'T'
|
||||
+'op'#3#209#0#5'Width'#3#128#2#11'HelpContext'#2#0#5'Align'#7#6'alNone'#14'Al'
|
||||
+'lowDropFiles'#8#10'AutoScroll'#9#8'AutoSize'#8#11'BorderIcons'#11#12'biSyst'
|
||||
+'emMenu'#10'biMinimize'#10'biMaximize'#0#11'BorderStyle'#7#10'bsSizeable'#7
|
||||
+'Caption'#6#12'SVNUpdateFrm'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSi'
|
||||
+'zing.TopBottomSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSi'
|
||||
+'zing.VerticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeig'
|
||||
+'ht'#3','#1#11'ClientWidth'#3#128#2#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8
|
||||
+'DragMode'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'#2#0#10'Font.Style'#11#0
|
||||
+#9'FormStyle'#7#8'fsNormal'#8'OnCreate'#7#10'FormCreate'#6'OnShow'#7#8'FormS'
|
||||
+'how'#14'ParentBiDiMode'#9#10'ParentFont'#8#8'Position'#7#14'poScreenCenter'
|
||||
+#13'ShowInTaskBar'#7#9'stDefault'#14'UseDockManager'#8#10'LCLVersion'#6#6'0.'
|
||||
+'9.27'#11'WindowState'#7#8'wsNormal'#0#9'TListView'#17'SVNUpdateListView'#4
|
||||
+'Left'#2#6#6'Height'#3#248#0#3'Top'#2#6#5'Width'#3't'#2#11'HelpContext'#2#0#5
|
||||
+'Align'#7#8'alClient'#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0#19
|
||||
+'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.Arou'
|
||||
+'nd'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacing.C'
|
||||
+'ellAlignVertical'#7#7'ccaFill'#11'BorderWidth'#2#0#10'Checkboxes'#8#7'Colum'
|
||||
+'ns'#14#1#8'AutoSize'#8#5'Width'#2'K'#0#1#8'AutoSize'#8#5'Width'#3')'#2#0#0
|
||||
+#11'ColumnClick'#9#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'#7'En'
|
||||
+'abled'#9#13'HideSelection'#9#11'MultiSelect'#8#14'ParentShowHint'#9#9'Popup'
|
||||
+'Menu'#7#15'UpdatePopupMenu'#8'ReadOnly'#8#9'RowSelect'#9#10'ScrollBars'#7#10
|
||||
+'ssAutoBoth'#17'ShowColumnHeaders'#9#10'SortColumn'#2#0#8'SortType'#7#6'stNo'
|
||||
+'ne'#7'TabStop'#9#8'TabOrder'#2#0#8'ToolTips'#9#7'Visible'#9#9'ViewStyle'#7#8
|
||||
+'vsReport'#0#0#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6'Height'#2'('#3
|
||||
+'Top'#3#4#1#5'Width'#3't'#2#11'HelpContext'#2#0#5'Align'#7#8'alBottom'#8'Aut'
|
||||
+'oSize'#9#11'ButtonOrder'#7#9'boDefault'#8'TabOrder'#2#1#13'DefaultButton'#7
|
||||
+#4'pbOK'#11'ShowButtons'#11#4'pbOK'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7
|
||||
+'pbClose'#6'pbHelp'#0#7'Visible'#9#0#7'TBitBtn'#13'ShowLogButton'#4'Left'#2
|
||||
+'N'#6'Height'#2#26#3'Top'#2#8#5'Width'#2'x'#11'HelpContext'#2#0#5'Align'#7#6
|
||||
+'alLeft'#8'AutoSize'#9#18'BorderSpacing.Left'#2#0#17'BorderSpacing.Top'#2#0
|
||||
+#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0#20'BorderSpacing.A'
|
||||
+'round'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFill'#31'BorderSpacin'
|
||||
+'g.CellAlignVertical'#7#7'ccaFill'#6'Cancel'#8#7'Caption'#6#13'ShowLogButton'
|
||||
+#7'Default'#8#7'Enabled'#9#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0
|
||||
+#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'
|
||||
+#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#177'd'#255#133#138#136#255#133#138#136#255
|
||||
+#133#138#136#255#133#138#136#255#133#138#136#255#133#138#136#255#133#138#136
|
||||
+#255#133#138#136#255#133#138#136#255#133#138#136#255#133#138#136#255'iXW'#255
|
||||
+#128#25'`'#0''#171' '#0#0#0#0#0#133#138#136#255#238#238#238#255#178#178#178
|
||||
+#255#178#178#178#255#178#178#178#255#178#178#178#255#178#178#178#255#178#178
|
||||
+#178#255#178#178#178#255#177#177#177#255#178#178#178#255#178#178#178#255#133
|
||||
+#138#136#255#222#4#202#0#11#0'|'#0'H4k'#0#133#138#136#255#255#255#255#255#236
|
||||
+#236#236#255#235#235#235#255#234#234#234#255#234#234#234#255#233#233#233#255
|
||||
+#235#235#235#255#234#234#234#255#235#235#235#255#236#236#236#255#178#178#178
|
||||
+#255#133#138#136#255#1#0#202#0#0#0#0#0'p'#3#0#0#133#138#136#255#255#255#255
|
||||
+#255#219#219#219#255#203#203#203#255#196#196#196#255#0#0#0#255#2'Y'#143#255
|
||||
+'ccc'#255#140#140#140#255#202#202#202#255#218#218#218#255#178#178#178#255#133
|
||||
+#138#136#255#202#0#0#0#25#0#0#0'PK&'#0#133#138#136#255#255#255#255#255#236
|
||||
+#236#236#255#236#236#236#255#233#233#233#255#2'Y'#143#255'&BL'#255'6Wk'#255#2
|
||||
+'Y'#143#255#157#157#157#255#214#214#214#255#174#174#174#255#133#138#136#255#9
|
||||
+#0#0#0#248#23'`'#0#0#0#0#0#133#138#136#255#255#255#255#255#219#219#219#255
|
||||
+#204#204#204#255#203#203#203#255'uuu'#255'9[p'#255#138#171#194#255'U'#133#163
|
||||
+#255#2'Y'#143#255#143#143#143#255#134#134#134#255#133#138#136#255'@'#24'`'#0
|
||||
+'{'#171' '#0#0#0#0#0#133#138#136#255#255#255#255#255#236#236#236#255#236#236
|
||||
+#236#255#236#236#236#255#235#235#235#255#2'Y'#143#255#196#229#237#255'd'#159
|
||||
+#200#255'W'#135#164#255#2'Y'#143#255'qqq'#255#133#138#136#255#222#4#202#0#10
|
||||
+#0'|'#0'H4k'#0#133#138#136#255#255#255#255#255#219#219#219#255#204#204#204
|
||||
+#255#204#204#204#255#204#204#204#255#183#183#183#255#2'Y'#143#255#197#230#237
|
||||
+#255'h'#166#206#255'W'#132#160#255#2'Y'#143#255#133#138#136#255#3#0#202#0#0#0
|
||||
+#0#0'0'#2#0#0#133#138#136#255#255#255#255#255#236#236#236#255#236#236#236#255
|
||||
+#236#236#236#255#236#236#236#255#236#236#236#255#211#211#211#255#2'Y'#143#255
|
||||
+#198#234#238#255'i'#170#207#255'V'#131#160#255#2'Y'#143#255#163#18#29#0#25#0
|
||||
+#0#0'PK&'#0#133#138#136#255#255#255#255#255#219#219#219#255#204#204#204#255
|
||||
,#204#204#204#255#204#204#204#255#204#204#204#255#204#204#204#255#183#183#183
|
||||
+#255#2'Y'#143#255#199#235#239#255'j'#172#210#255'W'#135#164#255#2'Y'#143#255
|
||||
+#147'$j'#0#0#0#0#0#133#138#136#255#255#255#255#255#236#236#236#255#236#236
|
||||
+#236#255#236#236#236#255#236#236#236#255#236#236#236#255#236#236#236#255#236
|
||||
+#236#236#255#211#211#211#255#2'Y'#143#255#199#235#239#255'j'#172#210#255'T'
|
||||
+#129#160#255#2'Y'#143#255#0#0#0#0#133#138#136#255#235#235#235#255#0#160#196
|
||||
+#255#188#188#188#255#0#160#196#255#184#184#184#255#0#160#196#255#184#184#184
|
||||
+#255#0#160#196#255#184#184#184#255#0#160#196#255#2'Y'#143#255#198#234#238#255
|
||||
+'q'#173#207#255#2'Y'#143#255'H4k'#0#133#138#136#255#0#160#196#255'='#177#235
|
||||
+#255#0#160#196#255'='#177#235#255#0#160#196#255'='#177#235#255#0#160#196#255
|
||||
+'='#177#235#255#0#160#196#255'='#177#235#255#0#160#196#255#2'Y'#143#255#2'Y'
|
||||
+#143#255#1' 4'#0#240#0#0#0'W76'#0#0#160#196#255#198#232#249#255#0#160#196#255
|
||||
+#198#232#249#255#0#160#196#255#198#232#249#255#0#160#196#255#198#232#249#255
|
||||
+#0#160#196#255#198#232#249#255#0#160#196#255#0#0#0#0#204#0#0#0#25#0#0#0'PK&'
|
||||
+#0#224#176'J'#0#163'.'#200#0#0#160#196#255#0'+4'#0#0#160#196#255#1'+'#200#0#0
|
||||
+#160#196#255#0'+4'#0#0#160#196#255#150'+4'#0#0#160#196#255'5Q'#130#0#248#21
|
||||
+'`'#0#9#0#0#0'x'#21'`'#0#0#0#0#0'x'#246'%'#0#1#0#202#0#0#0#0#0#0#0#0#0#0#0#0
|
||||
+#0#204#0#0#0#25#0#0#0'H4k'#0#168#21'`'#0#9#0#0#0'('#21'`'#0#160#0#0#0'8'#0#0
|
||||
+#0#192#21'`'#0's'#171' '#0#4'Kind'#7#8'bkCustom'#6'Layout'#7#11'blGlyphLeft'
|
||||
+#6'Margin'#2#255#11'ModalResult'#2#0#9'NumGlyphs'#2#0#7'OnClick'#7#18'ShowLo'
|
||||
+'gButtonClick'#10'ParentFont'#9#14'ParentShowHint'#9#7'Spacing'#2#3#8'TabOrd'
|
||||
+'er'#2#4#7'TabStop'#9#7'Visible'#9#0#0#0#10'TPopupMenu'#15'UpdatePopupMenu'#4
|
||||
+'left'#2'('#3'top'#2'@'#0#9'TMenuItem'#11'mnuShowDiff'#7'Caption'#6#9'New It'
|
||||
+'em1'#12'RightJustify'#8#19'ShowAlwaysCheckable'#8#7'OnClick'#7#16'mnuShowDi'
|
||||
+'ffClick'#0#0#0#0
|
||||
]);
|
213
components/lazsvnpkg/svnupdateform.pas
Normal file
213
components/lazsvnpkg/svnupdateform.pas
Normal file
@ -0,0 +1,213 @@
|
||||
{ Copyright (C) 2008 Darius Blaszijk
|
||||
|
||||
This source is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
details.
|
||||
|
||||
A copy of the GNU General Public License is available on the World Wide Web
|
||||
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
|
||||
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA.
|
||||
}
|
||||
|
||||
unit SVNUpdateForm;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||
ComCtrls, StdCtrls, ButtonPanel, Process, Buttons, Menus, LCLProc;
|
||||
|
||||
type
|
||||
|
||||
{ TSVNUpdateFrm }
|
||||
|
||||
TSVNUpdateFrm = class(TForm)
|
||||
mnuShowDiff: TMenuItem;
|
||||
UpdatePopupMenu: TPopupMenu;
|
||||
ShowLogButton: TBitBtn;
|
||||
ButtonPanel: TButtonPanel;
|
||||
SVNUpdateListView: TListView;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure mnuShowDiffClick(Sender: TObject);
|
||||
procedure OKButtonClick(Sender: TObject);
|
||||
procedure ShowLogButtonClick(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
FRepoPath: string;
|
||||
procedure ProcessSVNUpdateOutput(var MemStream: TMemoryStream; var BytesRead: LongInt);
|
||||
public
|
||||
{ public declarations }
|
||||
procedure Execute;
|
||||
end;
|
||||
|
||||
procedure ShowSVNUpdateFrm(ARepoPath: string);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
SVNLogForm, SVNDiffForm, SVNClasses;
|
||||
|
||||
{ TSVNUpdateFrm }
|
||||
|
||||
procedure ShowSVNUpdateFrm(ARepoPath: string);
|
||||
var
|
||||
SVNUpdateFrm: TSVNUpdateFrm;
|
||||
begin
|
||||
SVNUpdateFrm := TSVNUpdateFrm.Create(nil);
|
||||
|
||||
SVNUpdateFrm.FRepoPath:=ARepoPath;
|
||||
SVNUpdateFrm.ShowModal;
|
||||
|
||||
SVNUpdateFrm.Free;
|
||||
end;
|
||||
|
||||
procedure TSVNUpdateFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
SetColumn(SVNUpdateListView, 0, 75, rsAction);
|
||||
SetColumn(SVNUpdateListView, 1, 400, rsPath);
|
||||
//SetColumn(SVNUpdateListView, 2, 100,'Mime type');
|
||||
|
||||
ButtonPanel.OKButton.OnClick := @OKButtonClick;
|
||||
ShowLogButton.Caption := rsShowLog;
|
||||
mnuShowDiff.Caption:=rsShowDiff;
|
||||
end;
|
||||
|
||||
procedure TSVNUpdateFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Caption := Format(rsLazarusSVNUpdate, [FRepoPath]);
|
||||
Execute;
|
||||
end;
|
||||
|
||||
procedure TSVNUpdateFrm.mnuShowDiffClick(Sender: TObject);
|
||||
begin
|
||||
{$note implement opening file in source editor}
|
||||
if Assigned(SVNUpdateListView.Selected) then
|
||||
begin
|
||||
if (SVNUpdateListView.Selected.Caption = rsAdded) or
|
||||
(SVNUpdateListView.Selected.Caption = rsDeleted) or
|
||||
(SVNUpdateListView.Selected.Caption = rsUpdated) or
|
||||
(SVNUpdateListView.Selected.Caption = rsConflict) or
|
||||
(SVNUpdateListView.Selected.Caption = rsMerged) then
|
||||
begin
|
||||
debugln('TSVNUpdateFrm.mnuShowDiffClick Path=' ,SVNUpdateListView.Selected.SubItems[0]);
|
||||
ShowSVNDiffFrm('-r PREV', SVNUpdateListView.Selected.SubItems[0]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TSVNUpdateFrm.OKButtonClick(Sender: TObject);
|
||||
begin
|
||||
Close;
|
||||
end;
|
||||
|
||||
procedure TSVNUpdateFrm.ShowLogButtonClick(Sender: TObject);
|
||||
begin
|
||||
ShowSVNLogFrm(FRepoPath);
|
||||
end;
|
||||
|
||||
procedure TSVNUpdateFrm.ProcessSVNUpdateOutput(var MemStream: TMemoryStream; var BytesRead: LongInt);
|
||||
var
|
||||
S: TStringList;
|
||||
n: LongInt;
|
||||
i: integer;
|
||||
str: string;
|
||||
begin
|
||||
Memstream.SetSize(BytesRead);
|
||||
S := TStringList.Create;
|
||||
S.LoadFromStream(MemStream);
|
||||
|
||||
for n := 0 to S.Count - 1 do
|
||||
with SVNUpdateListView.Items.Add do
|
||||
begin
|
||||
//find position of first space character
|
||||
i := pos(' ', S[n]);
|
||||
str := Copy(S[n],1, i - 1);
|
||||
|
||||
if str = 'A'then str := rsAdded;
|
||||
if str = 'D'then str := rsDeleted;
|
||||
if str = 'U'then str := rsUpdated;
|
||||
if str = 'C'then str := rsConflict;
|
||||
if str = 'G'then str := rsMerged;
|
||||
Caption := str;
|
||||
|
||||
Subitems.Add(Trim(Copy(S[n],i, Length(S[n])-i+1)));
|
||||
end;
|
||||
|
||||
S.Free;
|
||||
BytesRead := 0;
|
||||
MemStream.Clear;
|
||||
|
||||
//repaint the listview
|
||||
SVNUpdateListView.Invalidate;
|
||||
Invalidate;
|
||||
end;
|
||||
|
||||
procedure TSVNUpdateFrm.Execute;
|
||||
var
|
||||
M: TMemoryStream;
|
||||
P: TProcess;
|
||||
n: LongInt;
|
||||
BytesRead: LongInt;
|
||||
begin
|
||||
SVNUpdateListView.Clear;
|
||||
|
||||
M := TMemoryStream.Create;
|
||||
BytesRead := 0;
|
||||
|
||||
P := TProcess.Create(nil);
|
||||
P.CommandLine := SVNExecutable + ' update ' + FRepoPath + ' --non-interactive';
|
||||
debugln('TSVNUpdateFrm.Execute CommandLine ' + P.CommandLine);
|
||||
P.Options := [poUsePipes, poStdErrToOutput];
|
||||
P.ShowWindow := swoHIDE;
|
||||
P.Execute;
|
||||
|
||||
while P.Running do
|
||||
begin
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
|
||||
// try reading it
|
||||
n := P.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0
|
||||
then begin
|
||||
Inc(BytesRead, n);
|
||||
ProcessSVNUpdateOutput(m, BytesRead);
|
||||
end
|
||||
else begin
|
||||
// no data, wait 100 ms
|
||||
Sleep(100);
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
// read last part
|
||||
repeat
|
||||
// make sure we have room
|
||||
M.SetSize(BytesRead + READ_BYTES);
|
||||
// try reading it
|
||||
n := P.Output.Read((M.Memory + BytesRead)^, READ_BYTES);
|
||||
if n > 0
|
||||
then begin
|
||||
Inc(BytesRead, n);
|
||||
ProcessSVNUpdateOutput(m, BytesRead);
|
||||
end;
|
||||
until n <= 0;
|
||||
|
||||
P.Free;
|
||||
M.Free;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I svnupdateform.lrs}
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user