After Upgrading to Bitbucket Server 6.1 from 5.16, Pull Reuqests that were open are now stating that "The branch '[branch]' does not exist. The effective diff cannot be displayed until '[branch]' is pushed and the pull request reopened."
[Branch name] is any target branch for a pull request that was opened prior to the upgrade.
However, when I look at the list of branches in the repository, the branch in question is absolutely there.
Does anyone have any ideas?
I ended up declining and re-opening the pull requests and that fixed it.
Does this happen for every pull request? Or only some? The error message in question means that Bitbucket Server ran a `git merge-base` between the latest commits on the source and target branches (as recorded in your database) and Git printed "fatal: Not a valid commit name", indicating that one (or both) of the commits did not exist in the repository.
Please open a support case. Whatever the issue is, it's not something we'll be able to effectively troubleshoot here. On a support case, you can share additional logging and context to help us resolve the issue. It might be helpful to reference this question when raising the issue with support.
Best regards,
Bryan Turner
Atlassian Bitbucket
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the branch name shown in the error message is for the pull request's target, that means the "Not a valid commit name" message from `git merge-base` matches the commit ID recorded in the database for the pull request's target branch. (Otherwise the UI message would show the source branch's name.)
When the upgrade was performed, did you perhaps take an inconsistent backup of your home directory and database and perform the upgrade? The most likely culprit for an issue like this is that your repository data is older than your database data, and so pull requests in the database reference commits that aren't in the repository.
Note that the branch itself may exist; what matters is whether the branch still includes the commit the pull request is looking for. You can check the commits the pull request is expecting by retrieving it via REST (e.g. https://bitbucket.example.com/projects/KEY/repos/slug/pull-requests/1, substituting "KEY", "slug" and "1" for the appropriate project key, repository slug and pull request ID).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.