Re: [more experimients]
> From: Uwe Brauer > Sent: Wednesday, October 25, 2023 12:16 AM > Subject: [more experimients] (was: single-file-merge?) > You're right. As long as you remember to repeat your 'Single file [Snip]... > The only other thing I'd point out is your test example doesn't give > you the same result as using graft because you aren't actually merging > your single file, you're replacing it. That is correct, as I said in the beginning I was using just revert, but wanted in addition some visual feed back in the graph. This is why I came up with that solution, and its a corner case to call it merge. > If it was your intent to replace all changes to test.org in default > great. But if you only intended to replace the bugged Forth change and > forgot you also had a Third and Six change... Right, then I either 1. need graft (and hopefully did a one file commit before) 2. Or things get tricky, if I drop the tool --tool internal:other option, then a real merge occurs, however then I must so to speak undo all the unwanted parts of the merge manually, since I am not sure there exist simple commands to deal with it. I really wish, a graft operation would be somehow displayed in the graph say by dots instead of lines Uwe > > This e-mail message, including any attachments, is for the sole use of > the intended recipient(s) and may contain information that is > confidential and protected by law from unauthorized disclosure. Any > unauthorized review, use, disclosure or distribution is prohibited. If > you are not the intended recipient, please contact the sender by reply > e-mail and destroy all copies of the original message. -- Warning: Content may be disturbing to some audiences I strongly condemn Hamas terroristic attack on Israel, especially the despicable pogroms. I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the NATO membership of Ukraine. I support the EU membership of Ukraine. https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/ smime.p7s Description: S/MIME cryptographic signature ___ Mercurial mailing list Mercurial@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial
RE: [more experimients] (was: single-file-merge?)
From: Uwe Brauer Sent: Wednesday, October 25, 2023 12:16 AM Subject: [more experimients] (was: single-file-merge?) > > > I'm pretty sure all those file changes you threw away in the merge > > from meta to default will get stripped from meta if you later merge > > default back into meta. > > > I tried the following > hg init > echo "First" > test.org > hg add test.org > hg commit -m "0: First" > echo "Second" >> test.org > hg commit -m "1: Second" > echo "Third" >> test.org > hg commit -m "2: Third" > echo "Forth" >> test.org > hg commit -m "3: BUG Fourth" > hg up -r 1 > hg branch meta > echo "new stuff" >> meta.org > hg add meta.org > hg commit -m "Add meta.org to the meta branch" > echo "Fifth" >> test.org > hg commit -m "4: Fifth" > hg up default > echo "Six" >> test.org > hg commit -m "5: Six" > hg merge meta --tool internal:other > hg revert --all -r default > hg revert test.org -r meta > hg commit -m "Single file merge: test.org" > echo "Seven" >> test.org > hg commit -m "6: Seven" > hg up meta > hg merge default --tool internal:other > hg revert --all -r meta > hg revert test.org -r default > hg commit -m "Single file merge: test.org" > > > And it did what I expected. You're right. As long as you remember to repeat your 'Single file merge' back from default into meta before you do a regular merge from default to meta, later regular merges won't result in losing the current contents of meta. My problem was I'd do a regular merge forgetting I hadn't yet done that 2nd special merge and my code was intermingled enough that it wasn't as obvious as a missing file that I'd lost my changes in the 2nd branch. The only other thing I'd point out is your test example doesn't give you the same result as using graft because you aren't actually merging your single file, you're replacing it. If it was your intent to replace all changes to test.org in default great. But if you only intended to replace the bugged Forth change and forgot you also had a Third and Six change... Mischa This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. ___ Mercurial mailing list Mercurial@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial
[more experimients] (was: single-file-merge?)
> I'm pretty sure all those file changes you threw away in the merge > from meta to default will get stripped from meta if you later merge > default back into meta. I tried the following hg init echo "First" > test.org hg add test.org hg commit -m "0: First" echo "Second" >> test.org hg commit -m "1: Second" echo "Third" >> test.org hg commit -m "2: Third" echo "Forth" >> test.org hg commit -m "3: BUG Fourth" hg up -r 1 hg branch meta echo "new stuff" >> meta.org hg add meta.org hg commit -m "Add meta.org to the meta branch" echo "Fifth" >> test.org hg commit -m "4: Fifth" hg up default echo "Six" >> test.org hg commit -m "5: Six" hg merge meta --tool internal:other hg revert --all -r default hg revert test.org -r meta hg commit -m "Single file merge: test.org" echo "Seven" >> test.org hg commit -m "6: Seven" hg up meta hg merge default --tool internal:other hg revert --all -r meta hg revert test.org -r default hg commit -m "Single file merge: test.org" And it did what I expected. Uwe > > This e-mail message, including any attachments, is for the sole use of > the intended recipient(s) and may contain information that is > confidential and protected by law from unauthorized disclosure. Any > unauthorized review, use, disclosure or distribution is prohibited. If > you are not the intended recipient, please contact the sender by reply > e-mail and destroy all copies of the original message. -- Warning: Content may be disturbing to some audiences I strongly condemn Hamas bestialic terroristic attack on Israel, especially the despicable pogroms. I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the NATO membership of Ukraine. I support the EU membership of Ukraine. https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/ smime.p7s Description: S/MIME cryptographic signature ___ Mercurial mailing list Mercurial@lists.mercurial-scm.org https://lists.mercurial-scm.org/mailman/listinfo/mercurial