public override void Add(IEnumerable <string> assetPaths, bool includeMeta, bool wait = false)
        {
            if (!assetPaths.Any())
            {
                return;
            }

            foreach (var path in assetPaths)
            {
                if (!WiseSVNIntegration.CheckAndAddParentFolderIfNeeded(path, true))
                {
                    return;
                }
            }

            // Don't give versioned metas, as tortoiseSVN doesn't like it.
            var metas = assetPaths
                        .Select(path => path + ".meta")
                        .Where(path => WiseSVNIntegration.GetStatus(path).Status == VCFileStatus.Unversioned)
            ;

            var pathsArg = AssetPathsToContextPaths(includeMeta ? assetPaths.Concat(metas) : assetPaths, false);

            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:add /path:\"{pathsArg}\"", wait);

            if (!string.IsNullOrEmpty(result.Error))
            {
                Debug.LogError($"SVN Error: {result.Error}");
            }
        }
        public override void Cleanup(bool wait = false)
        {
            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:cleanup /path:\"{WiseSVNIntegration.ProjectRoot}\"", wait);

            if (!string.IsNullOrEmpty(result.Error))
            {
                Debug.LogError($"SVN Error: {result.Error}");
            }
        }
        public override void DiffChanges(string assetPath, bool wait = false)
        {
            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:diff /path:\"{AssetPathToContextPaths(assetPath, false)}\"", wait);

            if (!string.IsNullOrEmpty(result.Error))
            {
                Debug.LogError($"SVN Error: {result.Error}");
            }
        }
 private ShellUtils.ShellResult ExecuteCommand(string command, string fileArgument, string workingFolder, bool waitForOutput)
 {
     return(ShellUtils.ExecuteCommand(new ShellUtils.ShellArgs()
     {
         Command = ClientCommand,
         Args = string.IsNullOrEmpty(fileArgument) ? command : $"{command} {fileArgument}",
         WorkingDirectory = workingFolder,
         WaitForOutput = waitForOutput,
         WaitTimeout = -1,
     }));
 }
        public override void Commit(IEnumerable <string> assetPaths, bool includeMeta, bool wait = false)
        {
            if (!assetPaths.Any())
            {
                return;
            }

            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:commit /path:\"{AssetPathsToContextPaths(assetPaths, includeMeta)}\"", wait);

            if (!string.IsNullOrEmpty(result.Error))
            {
                Debug.LogError($"SVN Error: {result.Error}");
            }
        }
        public override void Switch(string localPath, string url, bool wait = false)
        {
            if (string.IsNullOrEmpty(localPath) || string.IsNullOrEmpty(url))
            {
                return;
            }

            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:switch /path:\"{localPath}\" /url:\"{url}\"", wait);

            if (!string.IsNullOrEmpty(result.Error))
            {
                Debug.LogError($"SVN Error: {result.Error}");
            }
        }
        public override void RepoBrowser(string url, bool wait = false)
        {
            if (string.IsNullOrEmpty(url))
            {
                return;
            }

            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:repobrowser /path:\"{url}\"", wait);

            if (!string.IsNullOrEmpty(result.Error))
            {
                Debug.LogError($"SVN Error: {result.Error}");
            }
        }
        public override void Blame(string assetPath, bool wait = false)
        {
            if (string.IsNullOrEmpty(assetPath))
            {
                return;
            }

            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:blame /path:\"{AssetPathToContextPaths(assetPath, false)}\"", wait);

            if (!string.IsNullOrEmpty(result.error))
            {
                Debug.LogError($"SVN Error: {result.error}");
            }
        }
        public override void Resolve(string assetPath, bool wait = false)
        {
            if (System.IO.Directory.Exists(assetPath))
            {
                var resolveResult = ShellUtils.ExecuteCommand(ClientCommand, $"/command:resolve /path:\"{AssetPathToContextPaths(assetPath, false)}\"", wait);
                if (!string.IsNullOrEmpty(resolveResult.Error))
                {
                    Debug.LogError($"SVN Error: {resolveResult.Error}");
                }

                return;
            }

            var result = ShellUtils.ExecuteCommand(ClientCommand, $"/command:conflicteditor /path:\"{AssetPathToContextPaths(assetPath, false)}\"", wait);

            if (!string.IsNullOrEmpty(result.Error))
            {
                Debug.LogError($"SVN Error: {result.Error}");
            }
        }