On 13/12/2018 14:52, Randell Jesup wrote:
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.
tl;dr: I need to figure out how I'm going to dig out of the rebasing hole
I'm now in, and could use advice/help, and I think the above sequence
doesn't work for queues of dependent patches.
If I'm understanding your situation correctly, I believe you can use
rebase to update a whole queue of dependent patches, provided you have
the format-source extension enabled.
Starting with all patches popped:
$ hg pull -u # get latest tree and make a note of the current tip
$ hg log # changeset that you'll want to rebase your queue onto
$ hg up PRE_TREEWIDE_CLANG_FORMAT # go to the pre-format changeset
$ hg qpush <each patch you want to rescue, unbitrotting as needed>
$ hg qfin -a # turn your applied patches into local commits
$ hg rebase -d DEST # where DEST is current m-c tip (or wherever you
# want to be working)
$ hg qimport -r tip # pull top local commit into mq
$ hg qpop # and pop to unapply it
Repeat last two steps for each commit that you want to pull back into
mq. Now you should have a queue that is based on the updated tree.
The rebase step may require some manual conflict resolution, but should
be able to manage a lot of it automatically for you.
You lose the original patch names in this process, as "hg qimport -r
tip" names them automatically (or you could use -n <name> to assign your
preferred names when re-importing them).
You can repeatedly go back to PRE_TREEWIDE_CLANG_FORMAT and run this
sequence for as many separate sets of dependent patches as you care about.
HTH,
JK
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform