Workspace.PendEdit 未签出文件
我正在使用 TFS 2010 SDK 以编程方式将对文件的编辑签入到 TFS 2010 中。TFS 2010 SDK 的文档充其量也很少。当我调用方法workspace.pendedit() 并传入一个我想要标记为具有挂起编辑的文件数组时,实际上没有签出任何内容。因此,当我调用workspace.checkin()传入workspace.getpendingchanges和一些注释时,我得到一个异常,即必须至少有一件事情有待处理的更改(这应该是我传递给pendedit的内容)。关于为什么应用程序没有将文件标记为在工作区中有待编辑的任何想法?
I'm using the TFS 2010 SDK to programmatically check in edits to files into TFS 2010. The documentation on the TFS 2010 SDK is sparse at best. When I call the method workspace.pendedit() passing in an array of files I want to mark as having a pending edit, nothing is actually checked out. So when I call workspace.checkin() passing in workspace.getpendingchanges and some comments I get an exception that there must be at least one thing that has a pending change (which should be what I passed into pendedit). Any thoughts on why the app isn't marking the files as having a pending edit in the workspace?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您按照正确的顺序执行所有操作,以便 TFS 知道文件已更改。您必须:
例子:
Make sure you're doing everything in the right order so TFS knows that the file has changed. You have to:
Example:
事实证明,即使我已经添加了文件并签入了文件,工作区似乎也无法识别这些文件在那里,因此我必须在 PendEdit() 之前执行 Get()
It turned out that even though I had added the files and checked in the files, it seemed that the workspace didn't recognize that the files were there, and as a result I had to do a Get() prior to the PendEdit()