Changeset 11 for trunk/Units/UVCS.pas
- Timestamp:
- May 19, 2015, 11:33:02 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Units/UVCS.pas
r10 r11 6 6 7 7 uses 8 Classes, SysUtils, FileUtil ;8 Classes, SysUtils, FileUtil, Contnrs; 9 9 10 10 type 11 12 { TLogItem } 13 14 TLogItem = class 15 Author: string; 16 Actions: string; 17 Time: TDateTime; 18 Revision: string; 19 Messages: TStringList; 20 ChangedFiles: TStringList; 21 constructor Create; 22 destructor Destroy; override; 23 end; 24 25 TLogList = class(TObjectList) 26 27 end; 11 28 12 29 { TWorkingCopy } … … 20 37 protected 21 38 procedure ExecuteProcess(Command: string; Parameters: array of string); virtual; 39 function GetNext(var Text: string; Separator: string): string; 22 40 public 41 ExecutionOutput: TStringList; 23 42 procedure Checkout; virtual; 24 43 procedure Update; virtual; … … 29 48 procedure Refresh; virtual; 30 49 procedure Add(FileName: string); virtual; 50 procedure GetLog(FileName: string; Log: TLogList); virtual; 51 constructor Create; 52 destructor Destroy; override; 31 53 property RepositoryURL: string read FRepositoryURL write SetRepositoryURL; 32 54 property Path: string read FPath write SetPath; … … 43 65 uses 44 66 UFormConsole; 67 68 { TLogItem } 69 70 constructor TLogItem.Create; 71 begin 72 Messages := TStringList.Create; 73 ChangedFiles := TStringList.Create; 74 end; 75 76 destructor TLogItem.Destroy; 77 begin 78 Messages.Free; 79 ChangedFiles.Free; 80 inherited Destroy; 81 end; 45 82 46 83 { TWorkingCopy } … … 67 104 else FormConsole.WorkingDir := ''; 68 105 FormConsole.ShowModal; 106 ExecutionOutput.Assign(FormConsole.Log); 107 end; 108 109 function TWorkingCopy.GetNext(var Text: string; Separator: string): string; 110 begin 111 if Pos(Separator, Text) > 0 then begin 112 Result := Copy(Text, 1, Pos(Separator, Text) - 1); 113 Delete(Text, 1, Pos(Separator, Text) + Length(Separator)); 114 end else begin 115 Result := Text; 116 Text := ''; 117 end; 69 118 end; 70 119 … … 109 158 end; 110 159 160 procedure TWorkingCopy.GetLog(FileName: string; Log: TLogList); 161 begin 162 Log.Clear; 163 end; 164 165 constructor TWorkingCopy.Create; 166 begin 167 ExecutionOutput := TStringList.Create; 168 FPath := ''; 169 FRepositoryURL := ''; 170 end; 171 172 destructor TWorkingCopy.Destroy; 173 begin 174 FreeAndNil(ExecutionOutput); 175 inherited Destroy; 176 end; 177 111 178 end. 112 179
Note:
See TracChangeset
for help on using the changeset viewer.