Unfortunately, the ‘format-source’ extension did not work for me. Please see <https://bugzilla.mozilla.org/show_bug.cgi?id=1511594>.
On 2018/11/30 23:46, Andi-Bogdan Postelnicu wrote: > Hello all > > Starting with revision 6f3709b3878117466168c40affa7bca0b60cf75b > <https://hg.mozilla.org/mozilla-central/rev/6f3709b3878117466168c40affa7bca0b60cf75b> > mozilla-central has been formatted using ./mach clang-format following the > Google coding style. > In order to diminish as much as possible the effort of merging pre-format > patches into our newly formatted repo we devised the following plan for the > two SCMs that we use: > > Mercurial > > Please make sure you run ‘mach bootstrap’ and allow the install of the > ‘format-source’ extension before pulling the reformat changeset. This > extension provides a simple and behind-the-curtains way on how you can > integrate un-formatted code into a formatted repo. > > Example > Let’s assume the patch that need rebasing is at rev: 1000 and mozilla-central > is at rev: 2000. > > hg rebase -b 1000 -d 2000 > > Or in case you want to have a more verbose output: > > hg rebase -b 1000 -d 2000 -debug > > The extension registers at the merge level and it will format both sides and > after that uses the original merge tool to combine for the final result. > > For more detailed information on the process please also see this > <https://docs.google.com/document/d/13AwAsvKMhH0mflDlfatBqn6LmZHiQih76oxM4zfrPl4/edit?usp=drive_web&ouid=110354964518198126513> > document. > > Git > Courtesy of Ehsan and Emilio there are two ways that help with the merge: > Ehsan’s implementation > <https://github.com/ehsan/clang-format-reformat-branch> > Emilio’s implementation <https://github.com/emilio/clang-format-merge> > For your convenience, the parent changeset of the reformat changeset has been > tagged in Mercurial as “PRE_TREEWIDE_CLANG_FORMAT”. This will allow easily > updating to that version using the following command for example when > rebasing local changes: > > hg up -r PRE_TREEWIDE_CLANG_FORMAT > > > Hope this transition goes smooth as possible but if something comes up and > you need assistance please ping Andi on IRC. > > Many thanks, > Ehsan, Sylvestre and Andi > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform