ottelo15
ottelo15

Reputation: 33

TortoiseHG (Mercurial) - Push branch = abort: push creates new remote head

I closed a public branch inside Tortoise and want to push the change but I get this error:

abort: push creates new remote head 2756e9fac9ea on branch '4.4.72'!

THG Workbench

Upvotes: 1

Views: 84

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97260

  1. As you can see on screenshot, you had two heads in this branch (see red arrows for local revs 186 + 187). Closing one head of branch you just add one more "closing" changeset 188 (see blue arrow) as descendant of 186, but:
    • not decreased amount of heads
    • not closed branch for Mercurial (in milti-headed branch all heads must have closing commit in order to close branch)
  2. If you want really close branch and push it, you have 2 choices:
    1. Close second head and perform push -f - got both heads (== branch 4.4.72) on remote in closed state
    2. Merge heads locally (into one head), close single-head branch and push it in the usual way

Explain

Upvotes: 1

Related Questions