Changeset 15 for trunk/Units
- Timestamp:
- Jul 13, 2015, 11:44:23 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Units/UVCS.pas
r13 r15 25 25 TLogList = class(TObjectList) 26 26 27 end; 28 29 TFileStatusState = (fssNonVersioned, fssAdded, fssRemoved, fssModified, fssNotModified); 30 31 { TFileStatus } 32 33 TFileStatus = class 34 FileName: string; 35 Version: string; 36 Author: string; 37 Time: TDateTime; 38 State: TFileStatusState; 39 procedure Assign(Source: TFileStatus); 40 end; 41 42 { TFileStatusList } 43 44 TFileStatusList = class(TObjectList) 45 function SearchByName(Name: string): TFileStatus; 27 46 end; 28 47 … … 54 73 procedure Remove(FileName: string); virtual; 55 74 procedure GetLog(FileName: string; Log: TLogList); virtual; 75 procedure GetStatus(FileName: string; Status: TFileStatusList); virtual; 56 76 constructor Create; 57 77 destructor Destroy; override; … … 76 96 function URLFromDirectory(DirName: string; Relative: Boolean): string; 77 97 98 const 99 FileStatusStateText: array[TFileStatusState] of string = ('Not versioned', 100 'Added', 'Removed', 'Modified', 'Normal'); 101 78 102 implementation 79 103 … … 86 110 if Relative then Result := GetCurrentDirUTF8 + DirectorySeparator + Result; 87 111 Result := 'file:///' + StringReplace(Result, DirectorySeparator, '/', [rfReplaceAll]); 112 end; 113 114 { TFileStatus } 115 116 procedure TFileStatus.Assign(Source: TFileStatus); 117 begin 118 FileName := Source.FileName; 119 Version := Source.Version; 120 Time := Source.Time; 121 Author := Source.Author; 122 State := Source.State; 123 end; 124 125 { TFileStatusList } 126 127 function TFileStatusList.SearchByName(Name: string): TFileStatus; 128 var 129 I: Integer; 130 begin 131 I := 0; 132 while (I < Count) and (TFileStatus(Items[I]).FileName <> Name) do Inc(I); 133 if I < Count then Result := TFileStatus(Items[I]) 134 else Result := nil; 88 135 end; 89 136 … … 222 269 end; 223 270 271 procedure TWorkingCopy.GetStatus(FileName: string; Status: TFileStatusList); 272 begin 273 Status.Clear; 274 end; 275 224 276 constructor TWorkingCopy.Create; 225 277 begin
Note:
See TracChangeset
for help on using the changeset viewer.