示例#1
0
        SVNIntegration()
        {
            EditorApplication.update += EditorUpdate;
            asyncSvnStatusOperation   = new AsyncCommandLineOperation(new CommandLine("svn", "status --non-interactive --xml -v -u", Application.dataPath), (source, e) =>
            {
                svnStatusDatabase.Clear();
                HandleSVNStatusUpdate(e.output, true);
            });

            syncSvnStatusOperation = new SyncCommandLineOperation(new CommandLine("svn", "status --non-interactive --xml -v -u", Application.dataPath), (source, e) =>
            {
                svnStatusDatabase.Clear();
                HandleSVNStatusUpdate(e.output, false);
            });

            asyncLocalSvnStatusOperation = new AsyncCommandLineOperation(new CommandLine("svn", "status --non-interactive --xml", Application.dataPath), (source, e) =>
            {
                HandleSVNStatusUpdate(e.output, true);
            });

            syncLocalSvnStatusOperation = new SyncCommandLineOperation(new CommandLine("svn", "status --non-interactive --xml", Application.dataPath), (source, e) =>
            {
                HandleSVNStatusUpdate(e.output, false);
            });
        }
示例#2
0
        public static CommandLineOperation CreateSVNAction(string action, bool asynchronous, IEnumerable <string> assets, CommandLine.ExecutionFinishedHandler finishedHandler)
        {
            string workingDirectory = Application.dataPath + "\\..\\";
            string arguments        = action;

            if (assets.Count() > 0)
            {
                arguments += " \"" + assets.Aggregate((i, j) => i + "\" \"" + j) + "\"";
            }
            CommandLineOperation operation;

            if (asynchronous)
            {
                operation = new AsyncCommandLineOperation(new CommandLine("svn", "--non-interactive " + arguments, workingDirectory), finishedHandler);
            }
            else
            {
                operation = new SyncCommandLineOperation(new CommandLine("svn", "--non-interactive " + arguments, workingDirectory), finishedHandler);
            }

            return(operation);
        }