0

我正在尝试使用 git-tf 在 TFS 上克隆 TFVC 项目。当我运行 git-tf clone 时,系统提示我输入我的 TFS 用户名,输入我的用户名后,我得到一个 java.lang.UnsatisfiedLinkError。我的目标是将这个项目迁移到 Git 并将其推送到 Gitlab,同时保持变更集的历史。

命令: git-tf clone https://tfs-url/tfs/defaultcollection/ $/TFSProjectName ~/Desktop/MyTFSProject --deep

完全例外:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 'boolean com.microsoft.tfs.jni.internal.console.NativeConsole.nativeEnableEcho()'
    at com.microsoft.tfs.jni.internal.console.NativeConsole.nativeEnableEcho(Native Method)
    at com.microsoft.tfs.jni.internal.console.NativeConsole.enableEcho(NativeConsole.java:56)
    at com.microsoft.tfs.jni.ConsoleUtils.enableEcho(ConsoleUtils.java:47)
    at com.microsoft.gittf.client.clc.commands.framework.Command.prompt(Command.java:510)
    at com.microsoft.gittf.client.clc.commands.framework.Command.promptForPassword(Command.java:482)
    at com.microsoft.gittf.client.clc.commands.framework.Command.promptForCredentials(Command.java:470)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getDefaultCredentials(Command.java:309)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getCredentials(Command.java:335)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:370)
    at com.microsoft.gittf.client.clc.commands.CloneCommand.run(CloneCommand.java:203)
    at com.microsoft.gittf.client.clc.Main.main(Main.java:328)

环境:

  • 操作系统:MacOS Catalina 10.15.5
  • Java:openjdk 11.0.7 2020-04-14
  • Git-tf:git-tf 版本 2.0.3.20131219
4

1 回答 1

0

从错误信息来看,这个问题的原因是java版本。

检查这个关于Git-TF 的文档。您可以下载Java 7并将其设置为PATH 环境变量

使用 Java 8 进行测试,它也可以工作。

另一方面,Git-TF 已经到了生命的尽头。

我的目标是将这个项目迁移到 Git 并将其推送到 Gitlab,同时保持变更集的历史。

我推荐你使用Git-tfs来实现它。

这是脚本:

git tfs clone <TFS URL> $/project

cd repo path

git checkout -b TempBranch 

git remote add origin <Git URL>

git push --set-upstream origin TempBranch

在这种情况下,TFVC 存储库可以更改为 Git 存储库。然后你可以使用 git push 将 Repo 推送到 Gitlab。

它也会保留历史。

于 2020-08-31T07:20:08.957 回答