• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Subversion.SvnRevision类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MonoDevelop.VersionControl.Subversion.SvnRevision的典型用法代码示例。如果您正苦于以下问题:C# SvnRevision类的具体用法?C# SvnRevision怎么用?C# SvnRevision使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SvnRevision类属于MonoDevelop.VersionControl.Subversion命名空间,在下文中一共展示了SvnRevision类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Status

		public virtual IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision revision)
		{
			return Status (repo, path, revision, false, false, false);
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:4,代码来源:SubversionVersionControl.cs


示例2: Status

		public abstract IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision revision, bool descendDirs, bool changedItemsOnly, bool remoteStatus);
开发者ID:gAdrev,项目名称:monodevelop,代码行数:1,代码来源:SubversionVersionControl.cs


示例3: CreateVersionInfo

		static VersionInfo CreateVersionInfo (Repository repo, SvnStatusEventArgs ent)
		{
			VersionStatus rs = VersionStatus.Unversioned;
			Revision rr = null;

			// TODO: Fix remote status for Win32 Svn.
			if (ent.IsRemoteUpdated) {
				rs = ConvertStatus (SvnSchedule.Normal, ent.RemoteContentStatus);
				rr = new SvnRevision (repo, (int) ent.RemoteUpdateRevision, ent.RemoteUpdateCommitTime,
									  ent.RemoteUpdateCommitAuthor, "(unavailable)", null);
			}

			SvnSchedule sched = ent.WorkingCopyInfo != null ? ent.WorkingCopyInfo.Schedule : SvnSchedule.Normal;
			VersionStatus status = ConvertStatus (sched, ent.LocalContentStatus);

			bool readOnly = File.Exists (ent.FullPath) && (File.GetAttributes (ent.FullPath) & FileAttributes.ReadOnly) != 0;

			if (ent.WorkingCopyInfo != null) {
				if (ent.RemoteLock != null || ent.WorkingCopyInfo.LockToken != null) {
					status |= VersionStatus.LockRequired;
					if (ent.WorkingCopyInfo.LockToken != null || (ent.RemoteLock != null && ent.RemoteLock.Token != null))
						status |= VersionStatus.LockOwned;
					else
						status |= VersionStatus.Locked;
				}
				else if (readOnly)
					status |= VersionStatus.LockRequired;
			}

			string repoPath = ent.Uri != null ? ent.Uri.ToString () : null;
			SvnRevision newRev = null;
			if (ent.WorkingCopyInfo != null)
				newRev = new SvnRevision (repo, (int) ent.WorkingCopyInfo.Revision);

			VersionInfo ret = new VersionInfo (ent.FullPath, repoPath, ent.NodeKind == SvnNodeKind.Directory,
											   status, newRev,
											   rs, rr);
			return ret;
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:39,代码来源:SvnSharpClient.cs


示例4: GetAnnotations

		public override Annotation[] GetAnnotations (Repository repo, FilePath file, SvnRevision revStart, SvnRevision revEnd)
		{
			if (file == FilePath.Null)
				throw new ArgumentNullException ();

			SvnPathTarget target = new SvnPathTarget (file, SharpSvn.SvnRevision.Base);
			MemoryStream data = new MemoryStream ();
			int numAnnotations = 0;
			client.Write (target, data);

			using (StreamReader reader = new StreamReader (data)) {
				reader.BaseStream.Seek (0, SeekOrigin.Begin);
				while (reader.ReadLine () != null)
					numAnnotations++;
			}

			System.Collections.ObjectModel.Collection<SvnBlameEventArgs> list;
			SvnBlameArgs args = new SvnBlameArgs ();
			args.Start = GetRevision (revStart);
			args.End = GetRevision (revEnd);

			if (client.GetBlame (target, args, out list)) {
				Annotation[] annotations = new Annotation [numAnnotations];
				foreach (var annotation in list) {
					if (annotation.LineNumber < annotations.Length)
						annotations [(int)annotation.LineNumber] = new Annotation (annotation.Revision.ToString (),
																					annotation.Author, annotation.Time);
				}
				return annotations;
			}
			return new Annotation[0];
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:32,代码来源:SvnSharpClient.cs


示例5: GetAnnotations

		/// <summary>
		/// Get annotations for a versioned file.
		/// </summary>
		/// <returns>
		/// A <see cref="System.String"/> annotation for each line in file.
		/// </returns>
		public virtual Annotation[] GetAnnotations (Repository repo, FilePath file, SvnRevision revStart, SvnRevision revEnd)
		{
			return new Annotation[0];
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:10,代码来源:SubversionVersionControl.cs


示例6: Status

		public override IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision revision, bool descendDirs, bool changedItemsOnly, bool remoteStatus)
		{
			List<VersionInfo> list = new List<VersionInfo> ();
			SvnStatusArgs args = new SvnStatusArgs ();
			args.Revision = GetRevision (revision);
			args.Depth = descendDirs ? SvnDepth.Infinity : SvnDepth.Children;
			args.RetrieveAllEntries = !changedItemsOnly;
			args.RetrieveRemoteStatus = remoteStatus;
			lock (client) {
				try {
					client.Status (path, args, delegate (object o, SvnStatusEventArgs a) {
						list.Add (CreateVersionInfo (repo, a));
					});
				} catch (SvnInvalidNodeKindException e) {
					if (e.SvnErrorCode == SvnErrorCode.SVN_ERR_WC_NOT_WORKING_COPY)
						list.Add (VersionInfo.CreateUnversioned (e.File, true));
					else if (e.SvnErrorCode == SvnErrorCode.SVN_ERR_WC_NOT_FILE)
						list.Add (VersionInfo.CreateUnversioned (e.File, false));
					else
						throw;
				}
			}
			return list;
		}
开发者ID:GCrean,项目名称:monodevelop,代码行数:24,代码来源:SvnSharpClient.cs


示例7: Log

		public override IEnumerable<SvnRevision> Log (Repository repo, FilePath path, SvnRevision revisionStart, SvnRevision revisionEnd)
		{
			List<SvnRevision> list = new List<SvnRevision> ();
			SvnLogArgs args = new SvnLogArgs ();
			args.Range = new SvnRevisionRange (GetRevision (revisionStart), GetRevision (revisionEnd));
			lock (client) 
				client.Log (path, args, delegate (object o, SvnLogEventArgs a) {
				List<RevisionPath> paths = new List<RevisionPath> ();
				foreach (SvnChangeItem item in a.ChangedPaths) {
					paths.Add (new RevisionPath (item.Path, ConvertRevisionAction (item.Action), ""));
				}
				SvnRevision r = new SvnRevision (repo, (int) a.Revision, a.Time, a.Author, a.LogMessage, paths.ToArray ());
				list.Add (r);
			});
			return list;
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:16,代码来源:SvnSharpClient.cs


示例8: Move

		public abstract void Move (FilePath srcPath, FilePath destPath, SvnRevision rev, bool force, ProgressMonitor monitor);
开发者ID:gAdrev,项目名称:monodevelop,代码行数:1,代码来源:SubversionVersionControl.cs


示例9: ListUrl

		public override IEnumerable<DirectoryEntry> ListUrl (string url, bool recurse, SvnRevision rev)
		{
			return List (new SvnUriTarget (url, GetRevision (rev)), recurse);
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:4,代码来源:SvnSharpClient.cs


示例10: List

		public override IEnumerable<DirectoryEntry> List (FilePath path, bool recurse, SvnRevision rev)
		{
			return List (new SvnPathTarget (path, GetRevision (rev)), recurse);
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:4,代码来源:SvnSharpClient.cs


示例11: Status

		public override IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision revision, bool descendDirs, bool changedItemsOnly, bool remoteStatus)
		{
			var list = new List<VersionInfo> ();
			var args = new SvnStatusArgs {
				Revision = GetRevision (revision),
				Depth = descendDirs ? SvnDepth.Infinity : SvnDepth.Children,
				RetrieveAllEntries = !changedItemsOnly,
				RetrieveRemoteStatus = remoteStatus,
			};
			lock (client) {
				try {
					client.Status (path, args, (o, a) => list.Add (CreateVersionInfo (repo, a)));
				} catch (SvnInvalidNodeKindException e) {
					if (e.SvnErrorCode == SvnErrorCode.SVN_ERR_WC_NOT_WORKING_COPY)
						list.Add (VersionInfo.CreateUnversioned (e.File, true));
					else if (e.SvnErrorCode == SvnErrorCode.SVN_ERR_WC_NOT_FILE)
						list.Add (VersionInfo.CreateUnversioned (e.File, false));
					else
						throw;
				} catch (SvnWorkingCopyPathNotFoundException e) {
					var fp = new FilePath (e.File);
					list.Add (VersionInfo.CreateUnversioned (fp, fp.IsDirectory));
				}
			}
			return list;
		}
开发者ID:sheff146,项目名称:monodevelop,代码行数:26,代码来源:SvnSharpClient.cs


示例12: Move

		public override void Move (FilePath srcPath, FilePath destPath, SvnRevision rev, bool force, ProgressMonitor monitor)
		{
			var args = new SvnMoveArgs {
				Force = force,
			};
			BindMonitor (monitor);
			lock (client) 
				client.Move (srcPath, destPath, args);
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:9,代码来源:SvnSharpClient.cs


示例13: Log

		public override IEnumerable<SvnRevision> Log (Repository repo, FilePath path, SvnRevision revisionStart, SvnRevision revisionEnd)
		{
			var list = new List<SvnRevision> ();
			var args = new SvnLogArgs {
				Range = new SvnRevisionRange (GetRevision (revisionStart), GetRevision (revisionEnd)),
			};
			lock (client)
				client.Log (path, args, (o, a) =>
					list.Add (new SvnRevision (repo, (int)a.Revision, a.Time, a.Author, a.LogMessage,
						a.ChangedPaths == null ? new RevisionPath[0] : a.ChangedPaths.Select (item => new RevisionPath (item.Path, ConvertRevisionAction (item.Action), "")).ToArray ())));
			return list;
		}
开发者ID:gAdrev,项目名称:monodevelop,代码行数:12,代码来源:SvnSharpClient.cs


示例14: List

		public abstract IEnumerable<DirectoryEntry> List (FilePath path, bool recurse, SvnRevision rev);
开发者ID:gAdrev,项目名称:monodevelop,代码行数:1,代码来源:SubversionVersionControl.cs


示例15: Move

		public override void Move (FilePath srcPath, FilePath destPath, SvnRevision rev, bool force, IProgressMonitor monitor)
		{
			SvnMoveArgs args = new SvnMoveArgs ();
			BindMonitor (args, monitor);
			args.Force = force;
			lock (client) 
				client.Move (srcPath, destPath, args);
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:8,代码来源:SvnSharpClient.cs


示例16: ListUrl

		public abstract IEnumerable<DirectoryEntry> ListUrl (string url, bool recurse, SvnRevision rev);
开发者ID:gAdrev,项目名称:monodevelop,代码行数:1,代码来源:SubversionVersionControl.cs


示例17: GetUnifiedDiff

		public override string GetUnifiedDiff (FilePath path1, SvnRevision revision1, FilePath path2, SvnRevision revision2, bool recursive)
		{
			SvnPathTarget t1 = new SvnPathTarget (path1, GetRevision (revision1));
			SvnPathTarget t2 = new SvnPathTarget (path2, GetRevision (revision2));
			SvnDiffArgs args = new SvnDiffArgs ();
			args.Depth = recursive ? SvnDepth.Infinity : SvnDepth.Children;
			MemoryStream ms = new MemoryStream ();
			lock (client) 
				client.Diff (t1, t2, args, ms);
			ms.Position = 0;
			using (StreamReader sr = new StreamReader (ms)) {
				return sr.ReadToEnd ();
			}
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:14,代码来源:SvnSharpClient.cs


示例18: GetUnifiedDiff

		public abstract string GetUnifiedDiff (FilePath path1, SvnRevision revision1, FilePath path2, SvnRevision revision2, bool recursive);
开发者ID:gAdrev,项目名称:monodevelop,代码行数:1,代码来源:SubversionVersionControl.cs


示例19: Status

		public override IEnumerable<VersionInfo> Status (Repository repo, FilePath path, SvnRevision revision, bool descendDirs, bool changedItemsOnly, bool remoteStatus)
		{
			List<VersionInfo> list = new List<VersionInfo> ();
			SvnStatusArgs args = new SvnStatusArgs ();
			args.Revision = GetRevision (revision);
			args.Depth = descendDirs ? SvnDepth.Infinity : SvnDepth.Children;
			args.RetrieveAllEntries = !changedItemsOnly;
			args.RetrieveRemoteStatus = remoteStatus;
			lock (client) 
				client.Status (path, args, delegate (object o, SvnStatusEventArgs a) {
					list.Add (CreateVersionInfo (repo, a));
				});
			return list;
		}
开发者ID:llucenic,项目名称:monodevelop,代码行数:14,代码来源:SvnSharpClient.cs


示例20: Log

		public abstract IEnumerable<SvnRevision> Log (Repository repo, FilePath path, SvnRevision revisionStart, SvnRevision revisionEnd);
开发者ID:gAdrev,项目名称:monodevelop,代码行数:1,代码来源:SubversionVersionControl.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Unix.LibSvnClient类代码示例发布时间:2022-05-26
下一篇:
C# Git.GitRevision类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap