示例#1
0
            internal StatusEnt(svn_wc_status2_t status, string localpath)
            {
                LocalFilePath     = localpath;
                TextStatus        = (svn_wc_status_kind)status.text_status;
                PropsStatus       = (svn_wc_status_kind)status.prop_status;
                Locked            = status.locked;
                Copied            = status.copied;
                Switched          = status.switched;
                RemoteTextStatus  = (svn_wc_status_kind)status.repos_text_status;
                RemotePropsStatus = (svn_wc_status_kind)status.repos_prop_status;

                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           = (int)ent.revision;
                Url                = ent.url;
                Repository         = ent.repos;
                RepositoryUuid     = ent.repos_uuid;
                IsDirectory        = ent.node_kind == svn_node_kind_t.Dir;
                Schedule           = (NodeSchedule)ent.schedule;
                Copied             = ent.copied;
                Deleted            = ent.deleted;
                Absent             = ent.absent;
                Incomplete         = ent.incomplete;
                CopiedFrom         = ent.copiedfrom_url;
                CopiedFromRevision = (int)ent.copiedfrom_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 = (int)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;
                }
            }
示例#2
0
			internal StatusEnt (svn_wc_status2_t status, string localpath)
			{
				LocalFilePath = localpath;
				TextStatus = (svn_wc_status_kind) status.text_status;
				PropsStatus = (svn_wc_status_kind) status.prop_status;
				Locked = status.locked;
				Copied = status.copied;
				Switched = status.switched;
				RemoteTextStatus = (svn_wc_status_kind) status.repos_text_status;
				RemotePropsStatus = (svn_wc_status_kind) status.repos_prop_status;

				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 = (int) ent.revision;
				Url = ent.url;
				Repository = ent.repos;
				RepositoryUuid = ent.repos_uuid;
				IsDirectory = ent.node_kind ==  svn_node_kind_t.Dir;
				Schedule = (NodeSchedule) ent.schedule;
				Copied = ent.copied;
				Deleted = ent.deleted;
				Absent = ent.absent;
				Incomplete = ent.incomplete;
				CopiedFrom = ent.copiedfrom_url;
				CopiedFromRevision = (int)ent.copiedfrom_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 = (int) 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;
				}
			}