Changeset 4 for trunk/USubversion.pas
- Timestamp:
- Mar 2, 2022, 11:00:51 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
lib
svnzero
svnzero.dbg
SVNZero.lps
heaptrclog.trc
-
Property svn:ignore
set to
-
trunk/USubversion.pas
r3 r4 10 10 11 11 type 12 TSubversionInfo = record 13 Checksum: string; 14 Revision: string; 15 URL: string; 16 Path: string; 17 end; 12 18 13 19 { TExecute } … … 21 27 procedure Execute(Parameters: array of string); virtual; 22 28 procedure ExecuteOutput(Parameters: array of string); 29 function GetInfo(Text: string): TSubversionInfo; 23 30 end; 24 31 … … 97 104 end; 98 105 106 function TExecute.GetInfo(Text: string): TSubversionInfo; 107 var 108 Index: Integer; 109 Lines: TStringList; 110 I: Integer; 111 Line: string; 112 Name: string; 113 Value: string; 114 begin 115 Lines := TStringList.Create; 116 try 117 Lines.Text := Text; 118 for I := 0 to Lines.Count - 1 do begin 119 Line := Trim(Lines[I]); 120 Index := Pos(':', Line); 121 if Index > 0 then begin 122 Name := Trim(Copy(Line, 1, Index - 1)); 123 Value := Trim(Copy(Line, Index + 1, MaxInt)); 124 if Name = 'Checksum' then Result.Checksum := Value 125 else if Name = 'Revision' then Result.Revision := Value 126 else if Name = 'Path' then Result.Path := Value 127 else if Name = 'URL' then Result.URL := Value; 128 end; 129 end; 130 finally 131 Lines.Free; 132 end; 133 end; 134 99 135 { TSubversionAdmin } 100 136
Note:
See TracChangeset
for help on using the changeset viewer.