Commit file problem
"James Geurts" <[email protected]> Tue, 2 Mar 2004 15:18:40 -0500
| Newsgroups | gmane.comp.version-control.sourcegear-vault.user |
|---|---|
| Message-ID | <[email protected]> |
Hey all, I'm using a modified version of Brian's NAnt tasks to try to accomplish some things with my project. I've run into a problem though... I'm trying to commit a file to Vault, but I keep getting errors. Unfortunately the errors that I'm getting are just not helpful to me right now. So, I'm basically just trying to check in a modified file. I am using Vault 2.0 client/server assemblies. The file has previously been checked out, but I can not guarantee that a Get was performed. Is a Get required before a check-in? The file exists (I have verified this) but the following code fails on the commit method. normalizedPath = "$/myRepo/myfile.cs"; diskFile = " C:\WINNT\TEMP\tmp3672.tmp\myfile.cs"; VaultClientFile vaultClientFile = ClientInstance.TreeCache.Repository.Root.FindFileRecursive(normalizedPath); ChangeSetItemColl changeSet = new ChangeSetItemColl(); changeSet.Add( new ChangeSetItem_Modified( DateTime.Now, pComment, "", vaultClientFile.ID, vaultClientFile.ObjVerID, diskFilename, normalizedPath, false, 0 ) ); ClientInstance.Commit(changeSet) The error message that I get is: System.NullReferenceException: Object reference not set to an instance of an object. at VaultClientOperationsLib.ClientInstance.Commit(ChangeSetItemColl givenItems, Boolean keepCheckedOut, Boolean removeLocalCopy, Boolean bIsImport, DateTime dateImport, Int32 nUserIDImport) at VaultClientOperationsLib.ClientInstance.Commit(ChangeSetItemColl givenItems, Boolean keepCheckedOut, Boolean removeLocalCopy) at VaultClientOperationsLib.ClientInstance.Commit(ChangeSetItemColl changeSetItems) at NAnt.Core.Tasks.VaultCheckIn.CheckInFile(String fileName) Any help/pointers with this would be appreciated. Thanks Jim