Changeset 8 for trunk/Units/UVCS.pas


Ignore:
Timestamp:
May 18, 2015, 12:15:30 AM (10 years ago)
Author:
chronos
Message:
  • Added: Checkout form and ability to checkout new working copy.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Units/UVCS.pas

    r7 r8  
    66
    77uses
    8   Classes, SysUtils;
     8  Classes, SysUtils, FileUtil;
    99
    1010type
     
    1515  private
    1616    FPath: string;
     17    FRepositoryURL: string;
    1718    procedure SetPath(AValue: string);
     19    procedure SetRepositoryURL(AValue: string);
    1820  protected
    1921    procedure ExecuteProcess(Command: string; Parameters: TStrings); virtual;
     
    2628    procedure Merge; virtual;
    2729    procedure Refresh; virtual;
     30    property RepositoryURL: string read FRepositoryURL write SetRepositoryURL;
    2831    property Path: string read FPath write SetPath;
    2932  end;
     
    4851end;
    4952
     53procedure TWorkingCopy.SetRepositoryURL(AValue: string);
     54begin
     55  if FRepositoryURL=AValue then Exit;
     56  FRepositoryURL:=AValue;
     57end;
     58
    5059procedure TWorkingCopy.ExecuteProcess(Command: string; Parameters: TStrings);
    5160begin
    5261  FormConsole.Executable := Command;
    5362  FormConsole.Parameters.Assign(Parameters);
    54   FormConsole.WorkingDir := Path;
     63  if DirectoryExistsUTF8(Path) then FormConsole.WorkingDir := Path
     64    else FormConsole.WorkingDir := '';
    5565  FormConsole.ShowModal;
    5666end;
Note: See TracChangeset for help on using the changeset viewer.