当前位置: 首页>>代码示例>>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;未经允许,请勿转载。