Changeset 23
- Timestamp:
- Apr 4, 2025, 9:22:05 AM (5 days ago)
- Location:
- trunk
- Files:
-
- 4 edited
- 29 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Backends/Bazaar/Bazaar.pas
r22 r23 1 unit UBazaar;1 unit Bazaar; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UBackend, UVCS;6 Classes, SysUtils, Backend, VCS; 7 7 8 8 type -
trunk/Backends/CVS/CVS.pas
r22 r23 1 unit UCVS;1 unit CVS; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UVCS, UBackend;6 Classes, SysUtils, VCS, Backend; 7 7 8 8 type -
trunk/Backends/Git/Git.pas
r22 r23 1 unit UGit;1 unit Git; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UVCS, UBackend;6 Classes, SysUtils, VCS, Backend; 7 7 8 8 type -
trunk/Backends/Subversion/Subversion.pas
r22 r23 1 unit USubversion;1 unit Subversion; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UVCS, UBackend, XMLRead, DOM, XML;6 Classes, SysUtils, VCS, Backend, XMLRead, DOM, XML; 7 7 8 8 type -
trunk/Core.pas
r22 r23 1 unit UCore;1 unit Core; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, XMLConf, LazFileUtils, ActnList, Controls, UVCS, UProject,7 LastOpenedList, Forms, Dialogs, Menus, Contnrs, UBackend;6 Classes, SysUtils, XMLConf, LazFileUtils, ActnList, Controls, VCS, Project, 7 LastOpenedList, Forms, Dialogs, Menus, Generics.Collections, Backend, FormMain; 8 8 9 9 type … … 65 65 function DetectBackend(Directory: string): TBackend; 66 66 public 67 Backends: T ObjectList; // TList<TBackend>67 Backends: TList<TBackend>; 68 68 Project: TProject; 69 69 ProjectGroup: TProjectGroup; 70 70 UserName: string; 71 71 Email: string; 72 FormMain: TFormMain; 72 73 procedure LoadConfig; 73 74 procedure SaveConfig; … … 87 88 88 89 uses 89 UFormMain, UFormBrowse, UFormSettings, UFormCommit, UFormCheckout,90 USubversion, UBazaar, UCVS, UGit, UFormTest, UFormProjectGroup;90 FormBrowse, FormSettings, FormCommit, FormCheckout, 91 Subversion, Bazaar, CVS, Git, FormTest, FormProjectGroup; 91 92 92 93 { TCore } … … 94 95 procedure TCore.AQuitExecute(Sender: TObject); 95 96 begin 97 FormMain.Close; 96 98 Application.Terminate; 97 99 end; … … 123 125 124 126 procedure TCore.ASettingsExecute(Sender: TObject); 125 begin 126 FormSettings.Load(XMLConfig1); 127 if FormSettings.ShowModal = mrOk then begin 128 FormSettings.Save(XMLConfig1); 127 var 128 FormSettings: TFormSettings; 129 begin 130 FormSettings := TFormSettings.Create(nil); 131 try 132 FormSettings.Load(XMLConfig1); 133 if FormSettings.ShowModal = mrOk then begin 134 FormSettings.Save(XMLConfig1); 135 end; 136 finally 137 FormSettings.Free; 129 138 end; 130 139 end; 131 140 132 141 procedure TCore.AViewTestExecute(Sender: TObject); 133 begin 134 FormTest.Show; 142 var 143 FormTest: TFormTest; 144 begin 145 FormTest := TFormTest.Create(nil); 146 try 147 FormTest.Show; 148 finally 149 FormTest.Free; 150 end; 135 151 end; 136 152 137 153 procedure TCore.DataModuleCreate(Sender: TObject); 138 154 begin 139 Backends := T ObjectList.Create;155 Backends := TList<TBackend>.Create; 140 156 Project := nil; 157 158 Application.CreateForm(TFormMain, FormMain); 159 FormMain.Show; 141 160 end; 142 161 … … 235 254 Project.Directory := Directory; 236 255 UpdateInterface; 237 Form Browse.Directory := Project.Directory;238 Form Browse.ReloadList;256 FormMain.FormBrowse.Directory := Project.Directory; 257 FormMain.FormBrowse.ReloadList; 239 258 LastOpenedListProject.AddItem(Project.Directory); 240 259 end else ShowMessage('Directory ''' + Directory + ''' not recognized as working copy of any of supported VCS systems'); … … 247 266 ProjectGroup.FileName := FileName; 248 267 UpdateInterface; 249 Form ProjectGroup.ReloadTree;268 FormMain.FormProjectGroup.ReloadTree; 250 269 LastOpenedListProjectGroup.AddItem(FileName); 251 270 end; … … 266 285 begin 267 286 FreeAndNil(Project); 268 Form Browse.Directory := '';269 Form Browse.ReloadList;287 FormMain.FormBrowse.Directory := ''; 288 FormMain.FormBrowse.ReloadList; 270 289 UpdateInterface; 271 290 end; … … 275 294 FreeAndNil(ProjectGroup); 276 295 UpdateInterface; 277 Form ProjectGroup.ReloadTree;296 FormMain.FormProjectGroup.ReloadTree; 278 297 end; 279 298 … … 284 303 ProjectGroup.FileName := 'New project group.vcgrp'; 285 304 UpdateInterface; 286 Form ProjectGroup.ReloadTree;305 FormMain.FormProjectGroup.ReloadTree; 287 306 end; 288 307 … … 320 339 var 321 340 TempProject: TProject; 322 begin 323 if LastOpenedListRepoURL.Items.Count > 0 then 324 FormCheckout.EditURL.Text := LastOpenedListRepoURL.Items[0]; 325 if LastOpenedListNewDir.Items.Count > 0 then 326 FormCheckout.EditDir.Text := LastOpenedListNewDir.Items[0]; 327 if FormCheckout.ShowModal = mrOk then begin 328 LastOpenedListRepoURL.AddItem(FormCheckout.EditURL.Text); 329 LastOpenedListNewDir.AddItem(FormCheckout.EditDir.Text); 330 TempProject := TProject.Create; 331 try 332 TempProject.Backend := TBackend(FormCheckout.ComboBox1.Items.Objects[FormCheckout.ComboBox1.ItemIndex]); 333 TempProject.Directory := FormCheckout.EditDir.Text; 334 TempProject.RepositoryURL := FormCheckout.EditURL.Text; 335 TempProject.WorkingCopy.Checkout; 336 finally 337 TempProject.Free; 341 FormCheckout: TFormCheckout; 342 begin 343 FormCheckout := TFormCheckout.Create(nil); 344 try 345 if LastOpenedListRepoURL.Items.Count > 0 then 346 FormCheckout.EditURL.Text := LastOpenedListRepoURL.Items[0]; 347 if LastOpenedListNewDir.Items.Count > 0 then 348 FormCheckout.EditDir.Text := LastOpenedListNewDir.Items[0]; 349 if FormCheckout.ShowModal = mrOk then begin 350 LastOpenedListRepoURL.AddItem(FormCheckout.EditURL.Text); 351 LastOpenedListNewDir.AddItem(FormCheckout.EditDir.Text); 352 TempProject := TProject.Create; 353 try 354 TempProject.Backend := TBackend(FormCheckout.ComboBox1.Items.Objects[FormCheckout.ComboBox1.ItemIndex]); 355 TempProject.Directory := FormCheckout.EditDir.Text; 356 TempProject.RepositoryURL := FormCheckout.EditURL.Text; 357 TempProject.WorkingCopy.Checkout; 358 finally 359 TempProject.Free; 360 end; 361 ProjectOpen(FormCheckout.EditDir.Text); 338 362 end; 339 ProjectOpen(FormCheckout.EditDir.Text); 363 finally 364 FormCheckout.Free; 340 365 end; 341 366 end; … … 347 372 348 373 procedure TCore.ACommandCommitExecute(Sender: TObject); 349 begin 350 if FormCommit.ShowModal = mrOk then begin 351 Project.WorkingCopy.Commit(FormCommit.MemoMessage.Lines); 374 var 375 FormCommit: TFormCommit; 376 begin 377 FormCommit := TFormCommit.Create(nil); 378 try 379 if FormCommit.ShowModal = mrOk then begin 380 Project.WorkingCopy.Commit(FormCommit.MemoMessage.Lines); 381 end; 382 finally 383 FormCommit.Free; 352 384 end; 353 385 end; -
trunk/Forms/FormBrowse.lfm
r22 r23 1 1 object FormBrowse: TFormBrowse 2 2 Left = 479 3 Height = 5383 Height = 807 4 4 Top = 279 5 Width = 9645 Width = 1446 6 6 Caption = 'Browse' 7 ClientHeight = 538 8 ClientWidth = 964 7 ClientHeight = 807 8 ClientWidth = 1446 9 DesignTimePPI = 144 9 10 Menu = MainMenu1 10 11 OnCreate = FormCreate 11 12 OnDestroy = FormDestroy 12 13 OnShow = FormShow 13 LCLVersion = ' 1.5'14 LCLVersion = '3.6.0.0' 14 15 object TreeView1: TTreeView 15 16 Left = 0 16 Height = 53817 Height = 807 17 18 Top = 0 18 Width = 24119 Width = 362 19 20 Align = alLeft 20 DefaultItemHeight = 2421 21 TabOrder = 0 22 22 end 23 23 object Splitter1: TSplitter 24 Left = 24125 Height = 53824 Left = 362 25 Height = 807 26 26 Top = 0 27 Width = 527 Width = 8 28 28 end 29 29 object ListView1: TListView 30 Left = 24631 Height = 53830 Left = 370 31 Height = 807 32 32 Top = 0 33 Width = 71833 Width = 1076 34 34 Align = alClient 35 35 Columns = < 36 36 item 37 37 Caption = 'Name' 38 Width = 30038 Width = 450 39 39 end 40 40 item 41 41 Caption = 'Revision' 42 Width = 8042 Width = 120 43 43 end 44 44 item 45 45 Caption = 'Last change date' 46 Width = 1 0046 Width = 150 47 47 end 48 48 item 49 49 Caption = 'Last author' 50 Width = 1 0050 Width = 150 51 51 end 52 52 item 53 53 Caption = 'Status' 54 Width = 25954 Width = 388 55 55 end> 56 56 OwnerData = True … … 67 67 object PopupMenu1: TPopupMenu 68 68 Images = Core.ImageList1 69 left = 35370 top = 13169 Left = 530 70 Top = 197 71 71 object MenuItem1: TMenuItem 72 72 Action = AAdd … … 93 93 object ActionList1: TActionList 94 94 Images = Core.ImageList1 95 left = 35296 top = 20895 Left = 528 96 Top = 312 97 97 object AAdd: TAction 98 98 Caption = 'Add' … … 123 123 end 124 124 object MainMenu1: TMainMenu 125 left = 429126 top = 516125 Left = 644 126 Top = 774 127 127 end 128 128 end -
trunk/Forms/FormBrowse.pas
r22 r23 1 unit UFormBrowse;1 unit FormBrowse; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 ExtCtrls, Menus, ActnList, FindFile, UVCS, Contnrs, LazFileUtils;7 ExtCtrls, Menus, ActnList, FindFile, VCS, Generics.Collections, LazFileUtils; 8 8 9 9 type … … 45 45 Selected: Boolean); 46 46 private 47 FileList: T ObjectList;47 FileList: TFileStatusList; 48 48 public 49 49 Directory: string; … … 52 52 end; 53 53 54 var55 FormBrowse: TFormBrowse;56 57 54 58 55 implementation 59 56 60 57 uses 61 UCore, UFormLog;58 Core, FormLog; 62 59 63 60 {$R *.lfm} … … 96 93 97 94 procedure TFormBrowse.ALogShowExecute(Sender: TObject); 98 begin 99 FormLog.FileName := Directory + DirectorySeparator + ListView1.Selected.Caption; 100 FormLog.ShowModal; 95 var 96 FormLog: TFormLog; 97 begin 98 FormLog := TFormLog.Create(nil); 99 try 100 FormLog.FileName := Directory + DirectorySeparator + ListView1.Selected.Caption; 101 FormLog.ShowModal; 102 finally 103 FormLog.Free; 104 end; 101 105 end; 102 106 103 107 procedure TFormBrowse.AAddExecute(Sender: TObject); 104 108 begin 105 Core. Project.WorkingCopy.Add(Directory + DirectorySeparator + ListView1.Selected.Caption);109 Core.Core.Project.WorkingCopy.Add(Directory + DirectorySeparator + ListView1.Selected.Caption); 106 110 end; 107 111 … … 126 130 begin 127 131 if InputQuery('Rename', 'Enter new name', NewName) then 128 Core. Project.WorkingCopy.Move(Directory + DirectorySeparator + ListView1.Selected.Caption, NewName);132 Core.Core.Project.WorkingCopy.Move(Directory + DirectorySeparator + ListView1.Selected.Caption, NewName); 129 133 end; 130 134 131 135 procedure TFormBrowse.FormCreate(Sender: TObject); 132 136 begin 133 FileList := T ObjectList.Create;137 FileList := TFileStatusList.Create; 134 138 end; 135 139 136 140 procedure TFormBrowse.FormDestroy(Sender: TObject); 137 141 begin 138 F ileList.Free;142 FreeAndNil(FileList); 139 143 end; 140 144 … … 155 159 begin 156 160 FileList.Clear; 157 if Assigned(Core. Project) then begin161 if Assigned(Core.Core.Project) then begin 158 162 FileStatusList := TFileStatusList.Create; 159 163 try 160 Core. Project.WorkingCopy.GetStatus(Directory, FileStatusList);164 Core.Core.Project.WorkingCopy.GetStatus(Directory, FileStatusList); 161 165 162 166 if DirectoryExistsUTF8(Directory) then begin … … 172 176 NewFileItem.FileName := FoundFileList[I]; 173 177 RelativeName := NewFileItem.FileName; 174 if Copy(RelativeName, 1, Length(Core. Project.WorkingCopy.Path)) =Core.Project.WorkingCopy.Path then175 Delete(RelativeName, 1, Length(Core. Project.WorkingCopy.Path));178 if Copy(RelativeName, 1, Length(Core.Core.Project.WorkingCopy.Path)) = Core.Core.Project.WorkingCopy.Path then 179 Delete(RelativeName, 1, Length(Core.Core.Project.WorkingCopy.Path)); 176 180 if Copy(RelativeName, 1, 1) = DirectorySeparator then 177 181 Delete(RelativeName, 1, Length(DirectorySeparator)); -
trunk/Forms/FormCheckout.pas
r22 r23 1 unit UFormCheckout;1 unit FormCheckout; 2 2 3 3 interface … … 28 28 end; 29 29 30 var31 FormCheckout: TFormCheckout;32 33 30 34 31 implementation … … 37 34 38 35 uses 39 UCore, UBackend;36 Core, Backend; 40 37 41 38 { TFormCheckout } … … 54 51 begin 55 52 ComboBox1.Clear; 56 for I := 0 to Core. Backends.Count - 1 do57 ComboBox1.AddItem( TBackend(Core.Backends[I]).Name,Core.Backends[I]);53 for I := 0 to Core.Core.Backends.Count - 1 do 54 ComboBox1.AddItem(Core.Core.Backends[I].Name, Core.Core.Backends[I]); 58 55 if ComboBox1.Items.Count > 0 then 59 56 ComboBox1.ItemIndex := 0; -
trunk/Forms/FormCommit.pas
r22 r23 1 unit UFormCommit;1 unit FormCommit; 2 2 3 3 interface -
trunk/Forms/FormConsole.pas
r22 r23 1 unit UFormConsole;1 unit FormConsole; 2 2 3 3 interface … … 33 33 procedure Perform; 34 34 end; 35 36 var37 FormConsole: TFormConsole;38 35 39 36 -
trunk/Forms/FormFavorites.pas
r22 r23 1 unit UFormFavorites;1 unit FormFavorites; 2 2 3 3 interface … … 10 10 end; 11 11 12 var13 FormFavorites: TFormFavorites;14 15 12 16 13 implementation -
trunk/Forms/FormLog.pas
r22 r23 1 unit UFormLog;1 unit FormLog; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 StdCtrls, ExtCtrls, UVCS;7 StdCtrls, ExtCtrls, VCS; 8 8 9 9 type … … 32 32 end; 33 33 34 var35 FormLog: TFormLog;36 37 34 38 35 implementation 39 36 40 37 uses 41 UCore;38 Core; 42 39 43 40 {$R *.lfm} … … 57 54 procedure TFormLog.FormShow(Sender: TObject); 58 55 begin 59 Core. Project.WorkingCopy.GetLog(FileName, LogList);56 Core.Core.Project.WorkingCopy.GetLog(FileName, LogList); 60 57 ReloadList; 61 58 end; -
trunk/Forms/FormMain.lfm
r22 r23 1 1 object FormMain: TFormMain 2 2 Left = 687 3 Height = 8013 Height = 767 4 4 Top = 411 5 5 Width = 1408 6 6 Caption = 'VCSCommander' 7 ClientHeight = 8017 ClientHeight = 767 8 8 ClientWidth = 1408 9 9 DesignTimePPI = 144 … … 11 11 OnActivate = FormActivate 12 12 OnClose = FormClose 13 OnCreate = FormCreate 14 OnDestroy = FormDestroy 13 15 OnShow = FormShow 14 16 Position = poScreenCenter … … 43 45 Left = 0 44 46 Height = 28 45 Top = 7 7347 Top = 739 46 48 Width = 1408 47 49 Panels = <> -
trunk/Forms/FormMain.pas
r22 r23 1 unit UFormMain;1 unit FormMain; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, ExtCtrls ;7 Menus, ActnList, ExtCtrls, FormBrowse, FormProjectGroup; 8 8 9 9 type … … 50 50 procedure FormActivate(Sender: TObject); 51 51 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 52 procedure FormCreate(Sender: TObject); 53 procedure FormDestroy(Sender: TObject); 52 54 procedure FormShow(Sender: TObject); 53 55 procedure MenuItemFileClick(Sender: TObject); … … 55 57 Initialized: Boolean; 56 58 public 59 FormBrowse: TFormBrowse; 60 FormProjectGroup: TFormProjectGroup; 57 61 procedure ProjectGroupOpenRecentExecute(Sender: TObject); 58 62 procedure OpenRecentExecute(Sender: TObject); … … 60 64 procedure DockInit; 61 65 end; 62 63 var64 FormMain: TFormMain;65 66 66 67 … … 70 71 71 72 uses 72 UCore, UFormBrowse, UFormProjectGroup;73 Core; 73 74 74 75 { TFormMain } … … 86 87 procedure TFormMain.OpenRecentExecute(Sender: TObject); 87 88 begin 88 Core. ProjectOpen(Core.LastOpenedListProject.Items[TMenuItem(Sender).MenuIndex]);89 Core.Core.ProjectOpen(Core.Core.LastOpenedListProject.Items[TMenuItem(Sender).MenuIndex]); 89 90 end; 90 91 91 92 procedure TFormMain.ProjectGroupOpenRecentExecute(Sender: TObject); 92 93 begin 93 Core. ProjectGroupOpen(Core.LastOpenedListProjectGroup.Items[TMenuItem(Sender).MenuIndex]);94 Core.Core.ProjectGroupOpen(Core.Core.LastOpenedListProjectGroup.Items[TMenuItem(Sender).MenuIndex]); 94 95 end; 95 96 … … 98 99 if not Initialized then begin 99 100 Initialized := True; 100 Core. Init;101 Core.Core.Init; 101 102 end; 102 103 end; … … 104 105 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction); 105 106 begin 106 Core.Done; 107 Core.Core.Done; 108 end; 109 110 procedure TFormMain.FormCreate(Sender: TObject); 111 begin 112 FormBrowse := TFormBrowse.Create(nil); 113 FormProjectGroup := TFormProjectGroup.Create(nil); 114 end; 115 116 procedure TFormMain.FormDestroy(Sender: TObject); 117 begin 118 FreeAndNil(FormProjectGroup); 119 FreeAndNil(FormBrowse); 107 120 end; 108 121 … … 114 127 begin 115 128 NewCaption := ''; 116 if Assigned(Core. Project) then117 NewCaption := Core. Project.Directory + ' (' +Core.Project.Backend.Name + ') - ';129 if Assigned(Core.Core.Project) then 130 NewCaption := Core.Core.Project.Directory + ' (' + Core.Core.Project.Backend.Name + ') - '; 118 131 NewCaption := NewCaption + AppName; 119 132 Caption := NewCaption; -
trunk/Forms/FormProjectGroup.pas
r22 r23 1 unit UFormProjectGroup;1 unit FormProjectGroup; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, UProject, LazFileUtils;7 Menus, ActnList, Project, LazFileUtils; 8 8 9 9 type … … 27 27 end; 28 28 29 var30 FormProjectGroup: TFormProjectGroup;31 32 29 33 30 implementation … … 36 33 37 34 uses 38 UCore;35 Core; 39 36 40 37 { TFormProjectGroup } … … 50 47 begin 51 48 TreeView1.Items.Clear; 52 if Assigned(Core. ProjectGroup) then begin53 TreeView1.Items.AddChild(nil, ExtractFileNameOnly(Core. ProjectGroup.FileName));54 for I := 0 to Core. ProjectGroup.Projects.Count - 1 do49 if Assigned(Core.Core.ProjectGroup) then begin 50 TreeView1.Items.AddChild(nil, ExtractFileNameOnly(Core.Core.ProjectGroup.FileName)); 51 for I := 0 to Core.Core.ProjectGroup.Projects.Count - 1 do 55 52 TreeView1.Items.AddChildObject(TreeView1.TopItem, 56 ExtractFileName( TProject(Core.ProjectGroup.Projects[I]).Directory),57 Core. ProjectGroup.Projects[I]);53 ExtractFileName(Core.Core.ProjectGroup.Projects[I].Directory), 54 Core.Core.ProjectGroup.Projects[I]); 58 55 end; 59 56 UpdateInterface; -
trunk/Forms/FormSettings.lfm
r22 r23 1 1 object FormSettings: TFormSettings 2 2 Left = 342 3 Height = 4973 Height = 746 4 4 Top = 145 5 Width = 6865 Width = 1029 6 6 Caption = 'Settings' 7 ClientHeight = 497 8 ClientWidth = 686 7 ClientHeight = 746 8 ClientWidth = 1029 9 DesignTimePPI = 144 9 10 OnCreate = FormCreate 10 LCLVersion = ' 1.5'11 LCLVersion = '3.6.0.0' 11 12 object ButtonCancel: TButton 12 Left = 59213 Height = 2514 Top = 46415 Width = 7513 Left = 888 14 Height = 38 15 Top = 696 16 Width = 112 16 17 Caption = 'Cancel' 17 18 ModalResult = 2 … … 19 20 end 20 21 object ButtonOk: TButton 21 Left = 49622 Height = 2523 Top = 46424 Width = 7522 Left = 744 23 Height = 38 24 Top = 696 25 Width = 112 25 26 Caption = 'Ok' 26 27 ModalResult = 1 … … 28 29 end 29 30 object Label1: TLabel 30 Left = 1631 Height = 2 532 Top = 1633 Width = 10731 Left = 24 32 Height = 26 33 Top = 24 34 Width = 97 34 35 Caption = 'User name:' 35 36 ParentColor = False 36 37 end 37 38 object Label2: TLabel 38 Left = 1639 Height = 2 540 Top = 6441 Width = 5 739 Left = 24 40 Height = 26 41 Top = 96 42 Width = 52 42 43 Caption = 'Email:' 43 44 ParentColor = False 44 45 end 45 46 object EditUserName: TEdit 46 Left = 15247 Height = 3548 Top = 849 Width = 26447 Left = 228 48 Height = 43 49 Top = 12 50 Width = 396 50 51 TabOrder = 2 51 52 end 52 53 object EditEmail: TEdit 53 Left = 15254 Height = 3555 Top = 5656 Width = 26454 Left = 228 55 Height = 43 56 Top = 84 57 Width = 396 57 58 TabOrder = 3 58 59 end -
trunk/Forms/FormSettings.pas
r22 r23 1 unit UFormSettings;1 unit FormSettings; 2 2 3 3 interface … … 24 24 end; 25 25 26 var27 FormSettings: TFormSettings;28 29 26 30 27 implementation … … 33 30 34 31 uses 35 UCore;32 Core; 36 33 37 34 { TFormSettings } … … 44 41 procedure TFormSettings.Load(XMLConfig: TXMLConfig); 45 42 begin 46 EditUserName.Text := Core. UserName;47 EditEmail.Text := Core. Email;43 EditUserName.Text := Core.Core.UserName; 44 EditEmail.Text := Core.Core.Email; 48 45 end; 49 46 50 47 procedure TFormSettings.Save(XMLConfig: TXMLConfig); 51 48 begin 52 Core. UserName := EditUserName.Text;53 Core. Email := EditEmail.Text;49 Core.Core.UserName := EditUserName.Text; 50 Core.Core.Email := EditEmail.Text; 54 51 end; 55 52 -
trunk/Forms/FormTest.lfm
r22 r23 1 1 object FormTest: TFormTest 2 2 Left = 477 3 Height = 5873 Height = 880 4 4 Top = 365 5 Width = 8785 Width = 1317 6 6 Caption = 'Test' 7 ClientHeight = 587 8 ClientWidth = 878 7 ClientHeight = 880 8 ClientWidth = 1317 9 DesignTimePPI = 144 9 10 OnShow = FormShow 10 LCLVersion = ' 1.5'11 LCLVersion = '3.6.0.0' 11 12 object ListView1: TListView 12 Left = 1613 Height = 51214 Top = 6415 Width = 85613 Left = 24 14 Height = 768 15 Top = 96 16 Width = 1284 16 17 Anchors = [akTop, akLeft, akRight, akBottom] 17 18 Columns = < 18 19 item 19 20 Caption = 'Action' 20 Width = 25021 Width = 375 21 22 end 22 23 item 23 24 Caption = 'Duration' 24 Width = 1 0025 Width = 150 25 26 end 26 27 item 27 28 Caption = 'Result' 28 Width = 48929 Width = 744 29 30 end> 30 31 ReadOnly = True … … 34 35 end 35 36 object ButtonStart: TButton 36 Left = 77637 Height = 2538 Top = 2439 Width = 7537 Left = 1164 38 Height = 38 39 Top = 36 40 Width = 112 40 41 Caption = 'Start' 42 TabOrder = 1 41 43 OnClick = ButtonStartClick 42 TabOrder = 143 44 end 44 45 object ComboBox1: TComboBox 45 Left = 13646 Height = 3747 Top = 1948 Width = 32446 Left = 204 47 Height = 42 48 Top = 28 49 Width = 486 49 50 ItemHeight = 0 50 51 Style = csDropDownList … … 52 53 end 53 54 object Label1: TLabel 54 Left = 1455 Height = 2 556 Top = 1957 Width = 8555 Left = 21 56 Height = 26 57 Top = 28 58 Width = 78 58 59 Caption = 'Backend:' 59 60 ParentColor = False -
trunk/Forms/FormTest.pas
r22 r23 1 unit UFormTest;1 unit FormTest; 2 2 3 3 interface … … 24 24 end; 25 25 26 var27 FormTest: TFormTest;28 29 26 30 27 implementation … … 33 30 34 31 uses 35 UCore, UBackend, UProject, UVCS;32 Core, Backend, Project, VCS; 36 33 37 34 { TFormTest } … … 42 39 begin 43 40 ComboBox1.Clear; 44 for I := 0 to Core. Backends.Count - 1 do45 ComboBox1.AddItem( TBackend(Core.Backends[I]).Name,Core.Backends[I]);41 for I := 0 to Core.Core.Backends.Count - 1 do 42 ComboBox1.AddItem(Core.Core.Backends[I].Name, Core.Core.Backends[I]); 46 43 if ComboBox1.Items.Count > 0 then 47 44 ComboBox1.ItemIndex := 0; … … 71 68 ListView1.Items.Clear; 72 69 Project := TProject.Create; 73 Project.Backend := TBackend(Core.Backends[ComboBox1.ItemIndex]);74 Project.WorkingCopy.UserName := Core. UserName;75 Project.WorkingCopy.Email := Core. Email;70 Project.Backend := Core.Core.Backends[ComboBox1.ItemIndex]; 71 Project.WorkingCopy.UserName := Core.Core.UserName; 72 Project.WorkingCopy.Email := Core.Core.Email; 76 73 try 77 74 //RemoveDir(TestDir); -
trunk/Languages/VCSCommander.cs.po
r22 r23 12 12 "X-Generator: Poedit 3.4.2\n" 13 13 14 #: uproject.swrongfileformat 14 #: project.swrongfileformat 15 #, fuzzy 16 msgctxt "project.swrongfileformat" 15 17 msgid "Wrong file format" 16 18 msgstr "ŠpatnÜ formát souboru" 19 -
trunk/Languages/VCSCommander.pot
r22 r23 2 2 msgstr "Content-Type: text/plain; charset=UTF-8" 3 3 4 #: uproject.swrongfileformat 4 #: project.swrongfileformat 5 msgctxt "project.swrongfileformat" 5 6 msgid "Wrong file format" 6 7 msgstr "" -
trunk/Units/Backend.pas
r22 r23 1 unit UBackend;1 unit Backend; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UVCS;6 Classes, SysUtils, VCS; 7 7 8 8 type -
trunk/Units/Project.pas
r22 r23 1 unit UProject;1 unit Project; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, UVCS, UBackend, Contnrs, DOM, XMLRead, XMLWrite, XML,7 LazFileUtils;6 Classes, SysUtils, VCS, Backend, Generics.Collections, DOM, XMLRead, XMLWrite, 7 XML, LazFileUtils; 8 8 9 9 type … … 34 34 { TProjects } 35 35 36 TProjects = class(TObjectList )36 TProjects = class(TObjectList<TProject>) 37 37 procedure LoadXMLNode(Node: TDOMNode); 38 38 procedure SaveXMLNode(Node: TDOMNode); … … 84 84 end; 85 85 86 87 86 { TProjectGroup } 88 87 … … 94 93 destructor TProjectGroup.Destroy; 95 94 begin 96 Projects.Free;97 inherited Destroy;95 FreeAndNil(Projects); 96 inherited; 98 97 end; 99 98 … … 190 189 destructor TProject.Destroy; 191 190 begin 192 WorkingCopy.Free;193 Repository.Free;194 inherited Destroy;191 FreeAndNil(WorkingCopy); 192 FreeAndNil(Repository); 193 inherited; 195 194 end; 196 195 -
trunk/Units/VCS.pas
r22 r23 1 unit UVCS;1 unit VCS; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, LazFileUtils, Contnrs;6 Classes, SysUtils, LazFileUtils, Generics.Collections; 7 7 8 8 type … … 21 21 end; 22 22 23 TLogList = class(TObjectList) 24 23 TLogList = class(TObjectList<TLogItem>) 25 24 end; 26 25 … … 40 39 { TFileStatusList } 41 40 42 TFileStatusList = class(TObjectList )41 TFileStatusList = class(TObjectList<TFileStatus>) 43 42 function SearchByName(Name: string): TFileStatus; 44 43 end; … … 102 101 103 102 uses 104 UFormConsole;103 FormConsole; 105 104 106 105 function URLFromDirectory(DirName: string; Relative: Boolean): string; … … 138 137 procedure TRepository.ExecuteProcess(Command: string; 139 138 Parameters: array of string); 140 begin 141 FormConsole.Executable := Command; 142 FormConsole.Parameters.Clear; 143 FormConsole.Parameters.AddStrings(Parameters); 144 if DirectoryExistsUTF8(Path) then FormConsole.WorkingDir := Path 145 else FormConsole.WorkingDir := ''; 146 FormConsole.ShowModal; 147 ExecutionOutput.Assign(FormConsole.Log); 139 var 140 FormConsole: TFormConsole; 141 begin 142 FormConsole := TFormConsole.Create(nil); 143 try 144 FormConsole.Executable := Command; 145 FormConsole.Parameters.Clear; 146 FormConsole.Parameters.AddStrings(Parameters); 147 if DirectoryExistsUTF8(Path) then FormConsole.WorkingDir := Path 148 else FormConsole.WorkingDir := ''; 149 FormConsole.ShowModal; 150 ExecutionOutput.Assign(FormConsole.Log); 151 finally 152 FormConsole.Free; 153 end; 148 154 end; 149 155 … … 162 168 begin 163 169 FreeAndNil(ExecutionOutput); 164 inherited Destroy;170 inherited; 165 171 end; 166 172 … … 175 181 destructor TLogItem.Destroy; 176 182 begin 177 Messages.Free;178 ChangedFiles.Free;179 inherited Destroy;183 FreeAndNil(Messages); 184 FreeAndNil(ChangedFiles); 185 inherited; 180 186 end; 181 187 … … 191 197 procedure TWorkingCopy.SetRepositoryURL(AValue: string); 192 198 begin 193 if FRepositoryURL =AValue then Exit;194 FRepositoryURL :=AValue;199 if FRepositoryURL = AValue then Exit; 200 FRepositoryURL := AValue; 195 201 end; 196 202 197 203 procedure TWorkingCopy.ExecuteProcess(Command: string; Parameters: array of string); 198 begin 199 FormConsole.Executable := Command; 200 FormConsole.EnvironmentVariables.Assign(EnvVars); 201 FormConsole.Parameters.Clear; 202 FormConsole.Parameters.AddStrings(Parameters); 203 if DirectoryExistsUTF8(Path) then FormConsole.WorkingDir := Path 204 else FormConsole.WorkingDir := ''; 205 if SilentExecution then FormConsole.Perform 206 else FormConsole.ShowModal; 207 ExecutionOutput.Assign(FormConsole.Log); 204 var 205 FormConsole: TFormConsole; 206 begin 207 FormConsole := TFormConsole.Create(nil); 208 try 209 FormConsole.Executable := Command; 210 FormConsole.EnvironmentVariables.Assign(EnvVars); 211 FormConsole.Parameters.Clear; 212 FormConsole.Parameters.AddStrings(Parameters); 213 if DirectoryExistsUTF8(Path) then FormConsole.WorkingDir := Path 214 else FormConsole.WorkingDir := ''; 215 if SilentExecution then FormConsole.Perform 216 else FormConsole.ShowModal; 217 ExecutionOutput.Assign(FormConsole.Log); 218 finally 219 FormConsole.Free; 220 end; 208 221 end; 209 222 … … 286 299 FreeAndNil(EnvVars); 287 300 FreeAndNil(ExecutionOutput); 288 inherited Destroy;301 inherited; 289 302 end; 290 303 -
trunk/VCSCommander.lpi
r22 r23 98 98 </Unit0> 99 99 <Unit1> 100 <Filename Value="Forms/ UFormMain.pas"/>100 <Filename Value="Forms/FormMain.pas"/> 101 101 <IsPartOfProject Value="True"/> 102 102 <ComponentName Value="FormMain"/> … … 105 105 </Unit1> 106 106 <Unit2> 107 <Filename Value=" UCore.pas"/>107 <Filename Value="Core.pas"/> 108 108 <IsPartOfProject Value="True"/> 109 109 <ComponentName Value="Core"/> … … 112 112 </Unit2> 113 113 <Unit3> 114 <Filename Value="Forms/ UFormBrowse.pas"/>114 <Filename Value="Forms/FormBrowse.pas"/> 115 115 <IsPartOfProject Value="True"/> 116 116 <ComponentName Value="FormBrowse"/> … … 119 119 </Unit3> 120 120 <Unit4> 121 <Filename Value="Units/ UVCS.pas"/>121 <Filename Value="Units/VCS.pas"/> 122 122 <IsPartOfProject Value="True"/> 123 123 </Unit4> 124 124 <Unit5> 125 <Filename Value="Forms/ UFormFavorites.pas"/>125 <Filename Value="Forms/FormFavorites.pas"/> 126 126 <IsPartOfProject Value="True"/> 127 127 <ComponentName Value="FormFavorites"/> … … 130 130 </Unit5> 131 131 <Unit6> 132 <Filename Value="Forms/ UFormSettings.pas"/>132 <Filename Value="Forms/FormSettings.pas"/> 133 133 <IsPartOfProject Value="True"/> 134 134 <ComponentName Value="FormSettings"/> … … 137 137 </Unit6> 138 138 <Unit7> 139 <Filename Value="Backends/Subversion/ USubversion.pas"/>139 <Filename Value="Backends/Subversion/Subversion.pas"/> 140 140 <IsPartOfProject Value="True"/> 141 141 </Unit7> 142 142 <Unit8> 143 <Filename Value="Units/ UProject.pas"/>143 <Filename Value="Units/Project.pas"/> 144 144 <IsPartOfProject Value="True"/> 145 145 </Unit8> 146 146 <Unit9> 147 <Filename Value="Forms/ UFormConsole.pas"/>147 <Filename Value="Forms/FormConsole.pas"/> 148 148 <IsPartOfProject Value="True"/> 149 149 <ComponentName Value="FormConsole"/> … … 152 152 </Unit9> 153 153 <Unit10> 154 <Filename Value="Forms/ UFormCommit.pas"/>154 <Filename Value="Forms/FormCommit.pas"/> 155 155 <IsPartOfProject Value="True"/> 156 156 <ComponentName Value="FormCommit"/> … … 159 159 </Unit10> 160 160 <Unit11> 161 <Filename Value="Forms/ UFormCheckout.pas"/>161 <Filename Value="Forms/FormCheckout.pas"/> 162 162 <IsPartOfProject Value="True"/> 163 163 <ComponentName Value="FormCheckout"/> … … 166 166 </Unit11> 167 167 <Unit12> 168 <Filename Value="Backends/Bazaar/ UBazaar.pas"/>168 <Filename Value="Backends/Bazaar/Bazaar.pas"/> 169 169 <IsPartOfProject Value="True"/> 170 170 </Unit12> 171 171 <Unit13> 172 <Filename Value="Units/ UBackend.pas"/>172 <Filename Value="Units/Backend.pas"/> 173 173 <IsPartOfProject Value="True"/> 174 174 </Unit13> 175 175 <Unit14> 176 <Filename Value="Backends/CVS/ UCVS.pas"/>176 <Filename Value="Backends/CVS/CVS.pas"/> 177 177 <IsPartOfProject Value="True"/> 178 178 </Unit14> 179 179 <Unit15> 180 <Filename Value="Forms/ UFormLog.pas"/>180 <Filename Value="Forms/FormLog.pas"/> 181 181 <IsPartOfProject Value="True"/> 182 182 <ComponentName Value="FormLog"/> … … 185 185 </Unit15> 186 186 <Unit16> 187 <Filename Value="Backends/Git/ UGit.pas"/>187 <Filename Value="Backends/Git/Git.pas"/> 188 188 <IsPartOfProject Value="True"/> 189 189 </Unit16> 190 190 <Unit17> 191 <Filename Value="Forms/ UFormTest.pas"/>191 <Filename Value="Forms/FormTest.pas"/> 192 192 <IsPartOfProject Value="True"/> 193 193 <ComponentName Value="FormTest"/> … … 196 196 </Unit17> 197 197 <Unit18> 198 <Filename Value="Forms/ UFormProjectGroup.pas"/>198 <Filename Value="Forms/FormProjectGroup.pas"/> 199 199 <IsPartOfProject Value="True"/> 200 200 <ComponentName Value="FormProjectGroup"/> … … 234 234 <Linking> 235 235 <Debugging> 236 <DebugInfoType Value="dsDwarf3"/> 236 237 <UseHeaptrc Value="True"/> 237 238 <UseExternalDbgSyms Value="True"/> -
trunk/VCSCommander.lpr
r21 r23 1 1 program VCSCommander; 2 3 {$mode objfpc}{$H+}4 2 5 3 uses … … 8 6 {$ENDIF} 9 7 Interfaces, // this includes the LCL widgetset 10 Forms, UFormMain, UCore, Common, UFormBrowse, UVCS,11 UFormFavorites, UFormSettings, UFormConsole, USubversion, UProject, SysUtils,12 UFormCommit, UFormCheckout, UBazaar, UBackend, UFormLog, UFormTest,13 UFormProjectGroup8 Forms, FormMain, Core, Common, FormBrowse, VCS, 9 FormFavorites, FormSettings, FormConsole, Subversion, Project, SysUtils, 10 FormCommit, FormCheckout, Bazaar, Backend, FormLog, FormTest, 11 FormProjectGroup 14 12 { you can add units after this }; 15 13 … … 31 29 RequireDerivedFormResource := True; 32 30 Application.Initialize; 33 Application.CreateForm(TCore, Core); 34 Application.CreateForm(TFormMain, FormMain); 35 Application.CreateForm(TFormBrowse, FormBrowse); 36 Application.CreateForm(TFormFavorites, FormFavorites); 37 Application.CreateForm(TFormSettings, FormSettings); 38 Application.CreateForm(TFormConsole, FormConsole); 39 Application.CreateForm(TFormCommit, FormCommit); 40 Application.CreateForm(TFormCheckout, FormCheckout); 41 Application.CreateForm(TFormLog, FormLog); 42 Application.CreateForm(TFormTest, FormTest); 43 Application.CreateForm(TFormProjectGroup, FormProjectGroup); 31 Application.CreateForm(TCore, Core.Core); 44 32 Application.Run; 45 33 end.
Note:
See TracChangeset
for help on using the changeset viewer.