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


C# VersionControl.Repository類代碼示例

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


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

示例1: Revision

		protected Revision (Repository repo, DateTime time, string author, string message)
		{
			this.repo = repo;
			this.Time = time;
			this.Author = author;
			this.Message = message;
		}
開發者ID:sushihangover,項目名稱:monodevelop,代碼行數:7,代碼來源:Revision.cs

示例2: VersionControlItem

		public VersionControlItem (Repository repository, IWorkspaceObject workspaceObject, FilePath path, bool isDirectory)
		{
			this.path = path;
			this.repository = repository;
			this.workspaceObject = workspaceObject;
			this.isDirectory = isDirectory;
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:7,代碼來源:VersionControlItem.cs

示例3: 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

示例4: Commit

		public static void Commit (Repository vc, ChangeSet changeSet)
		{
			try {
				if (vc.GetVersionInfo (changeSet.BaseLocalPath).CanCommit) {
					if (!VersionControlService.NotifyPrepareCommit (vc, changeSet))
						return;

					CommitDialog dlg = new CommitDialog (changeSet);
					try {
						if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
							if (VersionControlService.NotifyBeforeCommit (vc, changeSet)) {
								new CommitWorker (vc, changeSet, dlg).Start();
								return;
							}
						}
						dlg.EndCommit (false);
					} finally {
						dlg.Destroy ();
					}
					VersionControlService.NotifyAfterCommit (vc, changeSet, false);
				}
			}
			catch (Exception ex) {
					MessageService.ShowException (ex, GettextCatalog.GetString ("Version control command failed."));
			}
		}
開發者ID:telebovich,項目名稱:monodevelop,代碼行數:26,代碼來源:CommitCommand.cs

示例5: CommitWorker

			public CommitWorker (Repository vc, ChangeSet changeSet, CommitDialog dlg)
			{
				this.vc = vc;
				this.changeSet = changeSet;
				this.dlg = dlg;
				OperationType = VersionControlOperationType.Push;
			}
開發者ID:johnkg,項目名稱:monodevelop,代碼行數:7,代碼來源:CommitCommand.cs

示例6: ModifyPath

		protected override void ModifyPath (Repository repo, ref FilePath old)
		{
			var repo2 = (GitRepository)repo;
			old = repo2.RootRepository.Info.WorkingDirectory;
			repo2.RootRepository.Config.Set<string> ("user.name", Author);
			repo2.RootRepository.Config.Set<string> ("user.email", Email);
		}
開發者ID:gAdrev,項目名稱:monodevelop,代碼行數:7,代碼來源:BaseGitRepositoryTests.cs

示例7: VersionControlItem

		public VersionControlItem (Repository repository, IWorkspaceObject workspaceObject, FilePath path, bool isDirectory, VersionInfo versionInfo)
		{
			Path = path;
			Repository = repository;
			WorkspaceObject = workspaceObject;
			IsDirectory = isDirectory;
			this.versionInfo = versionInfo;
		}
開發者ID:riverans,項目名稱:monodevelop,代碼行數:8,代碼來源:VersionControlItem.cs

示例8: CanPublish

		public static bool CanPublish (Repository vc, string path, bool isDir) {
			if (!VersionControlService.CheckVersionControlInstalled ())
				return false;

			if (!vc.GetVersionInfo (path).IsVersioned && isDir) 
				return true;
			return false;
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:8,代碼來源:PublishCommand.cs

示例9: CopyConfigurationFrom

		public override void CopyConfigurationFrom (Repository other)
		{
			base.CopyConfigurationFrom (other);
			
			UrlBasedRepository ot = (UrlBasedRepository) other;
			url = ot.url;
			CreateUri ();
		}
開發者ID:nickname100,項目名稱:monodevelop,代碼行數:8,代碼來源:UrlBasedRepository.cs

示例10: Revision

		protected Revision (Repository repo, DateTime time, string author, string message, RevisionPath[] changedFiles)
		{
			this.repo = repo;
			this.time = time;
			this.author = author;
			this.message = message;
			this.changedFiles = changedFiles;
		}
開發者ID:nickname100,項目名稱:monodevelop,代碼行數:8,代碼來源:Revision.cs

示例11: PublishWorker

		public PublishWorker (Repository vc, string moduleName, FilePath localPath, FilePath[] files, string message) 
		{
			this.vc = vc;
			this.path = localPath;
			this.moduleName = moduleName;
			this.files = files;
			this.message = message;
		}
開發者ID:rajeshpillai,項目名稱:monodevelop,代碼行數:8,代碼來源:PublishCommand.cs

示例12: PublishWorker

		public PublishWorker (Repository vc, string moduleName, FilePath localPath, FilePath[] files, string message) 
		{
			this.vc = vc;
			this.path = localPath;
			this.moduleName = moduleName;
			this.files = files;
			this.message = message;
			OperationType = VersionControlOperationType.Push;
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:9,代碼來源:PublishCommand.cs

示例13: ChangeSet

		internal protected ChangeSet (Repository repo, FilePath basePath)
		{
			this.repo = repo;
			
			//make sure the base path has a trailign slash, or ChangeLogWriter's
			//GetDirectoryName call on it will take us up a directory
			string bp = basePath.ToString ();
			if (bp[bp.Length -1] != System.IO.Path.DirectorySeparatorChar)
				basePath = bp + System.IO.Path.DirectorySeparatorChar;
			
			this.basePath = basePath;
		}
開發者ID:yayanyang,項目名稱:monodevelop,代碼行數:12,代碼來源:ChangeSet.cs

示例14: ChangeSet

		internal protected ChangeSet (Repository repo, FilePath basePath)
		{
			this.repo = repo;

			// Make sure the path has a trailing slash or the ChangeLogWriter's
			// call to GetDirectoryName will take us one extra directory up.
			string bp = basePath.ToString ();
			if (bp [bp.Length - 1] != System.IO.Path.DirectorySeparatorChar)
				basePath = bp + System.IO.Path.DirectorySeparatorChar;

			this.basePath = basePath;
		}
開發者ID:llucenic,項目名稱:monodevelop,代碼行數:12,代碼來源:ChangeSet.cs

示例15: CopyConfigurationFrom

		public override void CopyConfigurationFrom (Repository other)
		{
			base.CopyConfigurationFrom (other);
			
			UrlBasedRepository ot = (UrlBasedRepository) other;
			dir = ot.dir;
			user = ot.user;
			pass = ot.pass;
			port = ot.port;
			server = ot.server;
			method = ot.method;
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:12,代碼來源:UrlBasedRepository.cs


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