This short guide should be helpful for Mercurial users:
https://docs.google.com/document/d/13AwAsvKMhH0mflDlfatBqn6LmZHiQih76oxM4zfrPl4

On Thu, Nov 29, 2018 at 11:49 AM Ehsan Akhgari <ehsan.akhg...@gmail.com>
wrote:

> On Thu, Nov 29, 2018 at 11:44 AM Honza Bambas <hbam...@mozilla.com> wrote:
>
>> On 2018-11-29 17:12, Ehsan Akhgari wrote:
>> > On Thu, Nov 29, 2018 at 8:00 AM Boris Zbarsky <bzbar...@mit.edu> wrote:
>> >
>> >> On 11/29/18 7:38 AM, Sylvestre Ledru wrote:
>> >>> This extension will automatically rebase the local changes to avoid
>> >>> conflicts.
>> >> Sylvestre,
>> >>
>> >> Will it also update mq patches, or just in-repo commits?
>> >>
>> > I don't think this extension is aware of mq patches (since they don't
>> > really get rebased), but that being said from my foggy memory of using
>> mq
>> > ages ago, I seem to remember that it used to be possible to use the
>> qfinish
>> > command to convert them into regular hg commits and then later on to use
>> > qimport -r (IIRC) to convert them back into mq patches again.  If that
>> is
>> > still a workflow that works, then it should be possible to:
>> >
>> >    * 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.
>>
>> And you forget that a merge will be needed here, because the formatting
>> changes will likely collide with the code one's patches are touching.
>>
>
> No, I didn't.  :-)  That's exactly what the hg-formatsource extension does
> for you, it reformats your local changes on the fly as the rebase is in
> progress, so you will get no collisions.
>
>
>> When we were mass-converting from PRUint32 to uint32_t etc, there was a
>> tool capable of converting your patches based on the pre-formated code
>> to be apply-able on the formatted code.
>>
>> This is what we are missing.  So some of us may expect a huge merge pain
>> w/o something like that.
>>
>
> No, those are old days and long gone, my friend.  We are living in a new
> world with better tools these days (for Mercurial users).
>
>
>> OTOH, if the changes are only whitespace changes, maybe there is some
>> way `patch --ignore-whitespace --fuzz N` could apply the patches.  Then
>> just re-format and your patches are OK.
>>
>>
>> >    * Do a one-time translation of your mq queue back to a series of
>> patches.
>>
>> That doesn't make much sense, because the commit history will look
>> something like (newest to oldest):
>> - merge of my patches with the formatted changes, having two parents
>> (formatted code default + my mq tip)
>> - formatted code `tip` (or `default`)
>> - my mq committed [ ]
>> - pre-formated parent
>> - ...
>>
>> You can't just recreate your mq from such changeset tree and you also
>> can't avoid the likely quite complicated merge anyway.
>>
>
> Again, no merge commits.  Please do note that I was suggesting there that
> you should use the rebase command, not merge.  I think that would be |hg
> pull --rebase|.
>
> --
> Ehsan
>


-- 
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to