Exemplo n.º 1
0
        static void Main(string[] args)
        {
            string wkspath    = args[0];
            string branchSpec = args[1];
            string editor     = args[2];

            string outputfile = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString() + ".patch");

            if (File.Exists(outputfile))
            {
                File.Delete(outputfile);
            }

            string cmPathCommand = string.Format(PATCH_COMMAND, branchSpec, outputfile);

            if (args.Length == 4)
            {
                cmPathCommand += string.Format(USE_TOOL, args[3]);
            }

            CmdRunner.ExecuteCommand(cmPathCommand, wkspath);
            ExecuteEditor(editor, outputfile);
        }