{"id":400,"date":"2013-06-07T22:19:05","date_gmt":"2013-06-07T14:19:05","guid":{"rendered":"http:\/\/blog.mega-zone.org\/?p=400"},"modified":"2013-06-08T22:20:16","modified_gmt":"2013-06-08T14:20:16","slug":"%e5%9c%a8git%e4%b8%ad%e6%b7%bb%e5%8a%a0hg%e4%bb%93%e5%ba%93","status":"publish","type":"post","link":"https:\/\/blog.mega-zone.org\/?p=400","title":{"rendered":"\u5728git\u4e2d\u6dfb\u52a0hg\u4ed3\u5e93"},"content":{"rendered":"<p>\u56e0\u4e3a\u8981\u6539sdl\u7684\u4ee3\u7801\uff0c\u53c8\u4e0d\u60f3\u7528hg\uff0c\u6240\u4ee5\u60f3\u627e\u4e2a\u7c7b\u4f3cremote svn\u4e00\u6837\u7684\u73a9\u610f\u513f\u3002<\/p>\n<p>\u653e\u72d7\u4e00\u641c\u7ed3\u679c\u53d1\u73b0\u8fd8\u771f\u6709\uff0c\u4f5c\u8005felipec\u5199\u4e86\u5f88\u8be6\u7ec6\u7684\u4ecb\u7ecd\uff1a<br \/>\n<a href=\"http:\/\/felipec.wordpress.com\/2012\/11\/13\/git-remote-hg-bzr-2\/\">http:\/\/felipec.wordpress.com\/2012\/11\/13\/git-remote-hg-bzr-2\/<\/a><\/p>\n<p>\u770b\u8d77\u6765\u662flinux\u4e0b\u7684\u73a9\u610f\u513f\uff0c\u4f46\u4f5c\u8005\u6ca1\u8bf4\u5728windows\u4e0b\u600e\u4e48\u7528\u3002\u65e2\u7136\u662f\u4e2a\u811a\u672c\uff0c\u6ca1\u7406\u7531\u4e0d\u80fd\u5728windows\u4e0b\u8dd1\u3002\u7ee7\u7eed\u641c\uff0c\u627e\u5230\u4e86\u4e00\u4e2a\u4eba\u5728stack overflow\u4e0a\u7684\u53d1\u95ee\uff0c\u5173\u4e8e\u8fd9\u73a9\u610f\u513f\u600e\u4e48\u5b89\u88c5\u7684\u95ee\u9898\uff1a<\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/883452\/git-interoperability-with-a-mercurial-repository\">http:\/\/stackoverflow.com\/questions\/883452\/git-interoperability-with-a-mercurial-repository<\/a><\/p>\n<p>felipec\u5f88\u4e50\u4e8e\u63a8\u9500\u81ea\u5df1\u7684\u4f5c\u54c1\uff0c\u6b64\u95ee\u9898\u5c31\u662f\u4ed6\u56de\u7b54\u7684\u3002\u53ef\u60dc\u8fd8\u662f\u6ca1\u8bf4\u6e05\u695a\u600e\u4e48\u5b89\u88c5\uff0c\u6240\u4ee5\u8bc4\u8bba\u91cc\u4e5f\u6709\u4eba\u55b7\u4ed6\uff0c&#8217;Simplicity. Ah&#8230; Magic!&#8217;<\/p>\n<p>\u6211\u53ea\u597d\u5148\u53bb\u4ed6\u7684github\u4e0a\u770b\u770b\u4ee3\u7801\uff1a<br \/>\n<a href=\"https:\/\/github.com\/felipec\/git\/blob\/fc\/master\/contrib\/remote-helpers\/git-remote-hg.py\">https:\/\/github.com\/felipec\/git\/blob\/fc\/master\/contrib\/remote-helpers\/git-remote-hg.py<\/a><\/p>\n<p>\u4ee3\u7801\u91cc\u4f3c\u4e4e\u6709windows\u7684\u5b57\u6837\uff0c\u4e5f\u8bb8\u6700\u8fd1\u66f4\u65b0\u8fc7\u3002\u597d\u5427\u5c31\u5047\u8bbewindows\u53ef\u4ee5\u76f4\u63a5\u7528\u4e86\uff0c\u6211\u4e0b\u8f7d\u4e86\u4e00\u4efd\uff0c\u628apython27\u4e5f\u88c5\u4e0a\uff0c\u8bbe\u7f6e\u597dPATH\u3002<\/p>\n<p>\u6839\u636e\u4f5c\u8005\u4e00\u8d2f\u7684\u53e3\u6c14\uff0c\u53ea\u8981\u628a\u811a\u672c\u4e5f\u653e\u5230PATH\u4e2d\u7684\u8def\u5f84\u4e0b\u5373\u53ef\u3002\u6211\u7167\u505a\uff0c\u7136\u540e\u6267\u884c\uff1a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">git clone hg::http:\/\/&lt;any-hg-url&gt;<\/pre>\n<p>\u5374\u62a5\u4e86\u4e2a\u5f88\u5947\u602a\u7684\u9519\uff1a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">fatal: git was built without support for\r\nC:\\Program (NO_PYTHON=YesPlease)<\/pre>\n<p>\u8fd9\u4e2aYesPlease\u7684\u63d0\u793a\u770b\u8d77\u6765\u5f88\u6028\u5ff5\u7684\u6837\u5b50\uff0c\u6211\u7ee7\u7eed\u641c\uff0c\u679c\u7136\u4e5f\u6709\u4eba\u5728\u95ee\uff1a<br \/>\n<a href=\"https:\/\/groups.google.com\/forum\/?fromgroups#!topic\/msysgit\/LpyViW97g0A\">https:\/\/groups.google.com\/forum\/?fromgroups#!topic\/msysgit\/LpyViW97g0A<\/a><\/p>\n<p>\u4e00\u770b\u5185\u5bb9\u6211\u5c31\u7b11\u4e86\uff0c\u8c8c\u4f3c\u662fmsysgit\u7684\u4eba\u5728\u55b7\u8fd9\u4e2afelipec\uff0c\u8bf4\u4ed6\u4e0d\u80af\u548cmsysgit\u5408\u4f5c\u3002\u7ed3\u679cfelipec\u8df3\u51fa\u6765\u53cd\u55b7\uff0c\u8bf4msysgit\u6709\u610f\u5ffd\u7565\u4ed6\u7684\u4f5c\u54c1\u3002<\/p>\n<p>\u603b\u4e4b\u4ed6\u4fe9\u5f88\u6b22\u4e50\u7684\u55b7\u4e86\u534a\u5929\uff0c\u8fd8\u662f\u6ca1\u8bf4\u600e\u4e48\u5b89\u88c5\u2026\u2026<\/p>\n<p>\u6211\u53ea\u597d\u81ea\u529b\u66f4\u751f\u2026\u2026 \u5148\u641c\u4e86\u4e00\u4e0b\u6587\u4ef6\u540d\uff0c\u5728msysgit\u7684\u5b89\u88c5\u76ee\u5f55git\\libexec\\git-core\u4e2d\u5c45\u7136\u53d1\u73b0\u4e86\u540d\u4e3agit-remote-hg\u7684\u6587\u4ef6\uff0c\u5185\u5bb9\u5c31\u51e0\u884c\uff1a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n#!\/bin\/sh\r\necho &gt;&amp;2\u00a0&quot;fatal: git was built without support for `basename $0` (NO_PYTHON=YesPlease).&quot;\r\nexit 128\r\n<\/pre>\n<p>\u6211\u64e6\u54a7\u8fd9\u4e0d\u5c31\u662f\u62a5\u9519\u7684\u5730\u65b9\u4e48\u3002\u6211\u60f3\u4e86\u60f3\uff0c\u628agit-remote-hg.py\u53bb\u6389\u6269\u5c55\u540d\uff0c\u7136\u540e\u66ff\u6362\u4e86\u8fd9\u4e2a\u6587\u4ef6\u3002\u8bd5\u4e86\u4e0bgit clone\uff0c\u8fd9\u4e0b\u6709\u70b9\u8fdb\u6b65\u4e86\uff0c\u811a\u672c\u5f00\u59cb\u8fd0\u884c\uff0c\u62a5\u9519\u8bf4\u627e\u4e0d\u5230mercurial\u6a21\u5757\u3002<\/p>\n<p>\u597d\u5427\u6211\u786e\u5b9e\u5fd8\u8bb0\u7ed9python\u5b89\u88c5mercurial\u6a21\u5757\u4e86\u3002\u4e8e\u662f\u5230hg\u7684\u5b98\u7f51\u4e0b\u8f7dmercurial-2.6.tar.gz\uff0c\u7136\u540e\u5c1d\u8bd5\u6267\u884c\u91cc\u9762\u7684setup.py\uff1a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">python setup.py build<\/pre>\n<p>build\u5c45\u7136\u62a5\u9519\uff1a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">error: Unable to find vcvarsall.bat<\/pre>\n<p>\u6211\u4e00\u76f4\u4ee5\u4e3amercurial\u662f\u7eafpython\u7684\uff0c\u539f\u6765\u8fd8\u6709c\u4ee3\u7801\uff01\u53ef\u662f\u6211\u6709\u88c5vs2012\uff0cvcvarsall.bat\u662f\u7528\u6765\u914d\u7f6evc\u7f16\u8bd1\u73af\u5883\u7684\uff0c\u6309\u9053\u7406\u6211\u662f\u6709\u7684\u3002<\/p>\n<p>\u53ea\u597d\u7ee7\u7eed\u641c\uff0c\u7ffb\u8fc7\u5404\u79cd\u4e0d\u9760\u8c31\u7684\u9875\u9762\u4e4b\u540e\uff0c\u627e\u5230\u4e86\u4e00\u7bc7\u8be6\u7ec6\u7684\u89e3\u91ca\uff1a<br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/3047542\/building-lxml-for-python-2-7-on-windows\/5122521#5122521\">http:\/\/stackoverflow.com\/questions\/3047542\/building-lxml-for-python-2-7-on-windows\/5122521#5122521<\/a><\/p>\n<p>\u7b80\u5355\u7684\u8bf4\u5c31\u662fpython\u7684windows\u7248\u90fd\u662f\u7528vs2008\u7f16\u8bd1\u7684\uff0c\u6240\u4ee5\u5b83\u975e\u8981\u627evs2008\u7684\u73af\u5883\u53d8\u91cf\u3002\u5982\u679c\u6362\u7f16\u8bd1\u5668\u6765\u7f16\u8bd1\u6a21\u5757\uff0c\u53ef\u80fd\u5de5\u4f5c\u4e0d\u6b63\u5e38\u3002<\/p>\n<p>\u8fd9\u4e2a\u5e16\u5b50\u5efa\u8bae\u662f\uff0c\u53bb\u88c5\u4e2a\u514d\u8d39\u7684vs2008 express\u5427\uff01<\/p>\n<p>\u770b\u5230\u8fd9\u91cc\u6211\u76f4\u63a5\u6655\u5012\uff0c\u5f00\u6e90\u793e\u533a\u7684\u4eba\u5bf9\u5f85windows\u7528\u6237\u771f\u662f\u4e0d\u53cb\u597d\u554a\u3002\u4f55\u4ee5\u89e3\u5fe7\uff1f\u552f\u6709google\uff01\u7ed5\u4e86\u4e00\u5927\u5708\u540e\uff0c\u6211\u5728mercurial\u5b98\u7f51\u770b\u5230\u4e86\u89e3\u51b3\u65b9\u6848\uff1a<br \/>\n<a href=\"http:\/\/mercurial.selenic.com\/wiki\/WindowsInstall\">http:\/\/mercurial.selenic.com\/wiki\/WindowsInstall<\/a><\/p>\n<p>\u539f\u6765\u53ea\u9700\u8981\u5f3a\u5236\u6362\u7528\u5176\u4ed6\u7f16\u8bd1\u73af\u5883\u5c31\u597d\uff0c\u8b6c\u5982\u5b98\u7f51\u8bf4\u53ef\u4ee5\u7528mingw\u6765\u4ee3\u66ff\uff1a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\npython setup.py build --force -c mingw32\r\npython setup.py install --force --skip-build<\/pre>\n<p>\u55ef\u55ef\uff0c\u8fd8\u662f\u5b98\u7f51\u9760\u8c31\uff0c\u4e8e\u662f\u4e4emercurial\u7684python package\u7ec8\u4e8e\u53ef\u4ee5\u7f16\u8bd1\u5b89\u88c5\u4e86\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u56de\u5230\u6211\u7684\u6700\u521d\u76ee\u7684\uff1a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">git clone hg::http:\/\/&lt;any-hg-url&gt;<\/pre>\n<p>\u987a\u5229\u901a\u8fc7\u4e86\uff01\u55ef\u55ef\uff0c\u7ec8\u4e8e\u53ef\u4ee5\u5f00\u59cb\u5e72\u6b63\u4e8b\u513f\u4e86\u2026\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3a\u8981\u6539sdl\u7684\u4ee3\u7801\uff0c\u53c8\u4e0d\u60f3\u7528hg\uff0c\u6240\u4ee5\u60f3\u627e\u4e2a\u7c7b\u4f3cremote svn\u4e00\u6837\u7684\u73a9\u610f\u513f\u3002 \u653e\u72d7\u4e00\u641c\u7ed3\u679c\u53d1\u73b0\u8fd8\u771f\u6709\uff0c\u4f5c\u8005felipec\u5199\u4e86\u5f88\u8be6\u7ec6\u7684\u4ecb\u7ecd\uff1a http:\/\/felipec.wordpress.com\/2012\/11\/13\/git-remote-hg-bzr-2\/ \u770b\u8d77\u6765\u662flinux\u4e0b\u7684\u73a9\u610f\u513f\uff0c\u4f46\u4f5c\u8005\u6ca1\u8bf4\u5728windows\u4e0b\u600e\u4e48\u7528\u3002\u65e2\u7136\u662f\u4e2a\u811a\u672c\uff0c\u6ca1\u7406\u7531\u4e0d\u80fd\u5728windows\u4e0b\u8dd1\u3002\u7ee7\u7eed\u641c\uff0c\u627e\u5230\u4e86\u4e00\u4e2a\u4eba\u5728stack overflow\u4e0a\u7684\u53d1\u95ee\uff0c\u5173\u4e8e\u8fd9\u73a9\u610f\u513f\u600e\u4e48\u5b89\u88c5\u7684\u95ee\u9898\uff1a http:\/\/stackoverflow.com\/questions\/883452\/git-interoperability-with-a-mercurial-repository felipec\u5f88\u4e50\u4e8e\u63a8\u9500\u81ea\u5df1\u7684\u4f5c\u54c1\uff0c\u6b64\u95ee\u9898\u5c31\u662f\u4ed6\u56de\u7b54\u7684\u3002\u53ef\u60dc\u8fd8\u662f\u6ca1\u8bf4\u6e05\u695a\u600e\u4e48\u5b89\u88c5\uff0c\u6240\u4ee5\u8bc4\u8bba\u91cc\u4e5f\u6709\u4eba\u55b7\u4ed6\uff0c&#8217;Simplicity. Ah&#8230; Magic!&#8217; \u6211\u53ea\u597d\u5148\u53bb\u4ed6\u7684github\u4e0a\u770b\u770b\u4ee3\u7801\uff1a https:\/\/github.com\/felipec\/git\/blob\/fc\/master\/contrib\/remote-helpers\/git-remote-hg.py \u4ee3\u7801\u91cc\u4f3c\u4e4e\u6709windows\u7684\u5b57\u6837\uff0c\u4e5f\u8bb8\u6700\u8fd1\u66f4\u65b0\u8fc7\u3002\u597d\u5427\u5c31\u5047\u8bbewindows\u53ef\u4ee5\u76f4\u63a5\u7528\u4e86\uff0c\u6211\u4e0b\u8f7d\u4e86\u4e00\u4efd\uff0c\u628apython27\u4e5f\u88c5\u4e0a\uff0c\u8bbe\u7f6e\u597dPATH\u3002 \u6839\u636e\u4f5c\u8005\u4e00\u8d2f\u7684\u53e3\u6c14\uff0c\u53ea\u8981\u628a\u811a\u672c\u4e5f\u653e\u5230PATH\u4e2d\u7684\u8def\u5f84\u4e0b\u5373\u53ef\u3002\u6211\u7167\u505a\uff0c\u7136\u540e\u6267\u884c\uff1a git clone hg::http:\/\/&lt;any-hg-url&gt; \u5374\u62a5\u4e86\u4e2a\u5f88\u5947\u602a\u7684\u9519\uff1a fatal: git was built without support for C:\\Program (NO_PYTHON=YesPlease) \u8fd9\u4e2aYesPlease\u7684\u63d0\u793a\u770b\u8d77\u6765\u5f88\u6028\u5ff5\u7684\u6837\u5b50\uff0c\u6211\u7ee7\u7eed\u641c\uff0c\u679c\u7136\u4e5f\u6709\u4eba\u5728\u95ee\uff1a https:\/\/groups.google.com\/forum\/?fromgroups#!topic\/msysgit\/LpyViW97g0A \u4e00\u770b\u5185\u5bb9\u6211\u5c31\u7b11\u4e86\uff0c\u8c8c\u4f3c\u662fmsysgit\u7684\u4eba\u5728\u55b7\u8fd9\u4e2afelipec\uff0c\u8bf4\u4ed6\u4e0d\u80af\u548cmsysgit\u5408\u4f5c\u3002\u7ed3\u679cfelipec\u8df3\u51fa\u6765\u53cd\u55b7\uff0c\u8bf4msysgit\u6709\u610f\u5ffd\u7565\u4ed6\u7684\u4f5c\u54c1\u3002 \u603b\u4e4b\u4ed6\u4fe9\u5f88\u6b22\u4e50\u7684\u55b7\u4e86\u534a\u5929\uff0c\u8fd8\u662f\u6ca1\u8bf4\u600e\u4e48\u5b89\u88c5\u2026\u2026 \u6211\u53ea\u597d\u81ea\u529b\u66f4\u751f\u2026\u2026 \u5148\u641c\u4e86\u4e00\u4e0b\u6587\u4ef6\u540d\uff0c\u5728msysgit\u7684\u5b89\u88c5\u76ee\u5f55git\\libexec\\git-core\u4e2d\u5c45\u7136\u53d1\u73b0\u4e86\u540d\u4e3agit-remote-hg\u7684\u6587\u4ef6\uff0c\u5185\u5bb9\u5c31\u51e0\u884c\uff1a #!\/bin\/sh echo &gt;&amp;2\u00a0&quot;fatal: git was built without support for `basename $0` (NO_PYTHON=YesPlease).&quot; exit 128 \u6211\u64e6\u54a7\u8fd9\u4e0d\u5c31\u662f\u62a5\u9519\u7684\u5730\u65b9\u4e48\u3002\u6211\u60f3\u4e86\u60f3\uff0c\u628agit-remote-hg.py\u53bb\u6389\u6269\u5c55\u540d\uff0c\u7136\u540e\u66ff\u6362\u4e86\u8fd9\u4e2a\u6587\u4ef6\u3002\u8bd5\u4e86\u4e0bgit clone\uff0c\u8fd9\u4e0b\u6709\u70b9\u8fdb\u6b65\u4e86\uff0c\u811a\u672c\u5f00\u59cb\u8fd0\u884c\uff0c\u62a5\u9519\u8bf4\u627e\u4e0d\u5230mercurial\u6a21\u5757\u3002 \u597d\u5427\u6211\u786e\u5b9e\u5fd8\u8bb0\u7ed9python\u5b89\u88c5mercurial\u6a21\u5757\u4e86\u3002\u4e8e\u662f\u5230hg\u7684\u5b98\u7f51\u4e0b\u8f7dmercurial-2.6.tar.gz\uff0c\u7136\u540e\u5c1d\u8bd5\u6267\u884c\u91cc\u9762\u7684setup.py\uff1a python setup.py build build\u5c45\u7136\u62a5\u9519\uff1a error: &hellip; <a href=\"https:\/\/blog.mega-zone.org\/?p=400\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u5728git\u4e2d\u6dfb\u52a0hg\u4ed3\u5e93&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[13,20,31,32],"_links":{"self":[{"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=\/wp\/v2\/posts\/400"}],"collection":[{"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=400"}],"version-history":[{"count":20,"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=\/wp\/v2\/posts\/400\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mega-zone.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}