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

Dr Rainer Woitok rainer.woitok at gmail.com
Fri Jun 23 14:01:27 UTC 2023


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


More information about the Mercurial mailing list