Changeset 6 for trunk/Units


Ignore:
Timestamp:
May 6, 2015, 11:19:49 AM (10 years ago)
Author:
chronos
Message:
  • Added: Now opened projects are remembered between application restarts.
  • Added: Show basic list of files in selected project.
  • Added: Packages Common and TemplateGenerics.
Location:
trunk/Units
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Units/USubversion.pas

    r5 r6  
    1414  TSubversion = class(TWorkingCopy)
    1515  protected
    16     procedure Execute(Command: string); override;
     16    procedure Execute(Parameters: array of string);
    1717  public
    1818    procedure Checkout; override;
     
    2828{ TSubversion }
    2929
    30 procedure TSubversion.Execute(Command: string);
     30procedure TSubversion.Execute(Parameters: array of string);
     31var
     32  Params: TStringList;
    3133begin
    32   inherited Execute('svn ' + Command);
     34  Params := TStringList.Create;
     35  try
     36    Params.AddStrings(Parameters);
     37    ExecuteProcess('svn', Params);
     38  finally
     39    Params.Free;
     40  end;
    3341end;
    3442
    3543procedure TSubversion.Checkout;
    3644begin
    37   Execute('checkout');
     45  Execute(['checkout']);
    3846end;
    3947
    4048procedure TSubversion.Update;
    4149begin
    42   Execute('update');
     50  Execute(['update']);
    4351end;
    4452
    4553procedure TSubversion.CleanUp;
    4654begin
    47   Execute('cleanup');
     55  Execute(['cleanup']);
    4856end;
    4957
    5058procedure TSubversion.Commit;
    5159begin
    52   Execute('commit');
     60  Execute(['commit']);
    5361end;
    5462
    5563procedure TSubversion.Move;
    5664begin
    57   Execute('move');
     65  Execute(['move']);
    5866end;
    5967
    6068procedure TSubversion.Merge;
    6169begin
    62   Execute('merge');
     70  Execute(['merge']);
    6371end;
    6472
  • trunk/Units/UVCS.pas

    r5 r6  
    1717    procedure SetPath(AValue: string);
    1818  protected
    19     procedure Execute(Command: string); virtual;
     19    procedure ExecuteProcess(Command: string; Parameters: TStrings); virtual;
    2020  public
    2121    procedure Checkout; virtual;
     
    4848end;
    4949
    50 procedure TWorkingCopy.Execute(Command: string);
     50procedure TWorkingCopy.ExecuteProcess(Command: string; Parameters: TStrings);
    5151begin
    52   FormConsole.Executable := 'svn';
    53   FormConsole.Parameters.Add(Command);
     52  FormConsole.Executable := Command;
     53  FormConsole.Parameters.Assign(Parameters);
    5454  FormConsole.WorkingDir := Path;
    55   FormConsole.Perform;
     55  FormConsole.ShowModal;
    5656end;
    5757
Note: See TracChangeset for help on using the changeset viewer.