On Thu, Nov 29, 2018 at 11:30 AM Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 11/29/18 11:12 AM, Ehsan Akhgari wrote: > > * Pull from a pre-reformat of the tree, run ./mach bootstrap to > install > > hg-formatsource. > > * Do a one-time translation of your mq queue to a set of commits. > > * Pull from hg.mozilla.org to pick up the reformat commit. > > * Do a one-time translation of your mq queue back to a series of > patches. > > So just to be clear, I have a dozen or so queues with hundreds of > patches in them, not all of which will immediately apply due to age. So > this is not a simple operation, unfortunately... > Yes, that is true sadly. But to be fair here, old mq patches that do not apply due to age are already beyond saving with any kind of automated tooling, and they require manual work to get them applied first. :-/ > I guess there's no real way to clang-format diffs, so maybe the answer > is manual merging when I actually need those patches. > That's not true. clang-format can happily format diffs. When formatting diffs though it tries to format your changes, not the context around the diffs, as the use case it has been designed for is for example quickly reformatting your changes in a pre-commit hook. But still all is not lost here. When you do decide to do the manual merging when you needed those patches, you would need to: * Update your working tree to the parent of the commit that did the reformat. * Apply your patch to that tree and reformat the tree. * Diff the reformat commit and your current working directory. That would give the reformatted diff. -- Ehsan _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform