如何仅获取与指定分支/文件夹相关的搁置集?
我正在尝试列出分支中的所有搁置集,无论所有者如何。我看到我可以使用 QueryShelvesets(null, null) 从版本控制中获取所有搁置集,但我不知道如何指定分支/文件夹。
如何仅获取与指定分支/文件夹相关的搁置集?
I'm trying to list all shelvesets in a branch regardless of owner. I see that I can use QueryShelvesets(null, null) to get all shelvesets from version control, but I don't see how to specify the branch/folder.
How can I get only the shelvesets pertaining to a specified branch/folder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不相信搁置集本身有任何有关其中分支或服务器路径的信息。我在这里假设,“与指定分支/文件夹相关的搁置集”是指包含位于该分支中该文件夹的服务器路径下的文件的搁置集。如果是这种情况,则可能会被迫迭代所有更改中的文件并测试每个服务器路径是否包含在您感兴趣的分支/文件夹中。
从命令提示符获取搁置集项目有点麻烦,因为不支持通过 tf.exe、tfpt.exe 或 powershell cmdlet;但是,我刚刚在以下线程中解决了一个脚本来执行此操作:
在命令提示符处获取 Tfs Shelveset 文件内容?
尝试一下 - 希望它有帮助!
I don't believe that shelvesets themselves have any information regarding branches or server paths in them. I've assumed here, that by "shelvesets pertaining to a specified branch/folder" you mean shelvesets that contain files located under the server path for that folder, in that branch. If that's the case, then may be forced to iterate over the files in all your change and test each of their server paths for containment in your branch/folder of interest.
Getting shelveset items from the command prompt is a bit of a chore, as it is unsupported either through tf.exe, tfpt.exe, or the powershell cmdlets; however, I've just resolved a script to do just this in the following thread:
Get Tfs Shelveset file contents at the command prompt?
Give it a try--hope it helps!