コード例 #1
0
        private void CreatePaths()
        {
            List <string> paths;

            paths = new List <string>();

            using (SvnClient client = SvnUtilities.CreateClient(this.SvnConnectionSettings))
            {
                this.OnProgressChanged(new ProgressEventArgs("Creating new directories..."));
                foreach (string str_rel_path in this.VssRelativeProjPaths)
                {
                    if (!string.IsNullOrEmpty(str_rel_path))
                    {
                        string path = Path.Combine(this.SvnFullRepositoryPath, str_rel_path);
                        if (!Directory.Exists(path))
                        {
                            paths.Add(path);
                        }
                    }
                }

                client.CreateDirectories(paths, new SvnCreateDirectoryArgs()
                {
                    CreateParents = true
                });
                string commitMessage = string.Format("VSS Porting from project: {0}. Initial directory creation.", this.VssDatabase.SrcSafeIni);
                client.Commit(this.SvnFullRepositoryPath, new SvnCommitArgs()
                {
                    LogMessage = commitMessage
                });
            }
        }