Changeset 13 for trunk/Backends


Ignore:
Timestamp:
May 30, 2015, 1:02:36 PM (10 years ago)
Author:
chronos
Message:
  • Added: New test form where general functionality of selected backend can be tested.
  • Added: Basic git backend implementation.
  • Added: Project group form and ability to open/save group of projects as configuration to XML file.
Location:
trunk/Backends
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Backends/Bazaar/UBazaar.pas

    r10 r13  
    2020
    2121  TBazaar = class(TWorkingCopy)
     22  private
    2223  protected
    2324    procedure Execute(Parameters: array of string);
     
    3031    procedure Merge; override;
    3132    procedure Add(FileName: string); override;
     33    procedure Remove(FileName: string); override;
    3234  end;
    3335
     36  { TRepositoryBazaar }
     37
     38  TRepositoryBazaar = class(TRepository)
     39  protected
     40    procedure Execute(Parameters: array of string);
     41  public
     42    procedure Init; override;
     43  end;
     44
     45
    3446implementation
     47
     48{ TRepositoryBazaar }
     49
     50procedure TRepositoryBazaar.Execute(Parameters: array of string);
     51begin
     52  ExecuteProcess('/usr/bin/bzr', Parameters);
     53end;
     54
     55procedure TRepositoryBazaar.Init;
     56begin
     57  Execute(['init', Path]);
     58end;
    3559
    3660{ TBazaar }
     
    76100end;
    77101
     102procedure TBazaar.Remove(FileName: string);
     103begin
     104  Execute(['remove', FileName]);
     105end;
     106
    78107{ TBackendBazaar }
    79108
     
    81110begin
    82111  Name := 'Bazaar';
     112  HomePage := 'http://bazaar.canonical.com/';
    83113  WorkingCopyClass := TBazaar;
    84114end;
  • trunk/Backends/CVS/UCVS.pas

    r10 r13  
    3131    procedure Merge; override;
    3232    procedure Add(FileName: string); override;
     33    procedure Remove(FileName: string); override;
    3334  end;
    3435
     36  { TRepositoryCVS }
     37
     38  TRepositoryCVS = class(TRepository)
     39  protected
     40    procedure Execute(Parameters: array of string);
     41  public
     42    procedure Init; override;
     43  end;
     44
     45
    3546implementation
     47
     48{ TRepositoryCVS }
     49
     50procedure TRepositoryCVS.Execute(Parameters: array of string);
     51begin
     52  ExecuteProcess('/usr/bin/cvs', Parameters);
     53end;
     54
     55procedure TRepositoryCVS.Init;
     56begin
     57  Execute(['-d ' + GetCurrentDir + DirectorySeparator + Path, 'init']);
     58end;
    3659
    3760{ TBackendCVS }
     
    4063begin
    4164  Name := 'CVS';
     65  HomePage := 'http://www.nongnu.org/cvs/';
    4266  WorkingCopyClass := TCVS;
     67  RepositoryClass := TRepositoryCVS;
    4368end;
    4469
     
    5277procedure TCVS.Execute(Parameters: array of string);
    5378begin
     79  EnvVars.Values['CVSROOT'] := GetCurrentDir + DirectorySeparator + Path;
    5480  ExecuteProcess('/usr/bin/cvs', Parameters);
    5581end;
     
    93119end;
    94120
     121procedure TCVS.Remove(FileName: string);
     122begin
     123  DeleteFile(FileName);
     124  Execute(['rm', FileName]);
     125end;
     126
    95127end.
    96128
  • trunk/Backends/Subversion/USubversion.pas

    r11 r13  
    3131    procedure Merge; override;
    3232    procedure Add(FileName: string); override;
     33    procedure Remove(FileName: string); override;
    3334    procedure GetLog(FileName: string; Log: TLogList); override;
    3435  end;
    3536
     37  { TRepositorySubversion }
     38
     39  TRepositorySubversion = class(TRepository)
     40  protected
     41    procedure Execute(Parameters: array of string);
     42  public
     43    procedure Init; override;
     44  end;
     45
    3646implementation
     47
     48{ TRepositorySubversion }
     49
     50procedure TRepositorySubversion.Execute(Parameters: array of string);
     51begin
     52  ExecuteProcess('/usr/bin/svnadmin', Parameters);
     53end;
     54
     55procedure TRepositorySubversion.Init;
     56begin
     57  Execute(['create', Path]);
     58end;
    3759
    3860{ TBackendSubversion }
     
    4163begin
    4264  Name := 'Subversion';
     65  HomePage := 'https://subversion.apache.org/';
    4366  WorkingCopyClass := TSubversion;
     67  RepositoryClass := TRepositorySubversion;
    4468end;
    4569
     
    92116end;
    93117
     118procedure TSubversion.Remove(FileName: string);
     119begin
     120  Execute(['remove', FileName]);
     121end;
     122
    94123procedure TSubversion.GetLog(FileName: string; Log: TLogList);
    95124var
Note: See TracChangeset for help on using the changeset viewer.