当前位置: 首页>>代码示例>>C#>>正文


C# SvnClient.RemoteCopy方法代码示例

本文整理汇总了C#中SvnClient.RemoteCopy方法的典型用法代码示例。如果您正苦于以下问题:C# SvnClient.RemoteCopy方法的具体用法?C# SvnClient.RemoteCopy怎么用?C# SvnClient.RemoteCopy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SvnClient的用法示例。


在下文中一共展示了SvnClient.RemoteCopy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ExecuteSVNTask

        protected override void ExecuteSVNTask(SvnClient client)
        {
            if (Dir == null)
            {
                Dir = new DirectoryInfo(Project.BaseDirectory);
            }

            if (!Dir.Exists)
            {
                throw new BuildException(string.Format(Resources.MissingDirectory, Dir.FullName), Location);
            }

            SVNFunctions svnFunctions = new SVNFunctions(Project, Properties);
            string sourceUri = svnFunctions.GetUriFromPath(Dir.FullName);
            Log(Level.Info, Resources.SVNCopyCopying, sourceUri, SvnUri);

            SvnCopyArgs args = new SvnCopyArgs();
            args.ThrowOnError = true;
            args.LogMessage = Message;

            SvnCommitResult result;
            client.RemoteCopy(SvnTarget.FromString(sourceUri), SvnUri, args, out result);

            if (result != null)
            {
                Log(Level.Info, Resources.SVNCopyResult, Dir.FullName, SvnUri, result.Revision, result.Author);
            }
        }
开发者ID:julienblin,项目名称:NAntConsole,代码行数:28,代码来源:SVNCopyTask.cs

示例2: createSVNTag

        private static void createSVNTag(SvnClient client, SvnUriTarget source)
        {
            ConsoleLogStartAction(Resources.UILogging.CreateSvnTag);

            Console.WriteLine(Resources.Questions.SVNDestination);
            var uriDestination = Console.ReadLine();

            var destination = new Uri(uriDestination);
            client.RemoteCopy(source, destination);

            ConsoleEndAction();
        }
开发者ID:lun471k,项目名称:OneClickToProd,代码行数:12,代码来源:Program.cs

示例3: CreateBranch

        static public void CreateBranch(Uri fromUri, Uri toUri)
        {
            using (SvnClient svnClient = new SvnClient())
            {
                try
                {
                    SvnTarget target = SvnTarget.FromUri(fromUri);
                    SvnUriTarget targetBranch = new SvnUriTarget(toUri);

                    SvnCopyArgs args = new SvnCopyArgs();
                    args.LogMessage = Properties.Settings.Default.SVN_Commit_Msg;

                    svnClient.RemoteCopy(target, toUri, args);
                }
                catch (Exception ex)
                {
                    LogMessage(ex.Message);
                }
            }
        }
开发者ID:vinodRLZ,项目名称:Test,代码行数:20,代码来源:SVNClient.cs

示例4: ChangedDirs

        public void ChangedDirs()
        {
            SvnSandBox sbox = new SvnSandBox(this);
            Uri uri = sbox.CreateRepository(SandBoxRepository.Empty);
            using (InstallHook(uri, SvnHookType.PreCommit, OnChangedDirs))
            {
                using (SvnClient cl = new SvnClient())
                {
                    SvnCreateDirectoryArgs da = new SvnCreateDirectoryArgs();
                    da.CreateParents = true;
                    da.LogMessage = "Created!";
                    cl.RemoteCreateDirectories(
                    new Uri[]
                        {
                        new Uri(uri, "a/b/c/d/e/f"),
                        new Uri(uri, "a/b/c/d/g/h"),
                        new Uri(uri, "i/j/k"),
                        new Uri(uri, "l/m/n"),
                        new Uri(uri, "l/m/n/o/p")
                        }, da);
                }
            }

            using (InstallHook(uri, SvnHookType.PreCommit, OnCopyDir))
            {
                using (SvnClient cl = new SvnClient())
                {
                    SvnCopyArgs ca = new SvnCopyArgs();
                    ca.CreateParents = true;
                    ca.LogMessage = "Created!";
                    cl.RemoteCopy(
                    new SvnUriTarget[]
                        {
                        new Uri(uri, "a/b/c/d"),
                        new Uri(uri, "i/j")
                        }, uri, ca);
                }
            }
        }
开发者ID:riiiqpl,项目名称:sharpsvn,代码行数:39,代码来源:GetChangesTests.cs

示例5: Tag

        public void Tag(string name, string taggerName, string taggerEmail, string comment, DateTime localTime, string taggedPath)
        {
            /*
            TempFile commentFile;

            var args = "tag";
            AddComment(comment, ref args, out commentFile);

            // tag names are not quoted because they cannot contain whitespace or quotes
            args += " -- " + name;

            using (commentFile)
            {
                var startInfo = GetStartInfo(args);
                startInfo.EnvironmentVariables["GIT_COMMITTER_NAME"] = taggerName;
                startInfo.EnvironmentVariables["GIT_COMMITTER_EMAIL"] = taggerEmail;
                startInfo.EnvironmentVariables["GIT_COMMITTER_DATE"] = GetUtcTimeString(localTime);

                ExecuteUnless(startInfo, null);
            }
            */
            using (var client = new SvnClient())
            {
                SvnUI.Bind(client, parentWindow);
                var svnCopyArgs = new SvnCopyArgs { LogMessage = comment, CreateParents = true, AlwaysCopyAsChild = false };

                var workingCopyUri = client.GetUriFromWorkingCopy(workingCopyPath);
                var tagsUri = client.GetUriFromWorkingCopy(tagPath);
                var sourceUri = useSvnStandardDirStructure ? client.GetUriFromWorkingCopy(trunkPath) : workingCopyUri;
                var tagUri = new Uri(useSvnStandardDirStructure ? tagsUri : workingCopyUri, name);

                var svnCommitResult = (SvnCommitResult)null;
                var result = client.RemoteCopy(sourceUri, tagUri, svnCopyArgs, out svnCommitResult);
                if (result)
                {
                    result &= client.SetRevisionProperty(svnCommitResult.RepositoryRoot, new SvnRevision(svnCommitResult.Revision), SvnPropertyNames.SvnAuthor, taggerName);
                    result &= client.SetRevisionProperty(svnCommitResult.RepositoryRoot, new SvnRevision(svnCommitResult.Revision), SvnPropertyNames.SvnDate, SvnPropertyNames.FormatDate(localTime));
                }
                result &= client.Update(workingCopyPath, new SvnUpdateArgs { AddsAsModifications = false, AllowObstructions = false, Depth = SvnDepth.Infinity, IgnoreExternals = true, KeepDepth = true, Revision = SvnRevision.Head, UpdateParents = false });
            }
        }
开发者ID:mathewng,项目名称:vss2svn,代码行数:41,代码来源:SvnWrapper.cs


注:本文中的SvnClient.RemoteCopy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。