当前位置: 首页>>代码示例>>C#>>正文


C# VersionControl.VersionInfo类代码示例

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


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

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

示例2: Equals

		public bool Equals (VersionInfo obj)
		{
			if (obj == null)
				return false;
			return localPath == obj.localPath &&
				repositoryPath == obj.repositoryPath &&
				isDirectory == obj.isDirectory &&
				status == obj.status &&
				revision == obj.revision &&
				remoteStatus == obj.remoteStatus &&
				remoteRevision == obj.remoteRevision &&
				AllowedOperations == obj.AllowedOperations;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:13,代码来源:VersionInfo.cs

示例3: Equals

		public bool Equals (VersionInfo obj)
		{
			if (obj == null)
				return false;
			return LocalPath == obj.LocalPath &&
				RepositoryPath == obj.RepositoryPath &&
				IsDirectory == obj.IsDirectory &&
				Status == obj.Status &&
				Revision == obj.Revision &&
				RemoteStatus == obj.RemoteStatus &&
				RemoteRevision == obj.RemoteRevision &&
				AllowedOperations == obj.AllowedOperations;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:13,代码来源:VersionInfo.cs

示例4: SetStatus

		public void SetStatus (VersionInfo versionInfo, bool notify = true)
		{
			lock (fileStatus) {
				VersionInfo vi;
				if (fileStatus.TryGetValue (versionInfo.LocalPath, out vi) && vi.Equals (versionInfo)) {
					vi.RequiresRefresh = false;
					return;
				}
				versionInfo.Init (repo);
				fileStatus [versionInfo.LocalPath] = versionInfo;
			}
			if (notify)
				VersionControlService.NotifyFileStatusChanged (new FileUpdateEventArgs (repo, versionInfo.LocalPath, versionInfo.IsDirectory));
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:14,代码来源:VersionInfoCache.cs

示例5: VersionControlItem

		public VersionControlItem (Repository repository, WorkspaceObject workspaceObject, FilePath path, bool isDirectory, VersionInfo versionInfo)
		{
			Path = path;
			Repository = repository;
			WorkspaceObject = workspaceObject;
			IsDirectory = isDirectory;
			this.versionInfo = versionInfo;

			var obj = workspaceObject;
			while (obj != null) {
				var p = obj as Project;
				if (p != null)
					ContainerProject = p;

				obj = obj.ParentObject;
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:17,代码来源:VersionControlItem.cs

示例6: GetVersionInfo

		public override VersionInfo GetVersionInfo(FilePath localPath, bool getRemoteStatus)
		{
			if (!IsVersioned(localPath))
				return null;
			var status = GetLocalStatus(localPath);

			var vi = new VersionInfo(localPath, 
				localPath /*repositoryPath*/, 
				Directory.Exists(localPath), 
				status.VersionStatus, 
				new GitRevision(this, status.Revision), 
				VersionStatus.Unversioned, 
				null);

			return vi;
		}
开发者ID:yvanjanssens,项目名称:monodevelop-git,代码行数:16,代码来源:GitRepository.cs

示例7: GenerateDiff

		public virtual DiffInfo GenerateDiff (FilePath baseLocalPath, VersionInfo versionInfo)
		{
			return null;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:4,代码来源:Repository.cs

示例8: GetVersionInfo

		/// <summary>
		/// Returns the versioning status of a set of files or directories
		/// </summary>
		/// <param name='paths'>
		/// A list of files or directories
		/// </param>
		/// <param name='queryFlags'>
		/// Use VersionInfoQueryFlags enum for options.
		/// </param>
		public IEnumerable<VersionInfo> GetVersionInfo (IEnumerable<FilePath> paths, VersionInfoQueryFlags queryFlags = VersionInfoQueryFlags.None)
		{
			if ((queryFlags & VersionInfoQueryFlags.IgnoreCache) != 0) {
				// We shouldn't use IEnumerable because elements don't save property modifications.
				var res = OnGetVersionInfo (paths, (queryFlags & VersionInfoQueryFlags.IncludeRemoteStatus) != 0).ToList ();
				infoCache.SetStatus (res);
				return res;
			}
			List<FilePath> pathsToQuery = new List<FilePath> ();
			var result = new List<VersionInfo> ();
			foreach (var p in paths) {
				var vi = infoCache.GetStatus (p);
				if (vi != null) {
					result.Add (vi);
					// This status has been invalidated, query it asynchronously
					if (vi.RequiresRefresh)
						pathsToQuery.Add (p);
				}
				else {
					// If there is no cached status, query it asynchronously
					vi = new VersionInfo (p, "", Directory.Exists (p), VersionStatus.Versioned, null, VersionStatus.Versioned, null);
					infoCache.SetStatus (vi, false);
					result.Add (vi);
					pathsToQuery.Add (p);
				}
//				Console.WriteLine ("GetVersionInfo " + string.Join (", ", paths.Select (p => p.FullPath)));
			}
			if (pathsToQuery.Count > 0)
				AddQuery (new VersionInfoQuery () { Paths = pathsToQuery, QueryFlags = queryFlags });
			return result;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:40,代码来源:Repository.cs

示例9: GetSupportedOperations

		internal protected virtual VersionControlOperation GetSupportedOperations (VersionInfo vinfo)
		{
			VersionControlOperation operations = VersionControlOperation.None;
			bool exists = !vinfo.LocalPath.IsNullOrEmpty && (File.Exists (vinfo.LocalPath) || Directory.Exists (vinfo.LocalPath));
			if (vinfo.IsVersioned) {
				operations = VersionControlOperation.Commit | VersionControlOperation.Update;
				if (!vinfo.HasLocalChange (VersionStatus.ScheduledAdd))
					operations |= VersionControlOperation.Log;

				if (exists) {
					if (!vinfo.HasLocalChange (VersionStatus.ScheduledDelete))
						operations |= VersionControlOperation.Remove;
					if (vinfo.HasLocalChanges || vinfo.IsDirectory)
						operations |= VersionControlOperation.Revert;
				}
				if (AllowLocking && !vinfo.IsDirectory) {
					if (!vinfo.HasLocalChanges && (vinfo.Status & VersionStatus.LockOwned) == 0)
						operations |= VersionControlOperation.Lock;
					if ((vinfo.Status & VersionStatus.LockOwned) != 0)
						operations |= VersionControlOperation.Unlock;
				}
			}
			else if (exists) {
				operations = VersionControlOperation.Add;
			}
			return operations;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:27,代码来源:Repository.cs

示例10: SetDirectoryStatus

		public void SetDirectoryStatus (FilePath localDirectory, VersionInfo[] versionInfos, bool hasRemoteStatus)
		{
			lock (directoryStatus) {
				DirectoryStatus vis;
				if (directoryStatus.TryGetValue (localDirectory.CanonicalPath, out vis)) {
					if (versionInfos.Length == vis.FileInfo.Length && (hasRemoteStatus == vis.HasRemoteStatus)) {
						bool allEqual = false;
						for (int n=0; n<versionInfos.Length; n++) {
							if (!versionInfos[n].Equals (vis.FileInfo[n])) {
								allEqual = false;
								break;
							}
						}
						if (allEqual) {
							vis.RequiresRefresh = false;
							return;
						}
					}
				}
				directoryStatus [localDirectory.CanonicalPath] = new DirectoryStatus { FileInfo = versionInfos, HasRemoteStatus = hasRemoteStatus };
				SetStatus (versionInfos);
			}
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:23,代码来源:VersionInfoCache.cs

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

示例12: AddFile

		public ChangeSetItem AddFile (VersionInfo fileVersionInfo)
		{
			ChangeSetItem item = GetFileItem (fileVersionInfo.LocalPath);
			if (item != null)
				return item;

			item = new ChangeSetItem (fileVersionInfo);
			items.Add (item);
			return item;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:10,代码来源:ChangeSet.cs

示例13: ChangeSetItem

		internal ChangeSetItem (VersionInfo versionInfo)
		{
			this.versionInfo = versionInfo;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:4,代码来源:ChangeSet.cs

示例14: AddFiles

		public void AddFiles (VersionInfo[] fileVersionInfos)
		{
			foreach (VersionInfo vi in fileVersionInfos)
				AddFile (vi);
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:5,代码来源:ChangeSet.cs

示例15: AddFile

		public ChangeSetItem AddFile (VersionInfo fileVersionInfo)
		{
			ChangeSetItem item = new ChangeSetItem (fileVersionInfo);
			items.Add (item);
			return item;
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:6,代码来源:ChangeSet.cs


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