Changeset 13 for trunk/Backends/CVS


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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.