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


C# SvnClient.GetProperty方法代码示例

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


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

示例1: ComposeForPath

        public string ComposeForPath(string wc)
        {
            // find root (where .svn reside)
            var wcRoot = SvnUtils.FindSvnWC(wc);
            if (wcRoot == null)
                throw new ApplicationException("Can't find working copy root for " + wc);

            using (_client = new SvnClient())
            {
                var wcTarg = new SvnPathTarget(wcRoot);

                SvnInfoEventArgs info;
                _client.GetInfo(wcTarg, out info);
                _cancellationToken.ThrowIfCancellationRequested();
                _repoRoot = info.RepositoryRoot;
                _requestedMergeMessageForBranch = "/" + info.Path.Trim('/') + "/";

                SvnTargetPropertyCollection mergeInfoPre;
                if (!_client.GetProperty(wcTarg, "svn:mergeinfo", new SvnGetPropertyArgs { Revision = SvnRevision.Base }, out mergeInfoPre))
                    throw new ApplicationException("Error in GetProperty");

                string mergeInfoNew;
                if (!_client.GetProperty(wcTarg, "svn:mergeinfo", out mergeInfoNew))
                    throw new ApplicationException("Error in GetProperty");

                var baseMergeInfo = new Dictionary<string, RevRangeSet>();

                if (mergeInfoPre != null && mergeInfoPre.Count != 0)
                {
                    baseMergeInfo = ParseMegeinfoLines(mergeInfoPre[0].StringValue);
                }

                var currentMergeInfo = ParseMegeinfoLines(mergeInfoNew);

                var newRevs = Subtract(currentMergeInfo, baseMergeInfo);

                LoadLogEntries(newRevs);

                return BuildMessage(newRevs);
            }
        }
开发者ID:azarkevich,项目名称:TortoiseRally,代码行数:41,代码来源:MergeMessageComposer.cs

示例2: getExternalsVersions

        private SortedList<String, String> getExternalsVersions(DirectoryInfo src)
        {
            SortedList<String, String> externals = new SortedList<String, String>();
            Log.LogMessage(MessageImportance.Normal, "fetching svn:externals for '{0}'", new object[] { src });

            using (SvnClient svn = new SvnClient())
            {
                String svnExternalsData;
                svn.GetProperty(src.FullName, SvnPropertyNames.SvnExternals, out svnExternalsData);
                Regex regexp = new Regex(@"^(\S+).*/((\d+[\._]?)+)$", RegexOptions.Multiline);
                MatchCollection matches = regexp.Matches(svnExternalsData.Replace("\r\n","\n"));
                foreach (Match match in matches)
                {
                    String externalName = match.Groups[1].Value;
                    String externalVersion = match.Groups[2].Value;
                    if (!String.IsNullOrEmpty(externalVersion))
                    {
                        externals.Add(externalName, externalVersion);
                    }
                }
                return externals;
            }
        }
开发者ID:pombredanne,项目名称:3licenses,代码行数:23,代码来源:CollectLicenses.cs


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