sashoalm
sashoalm

Reputation: 79467

TFS error: Merge must finish before the Pull Request can be completed

We have a PR in TFS which cannot be completed or abandoned, because the button is grayed out/disabled. The tooltip on hover says:

Merge must finish before the Pull Request can be completed

Merge in progress ... [Abandon] [Restart Merge]

Screenshot (notice the grayed out button):

enter image description here

How do we complete it? Is there an unfinished merge in git? If so, how was the branch pushed in the first place? And why can't it be Abandoned at least?

Googling with the full error text doesn't yield any results, it hasn't been documented anywhere on the internet it seems.

Upvotes: 6

Views: 3763

Answers (3)

Ahmad Pujianto
Ahmad Pujianto

Reputation: 359

"Abandon" then "reactivate" the PR works for me.

enter image description here

First, What you need to do is open dropdown next to the "complete" button, then select "abandon". The wording on "complete" button will changed to "reactivate".

Then just click the "reactivate" button.

In my case the status is directly goes to completed.

Hope my explanation can help.

Upvotes: 3

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51093

If you have a merge that's blocked or stuck, you could try to click the triple-dot menu (...) next to the "Complete" button and choose the "Restart merge" option to start a new merge job.

The root cause was an issue with the job agents that perform merges running out of disk space.

If above is not work, also try to open two browsers and delete the source branch, then abandon your PR, then Undo the branch deletion. You could finally either reactivate the PR again or create a new one.

enter image description here

We have a open live site investigation regarding this issue. Please refer to the following for more information:

Issues with Pull Requests on Visual Studio Team Services - 03/17 -Mitigated

Upvotes: 4

VonC
VonC

Reputation: 1323973

First, check if this is a right issue: you might have the right to review but not approve. (See Review code with pull requests)

Second, check the branch policy:

The number of required approvals in a pull request is set from the branch policy for the branch. Pull requests can be completed if the number of required approvals is met, even if other reviewers have rejected the changes.

Third, I suppose that in order to abandon the PR, you might need to abandon first the merge in progress.

Upvotes: 1

Related Questions