{"id":2080,"date":"2019-09-05T18:43:19","date_gmt":"2019-09-05T10:43:19","guid":{"rendered":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/?p=2080"},"modified":"2019-09-05T18:46:27","modified_gmt":"2019-09-05T10:46:27","slug":"%e4%bb%8ehg%e8%bf%81%e7%a7%bb%e5%ba%93%e5%88%b0git","status":"publish","type":"post","link":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/2019\/09\/05\/%e4%bb%8ehg%e8%bf%81%e7%a7%bb%e5%ba%93%e5%88%b0git\/","title":{"rendered":"\u4eceHG\u8fc1\u79fb\u5e93\u5230Git"},"content":{"rendered":"\n<p>\u8fc1\u79fb\u5de5\u4f5c\u6bd4\u8f83\u7b80\u5355\uff0c\u53c2\u8003BitBucket\u63a8\u8350\u7684<a rel=\"noreferrer noopener\" aria-label=\"\u4e00\u7bc7blog\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\" href=\"http:\/\/arr.gr\/blog\/2011\/10\/bitbucket-converting-hg-repositories-to-git\/\" target=\"_blank\">\u4e00\u7bc7blog<\/a>\uff0c\u57fa\u672c\u64cd\u4f5c\u4e0e\u8be5\u535a\u4e3b\u7684\u63cf\u8ff0\u4e00\u81f4\uff0c\u90e8\u5206\u6709\u4e9b\u5dee\u5f02\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u64cd\u4f5c\u57fa\u4e8eDebian\u7cfb\u7edf\u3002<\/p>\n\n\n\n<p>\u9996\u5148\u5b89\u88c5mercurial-git\uff0c\u8fd9\u4e2a\u5de5\u5177\u4f1a\u81ea\u52a8\u5c06\u539fhg\u5e93\u7684\u4fe1\u606f\u63d0\u4ea4\u7ed9\u65b0\u7684Git\u5e93\uff0c\u4f1a\u4fdd\u7559\u4ee5\u524dcommit\u7684comment\u5185\u5bb9\uff0c\u8fd9\u70b9\u5c24\u4e3a\u91cd\u8981\u3002\u5982\u679c\u4e0d\u5173\u5fc3\u4ee5\u524d\u7684comment\uff0c\u5c31\u6ca1\u5565\u597d\u8bf4\u4e86\uff0c\u76f4\u63a5\u5c06\u6574\u4e2a\u4ee3\u7801\u63d0\u4ea4\u7ed9Git\u5c31\u5b8c\u4e8b\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install mercurial-git<\/pre>\n\n\n\n<p>\u63a5\u7740\u9700\u8981\u8ba9 HG \u77e5\u9053\u6709 mercurial-git \u8fd9\u4e2a\u6269\u5c55\uff0c\u5e76\u80fd\u64cd\u4f5cGit\u5e93\u3002 \u4fee\u6539~\/.hgrc\u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9\u5373\u53ef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[extensions]\nhgext.git=<\/pre>\n\n\n\n<p>\u5982\u679c\u5e0c\u671b\u5c06HG\u7684branch\u4e5f\u8f6c\u5316\u6210Git\u4e2d\u7684branch\uff0c\u5219\u9700\u8981\u505a\u4e00\u4e9b\u7a0d\u663e\u53e4\u602a\u7684\u64cd\u4f5c\u3002\u8bf7\u6ce8\u610f\uff1aHG\u4e2d\u7684branch\u4e0d\u5bf9\u5e94Git\u7684branch\uff01\u6211\u4e0d\u592a\u6e05\u695a\u662fHG\u7684\u95ee\u9898\uff0c\u8fd8\u662f mercurial-git \u8fd9\u4e2a\u5de5\u5177\u7684\u95ee\u9898\uff0c\u9700\u8981\u4e3a\u6bcf\u4e2a\u5206\u652f\u8bbe\u7f6ebookmark\uff0c\u7136\u540e\u6839\u636e\u8fd9\u4e9bbookmark\u8f6c\u6362\u6210Git\u4e2d\u7684branch\u3002<\/p>\n\n\n\n<p>\u4f8b\u5982\uff0c\u5c06HG\u5e93\u4e2d\u7684default\u3001mss_v36\u3001mss_v36_dev\u4e09\u4e2a\u5206\u652f\uff0c\u5206\u522b\u5bf9\u5e94Git\u5e93\u4e2d\u7684master\u3001mss_v36_hg \u4ee5\u53ca mss_v36_dev_hg \u5206\u652f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">hg bookmark -r default master\nhg bookmark -r mss_v36 mss_v36_hg\nhg bookmark -r mss_v36_dev mss_v36_dev_hg<\/pre>\n\n\n\n<p>\u7136\u540e\uff0c\u76f4\u63a5\u63a8\u9001\u5230Git\u7684\u8fdc\u7aef\u5e93\u5373\u53ef\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">hg push git+ssh:\/\/git@bitbucket.org:my_account\/my_apps.git<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8fc1\u79fb\u5de5\u4f5c\u6bd4\u8f83\u7b80\u5355\uff0c\u53c2\u8003BitBucket\u63a8\u8350\u7684\u4e00\u7bc7blog\uff0c\u57fa\u672c\u64cd\u4f5c\u4e0e\u8be5\u535a\u4e3b\u7684\u63cf\u8ff0\u4e00\u81f4\uff0c\u90e8\u5206\u6709\u4e9b\u5dee\u5f02\u3002 \u4ee5\u4e0b\u64cd\u4f5c\u57fa\u4e8eDebian\u7cfb\u7edf\u3002 \u9996\u5148\u5b89\u88c5mercuria&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.myvoipapp.com\/blogs\/yxh\/2019\/09\/05\/%e4%bb%8ehg%e8%bf%81%e7%a7%bb%e5%ba%93%e5%88%b0git\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[735,78,312,314,313,315],"class_list":["post-2080","post","type-post","status-publish","format-standard","hentry","category-53","tag-bitbucket","tag-debian","tag-git","tag-hg","tag-mercurial","tag-315"],"_links":{"self":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/2080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/comments?post=2080"}],"version-history":[{"count":4,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/2080\/revisions"}],"predecessor-version":[{"id":2084,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/posts\/2080\/revisions\/2084"}],"wp:attachment":[{"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/media?parent=2080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/categories?post=2080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myvoipapp.com\/blogs\/yxh\/wp-json\/wp\/v2\/tags?post=2080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}