how to solve a conflicting editing for someone (using backout?), but cannot merge since there is only one head

Becker, Mischa J mischa.becker at kroger.com
Fri Jun 23 17:17:17 UTC 2023


Even if you create a 2nd head as Rainer suggested, you still have the problem that the backout, rev 7, happens later in the tree than rev 6 so future merges will continue to backout the rev 6 changes. Backing out rev 7 while on rev 9 essentially merges in your changes from rev 6. If you don't like it because it doesn't show in the tree as a merge, then update to rev 7 before backing it out. That both creates a new head, so you can merge, AND puts a copy of your rev 6 changes after the rev 7 backout so merge won't discard them.

If you really don't want to back out the backout, the only other option I know of is to update to rev 6 and do your own correct merge with rev 8. The only difference between your new merge and rev 9 should be the backout so you can now merge with rev 9 and throw away all of its changes.

Mischa Becker

> -----Original Message-----
> Sent: Friday, June 23, 2023 7:01 AM
>
> Uwe,
>
> sorry for being late  with my idea (see below)  and besides I don't know
> whether or not it would really work ...
>
> On Friday, 2023-06-23 08:49:38 +0200, you wrote:
>
> > ...
> > But I don't want this. I need to merge as shown in the below graph
> > changeset
> > 9 with 6, but hg does not allow me to do this, since there is no head.
> > ...
> > > On 4/6/23 17:38, Uwe Brauer wrote:
> > >> Hi
> > >> ...
> > >> The graph for user1 looks now:
> > >>
> > >>
> > >> ○  changeset:     9:61f9d9f6da29
> > >> │╲   tag:           tip
> > >> │ │  Remote_Branch: default/default
> > >> │ │  Branch:        default
> > >> │ │  Author:        Uwe Brauer <oub at mat.ucm.es>
> > >> │ │  Date:          Thu, 06 Apr 2023 17:22:10 +0200
> > >> │ │  Phase:         draft
> > >> │ │  Summary:       Automated merge with
> file:///home/oub/HGTest/Backout/Test/Server
> > >> │ │
> > >> │ ○  changeset:     8:6c83e932468f
> > >> │ │  Branch:        default
> > >> │ │  Author:        Elena <elena at somewhere.es>
> > >> │ │  Date:          Thu, 06 Apr 2023 17:18:47 +0200
> > >> │ │  Phase:         public
> > >> │ │  Summary:       Conflicting edit Elena
> > >> │ │
> > >> ○ │  changeset:     7:5b1c81ac4fe4
> > >> │ │  Branch:        default
> > >> │ │  Author:        Uwe Brauer <oub at mat.ucm.es>
> > >> │ │  Date:          Thu, 06 Apr 2023 17:20:08 +0200
> > >> │ │  Phase:         public
> > >> │ │  Summary:       Backed out changeset 8d6ce4461712: Now Elena
> might push
> > >> │ │
> > >> ◍ │  changeset:     6:8d6ce4461712
> > >> │╱   Branch:        default
> > >> │    Author:        Uwe Brauer <oub at mat.ucm.es>
> > >> │    Date:          Thu, 06 Apr 2023 17:17:37 +0200
> > >> │    Phase:         public
> > >> │    Summary:       Conflicting edit first line Uwe
>
> What about the following approach?   I know  it's a bit ugly,  but if it
> should work, who would care?
>
> 0. Clone your repository and try the following on that clone!
> 1. Check out changeset 6.
> 2. Do some arbitrary  change,  for instance,  create  a new  empty file.
>    This will get you a new head.
> 3. Backout this change.  This will give you a new changeset (which still
>    will be a head)  on top of the  backed-out changeset.   But regarding
>    contents, this new changeset is identical to changeset 6.
> 4. Merge this new changeset with changeset 9.
>
> I hope this works :-)
>
> Sincerely,
>   Rainer
> _______________________________________________
> Mercurial mailing list
> Mercurial at lists.mercurial-scm.org
> https://lists.me/
> rcurial-
> scm.org%2Fmailman%2Flistinfo%2Fmercurial&data=05%7C01%7Cmischa.becker%40kr
> oger.com%7Cf0d0cf6c4ac24402050008db73f26374%7C8331e14a91344288bf5a5e2c8412
> f074%7C0%7C0%7C638231257139536276%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=g
> 297Iq90UQ03zdnPQzn0753py%2Bgr8ALRbbMe0XZaIEY%3D&reserved=0

________________________________

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.


More information about the Mercurial mailing list