我可以在tfs 2008中扩展到其他分支吗?

时间:2020-03-06 14:33:45  来源:igfitidea点击:

假设我们团队中的某个开发人员搁置了他在A分支中所做的更改。而我正在B分支上工作。是否可以将他的更改搁置到B分支中? (通过GUI或者命令提示符)

解决方案

货架信息包括其要到达的特定路径。不幸的是,我不知道有什么自动方法可以将其搁置到除搁置的位置之外的任何位置。我想执行此操作的时间是,我必须在新分支中检出等效文件,从旧分支中删除这些文件,然后手动将文件复制过来。

编辑:好吧,我想我正在努力地做到这一点。我将不得不尝试Curt的解决方案。 :)

Visual Studio Power Tools应该允许我们执行此操作。

C:\src\Merlin\Main>tfpt unshelve /?
tfpt unshelve - Unshelve into workspace with pending changes

Allows a shelveset to be unshelved into a workspace with pending changes.
Merges content between local and shelved changes. Allows migration of shelved
changes from one branch into another by rewriting server paths.

Usage: tfpt unshelve [shelvesetname[;username]] [/nobackup]
                     [/migrate /source:serverpath /target:serverpath]

 shelvesetname          The name of the shelveset to unshelve
 /nobackup              Skip the creation of a backup shelveset
 /migrate               Rewrite the server paths of the shelved items
                        (for example to unshelve into another branch)
 /source:serverpath     Source location for path rewrite (supply with /migrate)
 /target:serverpath     Target location for path rewrite (supply with /migrate)
 /nobackup              Skip the creation of a backup shelveset

例如,要将在Branch1上创建的名为" Shelve Set Name"的货架集合并到Branch2,请使用以下命令:

>tfpt unshelve "Shelve Set Name";domain\userName /migrate /source:"$/Project/Branch1/" /target:"$/Project/Branch2/"