只更新服务器代码有变更的文件,签出TFS 2010变更集中的文件(check out files in TFS 2010 changeset)...

签出TFS 2010变更集中的文件(check out files in TFS 2010 changeset)

我们目前正在使用TFS 2010源代码控制。 我有一个我想要回滚的更改集,但我想检查所有包含的文件并在检查旧代码之前保存它们。 有谁知道这是否可能? 有很多文件,我不想通过手工检查它们。

We are currently use TFS 2010 source control. I have a change-set that I want to rollback but I want to checkout all the included files and shelf them before checking in the old code. Does anyone know if this is possible? There are many many files and I do not want to go through and check them out by hand.

原文:https://stackoverflow.com/questions/13942258

更新时间:2020-02-26 14:02

最满意答案

由于回滚实际上不会删除旧文件,但会创建删除更改的新版本,因此您始终可以通过获取原始更改集编号来查看旧版本的文件。

不需要搁置。 只需使用获取特定版本并检索该文件的旧版本。

Since the rollback will not actually remove the old files, but will create a new version with the changes removed, you can always see the old version of the files by getting that original changeset number.

No need for shelvesets. Just use get specific version and retrieve the old versions of the file.

相关问答

您已经在遍历代码中的更改了。 受影响的File位于Change类型的Item属性中。 在你的情况: w.Item.ServerItem - >这是文件的Serverpath像'$/A/B/C.txt' 您可以使用w.Item.DownloadFile(@"C:\local.txt")下载它 You are already iterating over the Changes in your code. The affected File is in the Item property of the

...

此外,在重新映射之前删除以下缓存:%localappdata%\ Microsoft \ Team Foundation \ 5.0 \ Cache SO完整步骤将是:1 - 取消映射所有项目 2 - [删除工作区] [1] [1]: https : //msdn.microsoft.com/en-us/library/ms245474(v = vs.100).aspx 3 - 删除缓存文件夹@:%localappdata%\ Microsoft \ Team Foundation \ 5.0 \

...

您可以从迁移中排除BuildProcess模板。 要从迁移中排除项目,请在初始选择中使用GUI中的“clocked”选项。 或者只是在XML中为要排除的项目设置忽略为真:

...

VS中的显示是错误的。 似乎正确的参数被处理到构建服务器,但VS显示“当前更改集”。 我构建了一个较旧的更改集,输出“较旧”。 The display in VS is buggy. It seems that the right parameter is processed to the build server, but VS shows "current change set". I built an older change set and the output is "older".

每次进行签入时,TFS都会创建一个变更集。 一起签入的所有文件都包含在变更集中。 如果您进入工作项的链接选项卡,它允许您搜索更改集并将它们与问题相关联,但如果您在登记入住时进行关联,则会更好。 我们有一个规则,不允许签名没有强制链接正确发生的关联。 TFS creates a changeset every time you do a checkin. All the files that are checked in together are included in the changeset.

...

探索者的一个途径是围绕Team Foundation Server Power Tools中的“获取更改集”功能编写脚本。 这将允许您获取特定变更集中的所有文件。 您可以迭代原始变更集和变更集之间的变更集以推送到生产,为每个变更集运行getchangeset ,然后推送结果。 One avenue to explorer is writing a script around the "get changeset" functionality in the Team Foundation Serve

...

如果您“获取特定版本”,则您将本地工作区版本更改为服务器上的先前版本。 这不会影响服务器上的最新版本。 (当然,您可以检查该路径并将其签入,这会影响服务器上的最新版本。) 如果您“回滚”,则表示您正在更改服务器版本 。 根据您执行此操作的方式,您可能无法更改本地工作区版本。 如果您执行“获取最新版本”,则会同步到最新版本。 If you "Get Specific Version" you are changing your local workspace version to that of a

...

从错误的分支合并到正确的分支,然后对错误分支中的分支进行变更集回滚 。 无论何时需要,您仍然可以将变更集从正确的分支合并回错误的分支。 Merge from the wrong branch to the correct one, then do an changeset rollback of the one in the wrong branch. Whenever you need, you still can merge back the changeset from the correc

...

如果您正在使用MSBuild,请查看我的博客文章 ,了解如何操作(TFS2008但适用于2010)。 如果您正在使用工作流程,那么您需要此博客文章 。 希望有所帮助:-) If you are using MSBuild have a look at my blog post on how to do it (TFS2008 but applicable to 2010). If you are using workflows then you want this blog post instea

...

由于回滚实际上不会删除旧文件,但会创建删除更改的新版本,因此您始终可以通过获取原始更改集编号来查看旧版本的文件。 不需要搁置。 只需使用获取特定版本并检索该文件的旧版本。 Since the rollback will not actually remove the old files, but will create a new version with the changes removed, you can always see the old version of the files by

...

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值