Fossil Forum

Merge --backout has left me in a weird state
Login

Merge --backout has left me in a weird state

Merge --backout has left me in a weird state

(1) By Stephan Beal (stephan) on 2020-01-03 14:49:13

(Summoning Richard...)

In the process of bringing the `forum-edit-deltify` branch up to date i inadvertently included an unintended local-only change in the merge from the trunk to the branch:

<https://fossil-scm.org/fossil/info/04e1c97854fdcb90>

After realizing that, i did a `--backout` merge:

<https://fossil-scm.org/fossil/info/070d6ea103280c5a>

Which returned me to the state from before the merge and removed the unintended local addition (the `tag ls -inverse` flag mentioned in [](/forumpost/c752ab9e233f0)). That's all fine and good, but now merging trunk, or any recent ancestor of it, into the branch leaves me with:

```
[stephan@lapdog:~/fossil/fossil]$ f merge trunk
...
Merge skipped because it is a no-op.  Use --force to override.
```

Adding `--force` performs the merge but leaves me with an empty diff:

```
[stephan@lapdog:~/fossil/fossil]$ f merge trunk --force
...
Round-trips: 1   Artifacts sent: 0  received: 0
Pull done, sent: 505  received: 1699  ip: 45.33.6.223
[stephan@lapdog:~/fossil/fossil]$ f diff
[stephan@lapdog:~/fossil/fossil]$ 
```

And yet an explicit diff from trunk says otherwise:

```
[stephan@lapdog:~/fossil/fossil]$ f diff --from trunk | wc -l
8165
```

i see two ways out of this, but would like to consult before doing so:

1) Back up 2 versions (the one before the merge) and commit again, which will force a fork. (No big deal, just unsightly (not nearly as much as the backout merge).)

2) Back up 2 versions, move the improperly-merged-in `04e1c97854fdcb90` to a `mistake` branch, and re-perform the merge from trunk (the local `-inverse` flag was lost on the backout, so it wouldn't be included this time).

But that leaves (no pun intended) me wondering why a plain merge from trunk, directly after the backout, does not merge trunk back in?

(2) By Andy Bradford (andybradford) on 2020-01-03 16:25:28 in reply to 1 [link]

I ran into a similar problem with a different branch and mentioned it here:

https://www.fossil-scm.org/forum/forumpost/5ed0513b7bbb6acf6d8798848bceb6b1136950bed8da261c9646309f8a06600d

I haven't yet had the time to attempt the suggestion.

As  for  why   it  doesn't  want  to  merge,  it   must  be  calculating
some  ancestry that  determines  it isn't  necessary  to merge  (perhaps
incorrectly)?

Andy

(3) By Stephan Beal (stephan) on 2020-01-03 16:30:00 in reply to 2 [link]

That looks like exactly the same case, thank you. i'll consider it to be a "known weirdness" and work around it.