{"id":3705,"date":"2016-12-02T14:31:28","date_gmt":"2016-12-02T05:31:28","guid":{"rendered":"https:\/\/glandium.org\/blog\/?p=3705"},"modified":"2019-09-03T15:21:14","modified_gmt":"2019-09-03T06:21:14","slug":"faster-git-cinnabar-graft-of-gecko-dev","status":"publish","type":"post","link":"https:\/\/glandium.org\/blog\/?p=3705","title":{"rendered":"Faster git-cinnabar graft of gecko-dev"},"content":{"rendered":"<p>Cloning Mozilla repositories from scratch with git-cinnabar can be a long process. <a href=\"\/blog\/?p=3543\">Grafting them to gecko-dev<\/a> is an equally long process.<\/p>\n<p>The metadata git-cinnabar keeps is such that it can be exchanged, but it's also structured in a way that doesn't allow <code>git push<\/code> and <code>fetch<\/code> to do that efficiently, and pushing <code>refs\/cinnabar\/metadata<\/code> to github fails because it wants to push more than 2GB of data, which github doesn't allow.<\/p>\n<p>But with some munging before a push, it is possible to limit the push to a fraction of that size and stay within github limits. And inversely, some munging after fetching allows to produce the metadata git-cinnabar wants.<\/p>\n<p>The news here is that there is now a <code>cinnabar<\/code> head on <code>https:\/\/github.com\/glandium\/gecko-dev<\/code> that contains the munged metadata, and a <a href=\"https:\/\/gist.github.com\/glandium\/56a61454b2c3a1ad2cc269cc91292a56\">script that fetches it and produces the git-cinnabar metadata<\/a> in an existing clone of gecko-dev. An easy way to run it is to use the following command from a gecko-dev clone:<\/p>\n<blockquote><p><code>$ curl -sL https:\/\/gist.github.com\/glandium\/56a61454b2c3a1ad2cc269cc91292a56\/raw\/bfb66d417cd1ab07d96ebe64cdb83a4217703db9\/import.py | git cinnabar python<\/code><\/p><\/blockquote>\n<p>On my machine, the process takes 8 minutes instead of more than an hour. Make sure you use git-cinnabar 0.4.0rc for this.<\/p>\n<p>Please note this doesn't bring the full metadata for gecko-dev, just the metadata as of yesterday. This may be updated irregularly in the future, but don't count on that.<\/p>\n<p>So, from there, you still need to add mercurial remotes and pull from there, as per the <a href=\"https:\/\/github.com\/glandium\/git-cinnabar\/wiki\/Mozilla:-Using-a-git-clone-of-gecko%E2%80%90dev-to-push-to-mercurial\">original workflow<\/a>.<\/p>\n<p>Planned changes for version 0.5 of git-cinnabar will alter the metadata format such that it will be exchangeable without munging, making the process simpler and faster.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cloning Mozilla repositories from scratch with git-cinnabar can be a long process. Grafting them to gecko-dev is an equally long process. The metadata git-cinnabar keeps is such that it can be exchanged, but it&#8217;s also structured in a way that doesn&#8217;t allow git push and fetch to do that efficiently, and pushing refs\/cinnabar\/metadata to github [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[23],"class_list":["post-3705","post","type-post","status-publish","format-standard","hentry","category-planet-mozilla","tag-en"],"_links":{"self":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3705"}],"version-history":[{"count":8,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3705\/revisions"}],"predecessor-version":[{"id":3713,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3705\/revisions\/3713"}],"wp:attachment":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}