本文整理汇总了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);
}
}
示例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;
}
}