mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 06:14:10 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
33
IDE/src/SourceControl.bf
Normal file
33
IDE/src/SourceControl.bf
Normal file
|
@ -0,0 +1,33 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
|
||||
namespace IDE
|
||||
{
|
||||
class SourceControl
|
||||
{
|
||||
void DoP4Cmd(StringView fileName)
|
||||
{
|
||||
String actualFileName = scope String();
|
||||
Path.GetActualPathName(fileName, actualFileName);
|
||||
|
||||
ProcessStartInfo psi = scope ProcessStartInfo();
|
||||
psi.SetFileName("p4.exe");
|
||||
var args = scope String();
|
||||
args.AppendF("edit -c default \"{0}\"", actualFileName);
|
||||
Debug.WriteLine("P4: {0}", args);
|
||||
psi.SetArguments(args);
|
||||
psi.UseShellExecute = false;
|
||||
psi.CreateNoWindow = true;
|
||||
|
||||
var process = scope SpawnedProcess();
|
||||
process.Start(psi).IgnoreError();
|
||||
process.WaitFor(-1);
|
||||
}
|
||||
|
||||
public void Checkout(StringView fileName)
|
||||
{
|
||||
DoP4Cmd(fileName);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue