Changeset 9 for trunk/Units
- Timestamp:
- May 18, 2015, 11:49:39 PM (10 years ago)
- Location:
- trunk/Units
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Units/UProject.pas
r8 r9 6 6 7 7 uses 8 Classes, SysUtils, UVCS ;8 Classes, SysUtils, UVCS, UBackend; 9 9 10 10 type 11 12 TVCSType = (vtNone, vtSubversion, vtCVS, vtMercurial, vtBazaar, vzGit);13 11 14 12 { TProject } … … 16 14 TProject = class 17 15 private 18 F VCSType: TVCSType;16 FBackend: TBackend; 19 17 function GetDirectory: string; 20 18 function GetRepositoryURL: string; 21 19 procedure SetDirectory(AValue: string); 22 20 procedure SetRepositoryURL(AValue: string); 23 procedure Set VCSType(AValue: TVCSType);21 procedure SetBackend(AValue: TBackend); 24 22 public 25 23 WorkingCopy: TWorkingCopy; … … 27 25 constructor Create; 28 26 destructor Destroy; override; 29 property VCSType: TVCSType read FVCSType write SetVCSType;27 property Backend: TBackend read FBackend write SetBackend; 30 28 property Directory: string read GetDirectory write SetDirectory; 31 29 property RepositoryURL: string read GetRepositoryURL write SetRepositoryURL; … … 40 38 { TProject } 41 39 42 procedure TProject.Set VCSType(AValue: TVCSType);40 procedure TProject.SetBackend(AValue: TBackend); 43 41 begin 44 if F VCSType= AValue then Exit;45 F VCSType:= AValue;42 if FBackend = AValue then Exit; 43 FBackend := AValue; 46 44 FreeAndNil(WorkingCopy); 47 case AValue of 48 vtSubversion: WorkingCopy := TSubversion.Create; 49 else WorkingCopy := TWorkingCopy.Create; 50 end; 45 WorkingCopy := AValue.WorkingCopyClass.Create; 51 46 end; 52 47 -
trunk/Units/UVCS.pas
r8 r9 19 19 procedure SetRepositoryURL(AValue: string); 20 20 protected 21 procedure ExecuteProcess(Command: string; Parameters: TStrings); virtual;21 procedure ExecuteProcess(Command: string; Parameters: array of string); virtual; 22 22 public 23 23 procedure Checkout; virtual; … … 25 25 procedure CleanUp; virtual; 26 26 procedure Commit(Message: TStrings); virtual; 27 procedure Move ; virtual;27 procedure Move(Source, Dest: string); virtual; 28 28 procedure Merge; virtual; 29 29 procedure Refresh; virtual; … … 35 35 Path: string; 36 36 end; 37 37 38 38 39 … … 57 58 end; 58 59 59 procedure TWorkingCopy.ExecuteProcess(Command: string; Parameters: TStrings);60 procedure TWorkingCopy.ExecuteProcess(Command: string; Parameters: array of string); 60 61 begin 61 62 FormConsole.Executable := Command; 62 FormConsole.Parameters.Assign(Parameters); 63 FormConsole.Parameters.Clear; 64 FormConsole.Parameters.AddStrings(Parameters); 63 65 if DirectoryExistsUTF8(Path) then FormConsole.WorkingDir := Path 64 66 else FormConsole.WorkingDir := ''; … … 86 88 end; 87 89 88 procedure TWorkingCopy.Move ;90 procedure TWorkingCopy.Move(Source, Dest: string); 89 91 begin 90 92
Note:
See TracChangeset
for help on using the changeset viewer.