在Windows上将Mercurial(hg)存储库转换为Git(7) [英] Converting a Mercurial (hg) repository to Git on Windows (7)

查看:250
本文介绍了在Windows上将Mercurial(hg)存储库转换为Git(7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在这一点上我真的很沮丧。我有一个现有的hg仓库,里面有几个月的编码历史,我想把它放到一个私人的Github仓库中,这样我就可以从那里开始工作。不幸的是,我使用Windows,我似乎无法找到任何方式来转换我实际上可以正常工作的存储库。几乎所有的帮助和建议,我可以在网上找到似乎假设我从某种* nix外壳,我不是。



我目前已安装:TortoiseHG,Python 3.1和Git for Windows。



我试过的:


    hg-init插件for hg - 当我尝试使用gexport命令(以及其他来自hg-git)时,我只是得到了python例外的字符串。我完全无法让git认识到gremote的命令。我尝试了下面的内容: http://github.com/blog/439- hg-git-mercurial-plugin


  1. hg-to-git(快速导出) - 所有教程都期望我运行.sh文件。另一个stackoverflow线程似乎意味着Powershell可以运行.sh文件,但我无法让它运行在我的生活中。例如: http://hivelogic.com/articles/converting-from-mercurial-to -git


  2. Mercurial to git converter - http://permalink.gmane.org/gmane.comp.version-control.git/36601 - 我运行它时不想工作通过Python,它抱怨它在第44行有一个语法错误。我不知道Python,所以我不知道。


四个小时的谷歌搜索和浏览无用的教程和人物 - 比我更幸运的是,我对每个据称有帮助的博客文章都赞不绝口,但我没有得到任何答案。任何人都可以为我提供任何帮助或建议吗? 安装 Cygwin (含python,hg,git)

  • 安装 git-hg

  • 运行 git-hg clone ... url ...

  • 或者告诉我这个你的hg回购网址是什么,我可以将其转换为您。


    I'm really quite frustrated at this point. I have an existing hg repository that has months of coding history in it, and I want to get this into a private Github repository so I can work on it from there. Unfortunately I use Windows and I can't seem to find any way to convert the repository that I can actually get to work properly. Practically every bit of help and advice I can find online seems to assume I'm running from some kind *nix shell, which I'm not.

    I currently have installed: TortoiseHG, Python 3.1 and Git for Windows.

    What I've tried:

    1. hg-init plugin for hg - When I try to use the gexport command (and others from hg-git), I just get strings of python exceptions. I totally can't get git to even recognise the gremote command. I tried following what was here: http://github.com/blog/439-hg-git-mercurial-plugin

    2. hg-to-git (fast-export) - All tutorials keep expecting me to run a .sh file. Another stackoverflow thread seemed to imply that Powershell can run .sh files, but I can't make it run them for the life of me. Example: http://hivelogic.com/articles/converting-from-mercurial-to-git

    3. Mercurial to git converter - http://permalink.gmane.org/gmane.comp.version-control.git/36601 - This one doesn't want to work when I run it via Python, which complains that it has a syntax error on line 44. I don't know python, so I've got no idea.

    Four hours of Google searching and wading through useless tutorials and people-more-fortunate-than-me singing the praises of each supposedly-helpful blog post, but I haven't gotten anywhere with this. Can anyone offer any assistance or suggestions for me to try?

    解决方案

    1. Install Cygwin (with python, hg, git)
    2. Install git-hg
    3. run git-hg clone ...url...

    Or tell me what the url is for this hg repo of yours, and I can convert it for you.

    这篇关于在Windows上将Mercurial(hg)存储库转换为Git(7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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