1

我正在将一个 tfs 项目迁移到 git 并使用最新版本的 .20 git tfs 并将我的项目转换为 tfs 中的分支,但仍然面临此错误。这是我得到的日志:

Setting up a TFS workspace at .git\tfs\default\workspace
get [C39462]$/Dow Jones Infrastructure/trunk/src/DowJones.Web.Mvc/DowJones.Web.M
vc.csproj
C39462 = cdacbb91c508cd75c305547f9fa91d8f7225d87d
GC Countdown: 181
Cleaning...
Sep.Git.Tfs.Core.GitTfsException: error: a problem occured when trying to clone
the repository. Try to solve the problem described below.
In any case, after, try to continue using command `git tfs fetch`
 ---> System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Max(IEnumerable`1 source)
   at Sep.Git.Tfs.Core.GitTfsRemote.ProcessMergeChangeset(ITfsChangeset changese
t, Boolean stopOnFailMergeCommit, String& parentCommit)
   at Sep.Git.Tfs.Core.GitTfsRemote.FetchWithMerge(Int64 mergeChangesetId, Boole
an stopOnFailMergeCommit, String[] parentCommitsHashes)
   at Sep.Git.Tfs.Commands.Fetch.DoFetch(IGitTfsRemote remote, Boolean stopOnFai
lMergeCommit)
   at Sep.Git.Tfs.Commands.Fetch.FetchRemote(Boolean stopOnFailMergeCommit, IGit
TfsRemote remote)
   at Sep.Git.Tfs.Commands.Fetch.Run(Boolean stopOnFailMergeCommit, String[] arg
s)
   at Sep.Git.Tfs.Commands.Clone.Run(String tfsUrl, String tfsRepositoryPath, St
ring gitRepositoryPath)
   --- End of inner exception stack trace ---
   at Sep.Git.Tfs.Util.GitTfsCommandRunner.Run(GitTfsCommand command, IList`1 ar
gs)
   at Sep.Git.Tfs.GitTfs.Main(GitTfsCommand command, IList`1 unparsedArgs)
   at Sep.Git.Tfs.Program.Main(String[] args)
error: a problem occured when trying to clone the repository. Try to solve the p
roblem described below.
In any case, after, try to continue using command `git tfs fetch`

System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Max(IEnumerable`1 source)
   at Sep.Git.Tfs.Core.GitTfsRemote.ProcessMergeChangeset(ITfsChangeset changese
t, Boolean stopOnFailMergeCommit, String& parentCommit)
   at Sep.Git.Tfs.Core.GitTfsRemote.FetchWithMerge(Int64 mergeChangesetId, Boole
an stopOnFailMergeCommit, String[] parentCommitsHashes)
   at Sep.Git.Tfs.Commands.Fetch.DoFetch(IGitTfsRemote remote, Boolean stopOnFai
lMergeCommit)
   at Sep.Git.Tfs.Commands.Fetch.FetchRemote(Boolean stopOnFailMergeCommit, IGit
TfsRemote remote)
   at Sep.Git.Tfs.Commands.Fetch.Run(Boolean stopOnFailMergeCommit, String[] arg
s)
   at Sep.Git.Tfs.Commands.Clone.Run(String tfsUrl, String tfsRepositoryPath, St
ring gitRepositoryPath)
Sequence contains no elements

这是我的 git tfs clone 命令:

 PS:if your branch is not listed here, perhaps you should convert the containing
folder to a branch in TFS.
Fetching from TFS remote 'default'...
C39287 = 32b95538d87efab00ada41347069bfaf5b2eb1aa
C39347 = 88e584492a318ad520d4caaa94202620f968281b
C39348 = 34faf002c3ec8a2a52296472a35493523f164d75
C39351 = b2c7b256a5c5f58b88c1c879f2b2e08051ed4125
C39353 = c2fb6988f8f92803c4bd9fc81638b68d7867dbc7
C39355 = e5e364b2ccfe19a72d1a42c0e58c25a32389033c
C39356 = 64850cb6e181c04463affead17840e0d23780a4a
C39357 = 518c57ed83f115f602c722acc9c6cf21e11a6260
C39359 = 3ab61d15a7d84cb2d0de5f7e0cbb6a038cad28fb
C39360 = a92963812c6184d72a39ff35faf754b784bccaab
C39393 = 25b6385094b4165f22d12bd8880fde7cdbc607af
C39407 = f6c9d31b0f21b6e9bf7f8e7611f9efd79068cb7d
C39408 = 0c13bf39f416feee8428cf49d14148723b3a2061
C39409 = e0d4a70e8a221078bfb585a8b5e5cf59da77ff7d
C39411 = b459848e0093babbc8260bdb52d3072699d2184e
C39451 = b7fc45fb08b907f68cec48fbbca01b6c4fb99c6a
C39454 = e022581df4b5e164e14910112229eae37d8681f5
C39456 = 696657332c22091d92dbb5de4316711ac4d0c7d9
C39461 = f5c5736f4230233f4cbaf4bba0f8f72c378df52b
C39462 = cdacbb91c508cd75c305547f9fa91d8f7225d87d
error: a problem occured when trying to clone the repository. Try to solve the p
roblem described below.
In any case, after, try to continue using command `git tfs fetch`

Sequence contains no elements

这是我认为它给出问题的提交:

将 DJ_Component 分支与 Component JS 重新架构合并

Chadwick, Jess 4 年前签入变更集 39571 13 个文件已编辑3 个文件已删除

即使我忽略了提交,它也会成功迁移一些提交,然后再次失败并出现相同的错误!

4

1 回答 1

1

我看到您在 Git-Tfs 项目网站上报告了该错误,并且该问题在两周前被标记为已修复。

你能得到最新的代码,构建它,看看它是否适合你吗?或者等待 0.21 版本,然后尝试。

于 2014-12-05T01:03:37.480 回答