我遇到问题我无法在TFS 2015中修改Changeset的CreationDate 使用Microsoft.TeamFoundation.VersionControl.Client.dll
$changeset = $versionControlServer.GetChangeset("2656")
$changeset.CreationDate = $(get-date).AddDays(-90)
$changeset.Comment = "bla-bla-bla"
$changeset.Owner = "test\test1"
$changeset.Committer = "test\test1"
$changeset.CommitterDisplayName = "test\test1"
$changeset.OwnerDisplayName = "test\test1"
$changeSet.Update()
尝试运行$changeSet.Update()
方法后,结果不佳。仅应用了$changeset.Comment = "bla-bla-bla"
,其他属性未成功。
所以,我的问题是:
CreationDate, Committer
等答案 0 :(得分:1)
Why would you want to do change the check-in date?
The API isn't going to let you do it and editing the TFS SQL database directly is unsupported. If you decide to do it anyway then there is a fairly high probability that you will break something so make sure you have a current backup.
That said, there is a similar question here: Modify CreationDate for TFS Changeset
答案 1 :(得分:0)
TFS 2015支持并托管Git存储库以及TFVC。如果您向团队项目添加Git仓库,则可以将其添加为附加远程和推送。这将带来所有的历史,而不需要弄乱历史。
如果你必须从Git转移到TFVC(不建议Git好多了),那么你可以使用Git-TF在两者之间推送代码。
http://nkdagility.com/migrating-codeplex-github/
上面是一个相反的例子,但你应该能够:
由于TFVC是可审计的,因此无法解决日期问题。
好的,所以我撒谎并且有办法。
...这被允许支持VSS到TFVC的迁移,你的millage可能会有所不同。