Changeset 5 for trunk/Units


Ignore:
Timestamp:
Sep 1, 2014, 7:26:35 PM (10 years ago)
Author:
chronos
Message:
  • Added: Form for console window. Working copy actions will call command line tool to perform operation.
Location:
trunk/Units
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Units/USubversion.pas

    r4 r5  
    1313
    1414  TSubversion = class(TWorkingCopy)
     15  protected
     16    procedure Execute(Command: string); override;
     17  public
    1518    procedure Checkout; override;
    1619    procedure Update; override;
     
    2528{ TSubversion }
    2629
     30procedure TSubversion.Execute(Command: string);
     31begin
     32  inherited Execute('svn ' + Command);
     33end;
     34
    2735procedure TSubversion.Checkout;
    2836begin
    29 
     37  Execute('checkout');
    3038end;
    3139
    3240procedure TSubversion.Update;
    3341begin
    34 
     42  Execute('update');
    3543end;
    3644
    3745procedure TSubversion.CleanUp;
    3846begin
    39 
     47  Execute('cleanup');
    4048end;
    4149
    4250procedure TSubversion.Commit;
    4351begin
    44 
     52  Execute('commit');
    4553end;
    4654
    4755procedure TSubversion.Move;
    4856begin
    49 
     57  Execute('move');
    5058end;
    5159
    5260procedure TSubversion.Merge;
    5361begin
    54 
     62  Execute('merge');
    5563end;
    5664
  • trunk/Units/UVCS.pas

    r4 r5  
    1616    FPath: string;
    1717    procedure SetPath(AValue: string);
     18  protected
     19    procedure Execute(Command: string); virtual;
    1820  public
    1921    procedure Checkout; virtual;
     
    3436implementation
    3537
     38uses
     39  UFormConsole;
    3640
    3741{ TWorkingCopy }
     
    3943procedure TWorkingCopy.SetPath(AValue: string);
    4044begin
    41   if FPath=AValue then Exit;
     45  if FPath = AValue then Exit;
    4246  FPath := AValue;
    4347  Refresh;
     48end;
     49
     50procedure TWorkingCopy.Execute(Command: string);
     51begin
     52  FormConsole.Executable := 'svn';
     53  FormConsole.Parameters.Add(Command);
     54  FormConsole.WorkingDir := Path;
     55  FormConsole.Perform;
    4456end;
    4557
Note: See TracChangeset for help on using the changeset viewer.