Changeset 9 for trunk/Units/UProject.pas


Ignore:
Timestamp:
May 18, 2015, 11:49:39 PM (10 years ago)
Author:
chronos
Message:
  • Added: Simple Bazaar backend.\n* Added: Support for backends dynamic registration.\n* Added: Backend selection in checkout form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Units/UProject.pas

    r8 r9  
    66
    77uses
    8   Classes, SysUtils, UVCS;
     8  Classes, SysUtils, UVCS, UBackend;
    99
    1010type
    11 
    12   TVCSType = (vtNone, vtSubversion, vtCVS, vtMercurial, vtBazaar, vzGit);
    1311
    1412{ TProject }
     
    1614  TProject = class
    1715  private
    18     FVCSType: TVCSType;
     16    FBackend: TBackend;
    1917    function GetDirectory: string;
    2018    function GetRepositoryURL: string;
    2119    procedure SetDirectory(AValue: string);
    2220    procedure SetRepositoryURL(AValue: string);
    23     procedure SetVCSType(AValue: TVCSType);
     21    procedure SetBackend(AValue: TBackend);
    2422  public
    2523    WorkingCopy: TWorkingCopy;
     
    2725    constructor Create;
    2826    destructor Destroy; override;
    29     property VCSType: TVCSType read FVCSType write SetVCSType;
     27    property Backend: TBackend read FBackend write SetBackend;
    3028    property Directory: string read GetDirectory write SetDirectory;
    3129    property RepositoryURL: string read GetRepositoryURL write SetRepositoryURL;
     
    4038{ TProject }
    4139
    42 procedure TProject.SetVCSType(AValue: TVCSType);
     40procedure TProject.SetBackend(AValue: TBackend);
    4341begin
    44   if FVCSType = AValue then Exit;
    45   FVCSType := AValue;
     42  if FBackend = AValue then Exit;
     43  FBackend := AValue;
    4644  FreeAndNil(WorkingCopy);
    47   case AValue of
    48     vtSubversion: WorkingCopy := TSubversion.Create;
    49     else WorkingCopy := TWorkingCopy.Create;
    50   end;
     45  WorkingCopy := AValue.WorkingCopyClass.Create;
    5146end;
    5247
Note: See TracChangeset for help on using the changeset viewer.