mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 19:30:19 +02:00
LazSvn Package improvements
git-svn-id: trunk@35463 -
This commit is contained in:
parent
00b66e9c44
commit
aee57b0b70
@ -49,6 +49,8 @@ resourcestring
|
||||
rsLazarusSVNDiff = '%s - LazarusSVN Diff...';
|
||||
rsLazarusSVNLog = '%s - LazarusSVN Log...';
|
||||
rsLazarusSVNUpdate = '%s - LazarusSVN Update...';
|
||||
rsCommitMsgHistory = 'Commit Message History';
|
||||
rsCommitMsg = 'Commit Message';
|
||||
rsMerged = 'Merged';
|
||||
rsMessage = 'Message';
|
||||
rsNoAuthor = '(no author)';
|
||||
|
@ -25,7 +25,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Dialogs, Controls, FileUtil,
|
||||
ComCtrls, StdCtrls, ButtonPanel, ExtCtrls, Process, Spin, XMLRead, DOM,
|
||||
Menus, LCLProc, LazIDEIntf;
|
||||
Menus, LCLProc, LazIDEIntf, fgl;
|
||||
|
||||
type
|
||||
TActionItem = record
|
||||
@ -59,6 +59,8 @@ type
|
||||
property Msg: string read FMsg write FMsg;
|
||||
end;
|
||||
|
||||
TSVNLogList = specialize TFPGObjectList<TSVNLogItem>;
|
||||
|
||||
{ TSVNLogFrm }
|
||||
|
||||
TSVNLogFrm = class(TForm)
|
||||
@ -93,7 +95,7 @@ type
|
||||
private
|
||||
FRepositoryPath: string;
|
||||
{ private declarations }
|
||||
LogList: TFPList;
|
||||
LogList: TSVNLogList;
|
||||
procedure UpdateLogListView;
|
||||
procedure ChangeCursor(ACursor: TCursor);
|
||||
public
|
||||
@ -160,16 +162,16 @@ begin
|
||||
FAction[Count - 1] := AActionItem;
|
||||
end;
|
||||
|
||||
function FindSVNLogItemByRevision(List: TFPList; RevNo: integer): TSVNLogItem;
|
||||
function SearchLinear(List: TFPList; RevNo: integer): TSVNLogItem;
|
||||
function FindSVNLogItemByRevision(List: TSVNLogList; RevNo: integer): TSVNLogItem;
|
||||
function SearchLinear(List: TSVNLogList; 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
|
||||
if List.Items[i].Revision = RevNo then
|
||||
begin
|
||||
Result := TSVNLogItem(List.Items[i]);
|
||||
Result := List.Items[i];
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
@ -189,9 +191,9 @@ begin
|
||||
Result := SearchLinear(List, RevNo)
|
||||
else
|
||||
begin
|
||||
if TSVNLogItem(List.Items[index]).Revision = RevNo then
|
||||
if List.Items[index].Revision = RevNo then
|
||||
//found!
|
||||
Result := TSVNLogItem(List.Items[index])
|
||||
Result := List.Items[index]
|
||||
else
|
||||
//revision not found on expected location, search linear
|
||||
Result := SearchLinear(List, RevNo);
|
||||
@ -261,21 +263,16 @@ var
|
||||
LogItem : TSVNLogItem;
|
||||
begin
|
||||
LogListView.Clear;
|
||||
|
||||
for i := 0 to LogList.Count - 1 do
|
||||
with LogListView.Items.Add do
|
||||
begin
|
||||
LogItem := TSVNLogItem(LogList.Items[i]);
|
||||
|
||||
LogItem := 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;
|
||||
@ -349,7 +346,7 @@ end;
|
||||
|
||||
procedure TSVNLogFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
LogList := TFPList.Create;
|
||||
LogList := TSVNLogList.Create;
|
||||
|
||||
SetColumn(LogListView, 0, 75, rsRevision);
|
||||
SetColumn(LogListView, 1, 75, rsAuthor);
|
||||
@ -372,11 +369,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TSVNLogFrm.FormDestroy(Sender: TObject);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i := 0 to LogList.Count - 1 do
|
||||
TSVNLogItem(LogList[i]).Free;
|
||||
LogList.Free;
|
||||
SVNLogFrm := nil;
|
||||
end;
|
||||
|
@ -1,11 +1,11 @@
|
||||
object SVNStatusFrm: TSVNStatusFrm
|
||||
Left = 277
|
||||
Height = 408
|
||||
Height = 470
|
||||
Top = 174
|
||||
Width = 738
|
||||
Width = 751
|
||||
Caption = 'SVNStatusFrm'
|
||||
ClientHeight = 408
|
||||
ClientWidth = 738
|
||||
ClientHeight = 470
|
||||
ClientWidth = 751
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
@ -14,29 +14,34 @@ object SVNStatusFrm: TSVNStatusFrm
|
||||
LCLVersion = '0.9.31'
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 38
|
||||
Top = 364
|
||||
Width = 726
|
||||
Height = 41
|
||||
Top = 423
|
||||
Width = 739
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.Caption = '&Commit'
|
||||
OKButton.DefaultCaption = False
|
||||
OKButton.OnClick = OKButtonClick
|
||||
HelpButton.Name = 'PatchButton'
|
||||
HelpButton.Caption = 'Create &Patch File'
|
||||
HelpButton.DefaultCaption = False
|
||||
HelpButton.OnClick = PatchButtonClick
|
||||
CloseButton.Name = 'PatchFileButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CloseButton.Enabled = False
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
CancelButton.OnClick = CancelButtonClick
|
||||
TabOrder = 2
|
||||
TabOrder = 1
|
||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose]
|
||||
end
|
||||
object SVNFileListView: TListView
|
||||
Left = 6
|
||||
Height = 181
|
||||
Top = 177
|
||||
Width = 726
|
||||
Height = 266
|
||||
Top = 151
|
||||
Width = 739
|
||||
Align = alClient
|
||||
Anchors = []
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
@ -44,39 +49,39 @@ object SVNStatusFrm: TSVNStatusFrm
|
||||
Columns = <
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 10
|
||||
Width = 100
|
||||
end
|
||||
item
|
||||
AutoSize = True
|
||||
Width = 624
|
||||
Width = 100
|
||||
end>
|
||||
PopupMenu = PopupMenu1
|
||||
RowSelect = True
|
||||
@ -87,37 +92,69 @@ object SVNStatusFrm: TSVNStatusFrm
|
||||
OnColumnClick = SVNFileListViewColumnClick
|
||||
OnDblClick = mnuShowDiffClick
|
||||
end
|
||||
object SVNCommitMsgMemo: TMemo
|
||||
Left = 6
|
||||
Height = 135
|
||||
Top = 37
|
||||
Width = 726
|
||||
Align = alTop
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
ParentFont = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object Splitter: TSplitter
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 172
|
||||
Width = 738
|
||||
Top = 146
|
||||
Width = 751
|
||||
Align = alTop
|
||||
ResizeAnchor = akTop
|
||||
end
|
||||
object SVNCommitMsgHistoryComboBox: TComboBox
|
||||
Left = 6
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 726
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 146
|
||||
Top = 0
|
||||
Width = 751
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
OnChange = SVNCommitMsgHistoryComboBoxChange
|
||||
TabOrder = 4
|
||||
Caption = 'Panel1'
|
||||
ClientHeight = 146
|
||||
ClientWidth = 751
|
||||
TabOrder = 3
|
||||
object SVNCommitMsgMemo: TMemo
|
||||
AnchorSideTop.Control = CommitMsgLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 72
|
||||
Top = 66
|
||||
Width = 736
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 3
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
end
|
||||
object CommitMsgLabel: TLabel
|
||||
AnchorSideTop.Control = SVNCommitMsgHistoryComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 48
|
||||
Width = 97
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'CommitMsgLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
object SVNCommitMsgHistoryComboBox: TComboBox
|
||||
AnchorSideTop.Control = CommitMsgHistoryLabel
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 24
|
||||
Top = 18
|
||||
Width = 736
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 3
|
||||
ItemHeight = 0
|
||||
OnChange = SVNCommitMsgHistoryComboBoxChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object CommitMsgHistoryLabel: TLabel
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 0
|
||||
Width = 137
|
||||
Caption = 'CommitMsgHistoryLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
end
|
||||
object PopupMenu1: TPopupMenu
|
||||
Images = ImageList
|
||||
|
@ -32,7 +32,9 @@ type
|
||||
|
||||
TSVNStatusFrm = class(TForm)
|
||||
ButtonPanel: TButtonPanel;
|
||||
SVNCommitMsgHistoryComboBox: TComboBox;
|
||||
CommitMsgHistoryLabel: TLabel;
|
||||
CommitMsgLabel: TLabel;
|
||||
Panel1: TPanel;
|
||||
ImageList: TImageList;
|
||||
mnuOpen: TMenuItem;
|
||||
mnuRemove: TMenuItem;
|
||||
@ -41,6 +43,7 @@ type
|
||||
mnuShowDiff: TMenuItem;
|
||||
PopupMenu1: TPopupMenu;
|
||||
Splitter: TSplitter;
|
||||
SVNCommitMsgHistoryComboBox: TComboBox;
|
||||
SVNCommitMsgMemo: TMemo;
|
||||
SVNFileListView: TListView;
|
||||
procedure CancelButtonClick(Sender: TObject);
|
||||
@ -99,6 +102,8 @@ procedure TSVNStatusFrm.FormShow(Sender: TObject);
|
||||
begin
|
||||
Caption := Format('%s - %s...', [RepositoryPath, rsLazarusSVNCommit]);
|
||||
Application.QueueAsyncCall(@Initialize, 0);
|
||||
CommitMsgHistoryLabel.Caption:=rsCommitMsgHistory;
|
||||
CommitMsgLabel.Caption:=rsCommitMsg;
|
||||
end;
|
||||
|
||||
procedure TSVNStatusFrm.Initialize(Data: PtrInt);
|
||||
|
@ -19,13 +19,13 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Directory'
|
||||
ClientHeight = 67
|
||||
ClientHeight = 66
|
||||
ClientWidth = 337
|
||||
TabOrder = 0
|
||||
object DirCombobox: TComboBox
|
||||
AnchorSideRight.Control = DirBrowseButton
|
||||
Left = 6
|
||||
Height = 23
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 297
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -39,8 +39,8 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
AnchorSideTop.Control = DirCombobox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 35
|
||||
Height = 24
|
||||
Top = 36
|
||||
Width = 325
|
||||
Align = alBottom
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
@ -57,7 +57,7 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 309
|
||||
Height = 21
|
||||
Top = 7
|
||||
Top = 8
|
||||
Width = 23
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 5
|
||||
@ -74,12 +74,12 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Remove files matching filter:'
|
||||
ClientHeight = 67
|
||||
ClientHeight = 66
|
||||
ClientWidth = 337
|
||||
TabOrder = 1
|
||||
object RemoveCombobox: TComboBox
|
||||
Left = 6
|
||||
Height = 23
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 325
|
||||
Align = alTop
|
||||
@ -91,8 +91,8 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
end
|
||||
object SimpleSyntaxRemoveCheckbox: TCheckBox
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 35
|
||||
Height = 20
|
||||
Top = 36
|
||||
Width = 325
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
@ -102,18 +102,18 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
end
|
||||
object KeepGroupbox: TGroupBox
|
||||
Left = 6
|
||||
Height = 85
|
||||
Height = 78
|
||||
Top = 186
|
||||
Width = 341
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Keep files matching filter:'
|
||||
ClientHeight = 68
|
||||
ClientHeight = 60
|
||||
ClientWidth = 337
|
||||
TabOrder = 2
|
||||
object KeepCombobox: TComboBox
|
||||
Left = 6
|
||||
Height = 23
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 325
|
||||
Align = alTop
|
||||
@ -125,8 +125,8 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
end
|
||||
object SimpleSyntaxKeepCheckbox: TCheckBox
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 35
|
||||
Height = 20
|
||||
Top = 36
|
||||
Width = 325
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
@ -135,8 +135,8 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
end
|
||||
object KeepTextFilesCheckbox: TCheckBox
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 64
|
||||
Height = 20
|
||||
Top = 58
|
||||
Width = 325
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 6
|
||||
@ -146,8 +146,8 @@ object CleanDirectoryDialog: TCleanDirectoryDialog
|
||||
end
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 26
|
||||
Top = 277
|
||||
Height = 33
|
||||
Top = 270
|
||||
Width = 341
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
|
@ -45,7 +45,7 @@
|
||||
<RequiredPackages Count="6">
|
||||
<Item1>
|
||||
<PackageName Value="LCLBase"/>
|
||||
<MinVersion Major="1" Valid="True" Release="1"/>
|
||||
<MinVersion Major="1" Release="1" Valid="True"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LazControls"/>
|
||||
@ -691,7 +691,7 @@
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
<CompileReasons Run="False" Build="False" Compile="False"/>
|
||||
<CompileReasons Compile="False" Build="False" Run="False"/>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="2">
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Massimo Soricetti <notturno@quipo.it>, 2011.
|
||||
Massimo Soricetti <notturno@quipo.it>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.9.2\n"
|
||||
|
@ -1,4 +1,4 @@
|
||||
# BigChimp <nowhere@example.com>, 2011.
|
||||
BigChimp <nowhere@example.com>, 2011.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
|
Loading…
Reference in New Issue
Block a user