Beispiel #1
0
 private SvnWcStatus(svn_wc_status_t *ptr)
 {
     mStatus = ptr;
 }
			internal StatusEnt (svn_wc_status_t status, string localpath)
			{
				LocalFilePath = localpath;
				TextStatus = (VersionStatus) status.svn_wc_status_kind_text;
				PropsStatus = (VersionStatus) status.svn_wc_status_kind_props;
				Locked = status.locked != 0;
				Copied = status.copied != 0;
				Switched = status.switched != 0;
				RemoteTextStatus = (VersionStatus) status.svn_wc_status_kind_text_repo;
				RemotePropsStatus = (VersionStatus) status.svn_wc_status_kind_props_repo;

				if (status.to_svn_wc_entry_t == IntPtr.Zero)
					return;
				
				svn_wc_entry_t ent = (svn_wc_entry_t) Marshal.PtrToStructure (status.to_svn_wc_entry_t, typeof (svn_wc_entry_t));
				Name = ent.name;
				Revision = ent.revision;
	  			Url = ent.url;
	  			Repository = ent.repos;
	  			RepositoryUuid = ent.repos_uuid;
	  			IsDirectory = (ent.node_kind == (int) NodeKind.Dir);
	  			Schedule = (NodeSchedule) ent.schedule;
	  			Copied = ent.copied != 0;
	  			Deleted = ent.deleted != 0;
	  			Absent = ent.absent != 0;
	  			Incomplete = ent.incomplete != 0;
	  			CopiedFrom = ent.copied_from;
	  			CopiedFromRevision = ent.copied_rev;
	  			ConflictOld = ent.conflict_old;
	  			ConflictNew = ent.conflict_new;
	  			ConflictWorking = ent.conflict_working;
	  			PropertyRejectFile = ent.property_reject_file;
	  			TextTime = Epoch.AddTicks (ent.text_time * 10);
	  			PropTime = Epoch.AddTicks (ent.prop_time * 10);
	  			Checksum = ent.checksum;
	  			LastCommitRevision = ent.last_commit_rev;
	  			LastCommitDate = Epoch.AddTicks (ent.last_commit_date * 10);
	  			LastCommitAuthor = ent.last_commit_author;
				LockToken = ent.lock_token;
				LockOwner = ent.lock_owner;
				LockComment = ent.lock_comment;
				
				if (status.repos_lock != IntPtr.Zero) {
					svn_lock_t repoLock = (svn_lock_t) Marshal.PtrToStructure (status.repos_lock, typeof (svn_lock_t));
					LockToken = repoLock.token;
					LockOwner = repoLock.owner;
					LockComment = repoLock.comment;
					RepoLocked = true;
				}
				if (LockToken != null) {
					LockOwned = true;
					RepoLocked = true;
				}
			}
 public void Func(IntPtr baton, IntPtr path, ref svn_wc_status_t status)
 {
     if (status.to__svn_wc_entry_t == IntPtr.Zero)
         return;
     string pathstr = Marshal.PtrToStringAnsi(path);
     statuses.Add(new StatusEnt(status, pathstr));
 }