Changeset 10


Ignore:
Timestamp:
May 19, 2015, 10:32:51 PM (9 years ago)
Author:
chronos
Message:
  • Added: CVS backend skeleton.
Location:
trunk
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        22VCSCommander
        33VCSCommander.lps
         4Config.xml
         5heaptrclog.trc
  • trunk/Backends/Bazaar/UBazaar.pas

    r9 r10  
    2929    procedure Move(Source, Dest: string); override;
    3030    procedure Merge; override;
     31    procedure Add(FileName: string); override;
    3132  end;
    3233
     
    7071end;
    7172
     73procedure TBazaar.Add(FileName: string);
     74begin
     75  Execute(['add', FileName]);
     76end;
     77
    7278{ TBackendBazaar }
    7379
  • trunk/Backends/Subversion/USubversion.pas

    r9 r10  
    3030    procedure Move(Source, Dest: string); override;
    3131    procedure Merge; override;
     32    procedure Add(FileName: string); override;
    3233  end;
    3334
     
    8586end;
    8687
     88procedure TSubversion.Add(FileName: string);
     89begin
     90  Execute(['add', FileName]);
     91end;
     92
    8793end.
    8894
  • trunk/Forms/UFormBrowse.lfm

    r8 r10  
    9191    object AAdd: TAction
    9292      Caption = 'Add'
     93      OnExecute = AAddExecute
    9394    end
    9495    object ADelete: TAction
     
    9899    object ARename: TAction
    99100      Caption = 'Rename'
     101      OnExecute = ARenameExecute
    100102    end
    101103    object AUpdate: TAction
  • trunk/Forms/UFormBrowse.pas

    r8 r10  
    3131    Splitter1: TSplitter;
    3232    TreeView1: TTreeView;
     33    procedure AAddExecute(Sender: TObject);
    3334    procedure ADeleteExecute(Sender: TObject);
    3435    procedure AOpenExecute(Sender: TObject);
     36    procedure ARenameExecute(Sender: TObject);
    3537    procedure FormCreate(Sender: TObject);
    3638    procedure FormDestroy(Sender: TObject);
     
    4244    Directory: string;
    4345    procedure ReloadList;
     46    procedure UpdateInterface;
    4447  end;
    4548
     
    4851
    4952implementation
     53
     54uses
     55  UCore;
    5056
    5157{$R *.lfm}
     
    7076end;
    7177
     78procedure TFormBrowse.AAddExecute(Sender: TObject);
     79begin
     80  Core.Project.WorkingCopy.Add(Directory + DirectorySeparator + ListView1.Selected.Caption);
     81end;
     82
    7283procedure TFormBrowse.AOpenExecute(Sender: TObject);
    7384begin
     
    8394    end;
    8495  end;
     96end;
     97
     98procedure TFormBrowse.ARenameExecute(Sender: TObject);
     99var
     100  NewName: string;
     101begin
     102  if InputQuery('Rename', 'Enter new name', NewName) then
     103    Core.Project.WorkingCopy.Move(Directory + DirectorySeparator + ListView1.Selected.Caption, NewName);
    85104end;
    86105
     
    120139end;
    121140
     141procedure TFormBrowse.UpdateInterface;
     142begin
     143  AAdd.Enabled := Assigned(ListView1.Selected);
     144  ADelete.Enabled := Assigned(ListView1.Selected);
     145  ARename.Enabled := Assigned(ListView1.Selected);
     146  AProperties.Enabled := Assigned(ListView1.Selected);
     147end;
     148
    122149end.
    123150
  • trunk/Packages/Common

    • Property svn:ignore set to
      lib
  • trunk/Packages/TemplateGenerics

    • Property svn:ignore set to
      lib
  • trunk/UCore.pas

    r9 r10  
    6969uses
    7070  UFormMain, UFormBrowse, UFormSettings, UFormCommit, UFormCheckout,
    71   USubversion, UBazaar;
     71  USubversion, UBazaar, UCVS;
    7272
    7373{ TCore }
     
    110110  RegisterBackend(TBackendSubversion.Create);
    111111  RegisterBackend(TBackendBazaar.Create);
     112  RegisterBackend(TBackendCVS.Create);
    112113end;
    113114
  • trunk/Units/UVCS.pas

    r9 r10  
    2828    procedure Merge; virtual;
    2929    procedure Refresh; virtual;
     30    procedure Add(FileName: string); virtual;
    3031    property RepositoryURL: string read FRepositoryURL write SetRepositoryURL;
    3132    property Path: string read FPath write SetPath;
     
    103104end;
    104105
     106procedure TWorkingCopy.Add(FileName: string);
     107begin
     108
     109end;
     110
    105111end.
    106112
  • trunk/VCSCommander.lpi

    r9 r10  
    2727          <SearchPaths>
    2828            <IncludeFiles Value="$(ProjOutDir)"/>
     29            <OtherUnitFiles Value="Backends/CVS"/>
    2930            <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
    3031          </SearchPaths>
     
    8384      </Item4>
    8485    </RequiredPackages>
    85     <Units Count="14">
     86    <Units Count="15">
    8687      <Unit0>
    8788        <Filename Value="VCSCommander.lpr"/>
     
    164165        <IsPartOfProject Value="True"/>
    165166      </Unit13>
     167      <Unit14>
     168        <Filename Value="Backends/CVS/UCVS.pas"/>
     169        <IsPartOfProject Value="True"/>
     170      </Unit14>
    166171    </Units>
    167172  </ProjectOptions>
     
    173178    <SearchPaths>
    174179      <IncludeFiles Value="$(ProjOutDir)"/>
    175       <OtherUnitFiles Value="Forms;Units;Backends/Bazaar;Backends/Subversion"/>
     180      <OtherUnitFiles Value="Forms;Units;Backends/Bazaar;Backends/Subversion;Backends/CVS"/>
    176181      <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
    177182    </SearchPaths>
Note: See TracChangeset for help on using the changeset viewer.