Skip to content

Commit

Permalink
>INT Fixed Git integration with net drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
tvannini committed Sep 22, 2023
1 parent ee3cea4 commit 026970b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions work.pas
Expand Up @@ -3330,7 +3330,7 @@ function Tf_work.cvs_checkout(ObjFile: String): Boolean;

function Tf_work.cvs_checkin(ObjFile, TmpFile: String): Boolean;
var
checkinBat, Params, gitBat: string;
checkinBat, Params, gitBat, saveDir: string;
cvsSet, ResCode: Boolean;
gitCmd: TStringList;
begin
Expand Down Expand Up @@ -3361,8 +3361,8 @@ function Tf_work.cvs_checkin(ObjFile, TmpFile: String): Boolean;
begin
ObjFile := Copy(ObjFile, 1, length(ObjFile) - 1) + '*';
end;
gitCmd := TStringList.Create;
gitCmd.Add('cd ' + f_work.prgdir);
saveDir := GetCurrentDir();
gitCmd := TStringList.Create;
gitCmd.Add('git add ' + f_work.prgdir + ObjFile);
gitCmd.Add('git commit ' + f_work.prgdir + ObjFile +
' --file=' + TmpFile +
Expand All @@ -3372,11 +3372,14 @@ function Tf_work.cvs_checkin(ObjFile, TmpFile: String): Boolean;
// ___________________________________________________ Execute command ___
try
begin
SetCurrentDir(f_work.prgdir);
ExecAndWait(gitBat);
SetCurrentDir(saveDir);
ResCode := true;
end
except on E : Exception do
begin
SetCurrentDir(saveDir);
ShowMessage(E.Message);
ResCode := false;
end;
Expand Down

0 comments on commit 026970b

Please sign in to comment.