git-svn迁移致命:不是有效的SHA1更新参考refs/heads/master refs/remotes/trunk:命令返回错误:128 [英] git-svn migration fatal: not a valid SHA1 update-ref refs/heads/master refs/remotes/trunk: command returned error: 128

查看:265
本文介绍了git-svn迁移致命:不是有效的SHA1更新参考refs/heads/master refs/remotes/trunk:命令返回错误:128的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将大型但线性的svn存储库迁移到git.svn信息库没有标准布局(主干,分支,标签)...只有一个带有主干的目录.

Trying to migrate a large but linear svn repository to git. The svn repository does not have the standard layout (trunk, branches, tags)...just one directory with the trunk.

Ubuntu 12.4 LTS,git 1.7.9.5.

Ubuntu 12.4 LTS,git 1.7.9.5.

$ git svn clone https://coawstmodel.sourcerepo.com/coawstmodel/COAWST --authors-file=../users.txt COAWST

...

    D   WPS/metgrid/storage_module.F
    D   WPS/metgrid/process_domain_module.F
W: -empty_dir: WPS/metgrid/gridinfo_module.F
W: -empty_dir: WPS/metgrid/input_module.F
W: -empty_dir: WPS/metgrid/interp_option_module.F
W: -empty_dir: WPS/metgrid/module_date_pack.F
W: -empty_dir: WPS/metgrid/process_domain_module.F
W: -empty_dir: WPS/metgrid/storage_module.F
r635 = c19181c9718e701788b540ed0cc559e4fbddf413 (refs/remotes/git-svn)
    M   Tools/Docs/COAWST_User_Manual.doc
r636 = 1b7849c3e5a20856c9ddb909a5f53ddf8501ad33 (refs/remotes/git-svn)
Auto packing the repository for optimum performance. You may also
run "git gc" manually. See "git help gc" for more information.
Counting objects: 14143, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (14039/14039), done.
Writing objects: 100% (14143/14143), done.
Total 14143 (delta 8350), reused 0 (delta 0)
fatal: refs/remotes/trunk: not a valid SHA1
update-ref refs/heads/master refs/remotes/trunk: command returned error: 128

我尝试了-s,-t Trunk,-t COAWST,-preserve-empty-dirs(我想这样做),-no-meta-data(每个Pro Git)的组合的变体...总是相同的最终错误.

I have tried variants with combinations of -s, -t Trunk, -t COAWST, --preserve-empty-dirs (which I would like to do), --no-meta-data (per Pro Git)...always the same final error.

谢谢您的建议!

推荐答案

我认为您运行了正确的命令.或者,您可以运行

I think that you run the correct command. Alternatively you could run

$ git svn clone https://coawstmodel.sourcerepo.com/coawstmodel --trunk=COAWST --authors-file=../users.txt COAWST

git-svn在每种情况下都几乎完成了工作.它唯一要做的就是将"master"设置为指向您的后备箱.由于某些错误,它尝试将其设置为错误的值,但是您可以使用

git-svn nearly finishes its work in each case. The only thing it tries to do is to set 'master' to point to your trunk. Because of some bug it tries to set it to the wrong value but you can perform it manually with

$ git update-ref refs/heads/master refs/remotes/git-svn

如果仍然有问题,可以尝试使用 SubGit 的3个步骤来转换存储库:

If you will still have problems you may try to convert the repository with SubGit in 3 steps:

$ subgit configure path/to/svn/repository
#edit path/to/svn/repository/conf/subgit.conf to set trunk = COAWST:refs/heads/master and authorsFile = path/to/users.txt
$ subgit install path/to/svn/repository

转换后的存储库将位于path/to/svn/repository/conf/.git

The converted repository will be at path/to/svn/repository/conf/.git

这篇关于git-svn迁移致命:不是有效的SHA1更新参考refs/heads/master refs/remotes/trunk:命令返回错误:128的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆