當前位置: 首頁>>代碼示例>>C#>>正文


C# VersionControl.Revision類代碼示例

本文整理匯總了C#中MonoDevelop.VersionControl.Revision的典型用法代碼示例。如果您正苦於以下問題:C# Revision類的具體用法?C# Revision怎麽用?C# Revision使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Revision類屬於MonoDevelop.VersionControl命名空間,在下文中一共展示了Revision類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: RevertRevisions

		private static bool RevertRevisions (Repository vc, string path, Revision revision, bool test, bool toRevision)
		{
			try {
				if (test) {
					return (vc.CanRevert (path));
				}
				
				string question = GettextCatalog.GetString (
				  "Are you sure you want to revert the selected resources to the revision specified (all local changes will be discarded)?");
				
				if (!toRevision)
					question = GettextCatalog.GetString (
					  "Are you sure you want to revert the changes from the revision selected on these resources?");
				
				if (MessageService.AskQuestion (question, 
				                                GettextCatalog.GetString ("Note: The reversion will occur in your working copy, so you will still need to perform a commit to complete it."),
				                                AlertButton.Cancel, AlertButton.Revert) != AlertButton.Revert)
					return false;

				new RevertWorker(vc, path, revision, toRevision).Start();
				return true;
			}
			catch (Exception ex) {
				if (test)
					LoggingService.LogError (ex.ToString ());
				else
					MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
				return false;
			}
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:30,代碼來源:RevertRevisionsCommands.cs

示例2: VersionInfo

		public VersionInfo (FilePath localPath, string repositoryPath, bool isDirectory, VersionStatus status, Revision revision, VersionStatus remoteStatus, Revision remoteRevision)
		{
			this.localPath = localPath;
			this.repositoryPath = repositoryPath;
			this.isDirectory = isDirectory;
			this.status = status;
			this.revision = revision;
			this.remoteStatus = remoteStatus;
			this.remoteRevision = remoteRevision;
		}
開發者ID:Kalnor,項目名稱:monodevelop,代碼行數:10,代碼來源:VersionInfo.cs

示例3: RevertToRevision

		public static bool RevertToRevision (Repository vc, string path, Revision revision, bool test)
		{
			return RevertRevisions (vc, path, revision, test, true);
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:4,代碼來源:RevertRevisionsCommands.cs

示例4: GetTextAtRevision

		public override string GetTextAtRevision(FilePath repositoryPath, Revision revision)
		{
			throw new NotImplementedException();
		}
開發者ID:yvanjanssens,項目名稱:monodevelop-git,代碼行數:4,代碼來源:GitRepository.cs

示例5: Checkout

		public override void Checkout(FilePath targetLocalPath, Revision rev, bool recurse, IProgressMonitor monitor)
		{
			throw new NotImplementedException();
		}
開發者ID:yvanjanssens,項目名稱:monodevelop-git,代碼行數:4,代碼來源:GitRepository.cs

示例6: Checkout

		public override void Checkout (FilePath path, Revision rev, bool recurse, IProgressMonitor monitor)
		{
		}
開發者ID:Tak,項目名稱:monodevelop-novell,代碼行數:3,代碼來源:UnknownRepository.cs

示例7: GetTextAtRevision

		public override string GetTextAtRevision (FilePath repositoryPath, Revision revision)
		{
			return null;
		}
開發者ID:Tak,項目名稱:monodevelop-novell,代碼行數:4,代碼來源:UnknownRepository.cs

示例8: Annotation

		public Annotation (Revision revision, string author, DateTime date)
		{
			this.Revision = revision;
			this.Author = author;
			this.Date = date;
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:6,代碼來源:Repository.cs

示例9: GetAnnotations

		/// <summary>
		/// Retrieves annotations for a given path in the repository.
		/// </summary>
		/// <param name="repositoryPath">
		/// A <see cref="FilePath"/>
		/// </param>
		/// <param name="since">
		/// A <see cref="Revision"/>
		/// </param>
		/// <returns>
		/// A <see cref="Annotation"/> corresponding to each line 
		/// of the file to which repositoryPath points.
		/// </returns>
		public virtual Annotation [] GetAnnotations (FilePath repositoryPath, Revision since)
		{
			return new Annotation[0];
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:17,代碼來源:Repository.cs

示例10: GetRevisionChanges

		/// <summary>
		/// Returns the list of changes done in the given revision
		/// </summary>
		/// <param name='revision'>
		/// A revision
		/// </param>
		public RevisionPath[] GetRevisionChanges (Revision revision)
		{
			return OnGetRevisionChanges (revision);
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:10,代碼來源:Repository.cs

示例11: GetTextAtRevision

		public abstract string GetTextAtRevision (FilePath repositoryPath, Revision revision);
開發者ID:nieve,項目名稱:monodevelop,代碼行數:1,代碼來源:Repository.cs

示例12: RevertToRevision

		public abstract void RevertToRevision (FilePath localPath, Revision revision, IProgressMonitor monitor);
開發者ID:nieve,項目名稱:monodevelop,代碼行數:1,代碼來源:Repository.cs

示例13: Checkout

		public abstract void Checkout (FilePath targetLocalPath, Revision rev, bool recurse, IProgressMonitor monitor);
開發者ID:nieve,項目名稱:monodevelop,代碼行數:1,代碼來源:Repository.cs

示例14: GetHistory

		// Returns the revision history of a file
		public abstract Revision[] GetHistory (FilePath localFile, Revision since);
開發者ID:nieve,項目名稱:monodevelop,代碼行數:2,代碼來源:Repository.cs

示例15: RevertWorker

			public RevertWorker(Repository vc, string path, Revision revision, bool toRevision) {
				this.vc = vc;
				this.path = path;
				this.revision = revision;
				this.toRevision = toRevision;
			}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:6,代碼來源:RevertRevisionsCommands.cs


注:本文中的MonoDevelop.VersionControl.Revision類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。