Unable to merge This field is required error while merging changes through Compare screen (BB-10038)

Issue #8835 resolved
Srihitha Narra
created an issue

When I compare the repos and try to merge, the pop up window shows the error

"Unable to merge This field is required."

Comments (84)

  1. Brian Nguyen


    It sounds like either the source or destination branch isn't being set when you submit the form.

    This shouldn't happen, so there might be something wrong with the repository.

    Could you tell me what repository you are try to merge? If you are uncomfortable sending posting this on this issue, you can send us an email at support@atlassian.com instead.

    Cheers, Brian

  2. Srihitha Narra reporter

    Oh.. Just noticed, it happens when there are two heads on a branch and I am trying to compare one of the revisions with another repo. It shows the compare result, but while trying to merge, shows blank in place of branch. This is allowed and works perfectly in pull-request merge.

  3. Kehers O.

    I am still having this issue. When I try to sync a repo (I've earlier forked) with mine, I get the error. I am still able to send pull requests though.

  4. Mark Sauder

    I also see this issue when I have sync'd using the gui many times before with no issue as recent as 3 days ago.

    I just noticed a new issue #11159 opened up here: https://bitbucket.org/site/master/issue/11159/unable-to-merge-this-field-is-required. It references this issue, 8835, but nothing had been updated here to redirect attention, so I thought it worthwhile.

    I have attempted (and failed) a few tries at syncing from the terminal. A bitbucket blog post states it is possible, https://confluence.atlassian.com/display/BITBUCKET/Forking+a+Repository, but gives no clues as to how one accomplishes the task...

    Has anyone seeing this issue had succes syncing from the terminal?

  5. Fernando Paredes Garcia

    @Mark Sauder, you need to add your upstream repo (the one you forked from) to your remotes:

    $ git remote add upstream git@bitbucket.org:whatever/repo.git

    Then you fetch from "upstream"

    $ git fetch upstream

    And merge:

    $ git merge upstream/[branch]

    Now that your local repo is merged! Then push your changes as you regularly do.

  6. Mark Sauder

    Thanks Fernando, I wish the repo I was using was a git repo, (Long live Git!), but unfortunately its a mercurial repo.

    What I've attempted is editing the .hg/hgrc file, adding upstream to the existing lines to yeild contents as such:

    default = ssh://hg@bitbucket.org/tbs1980/eigen-numerical-integration-module
    upstream = ssh://hg@bitbucket.org/eigen/eigen

    I then hg pull upstream, hg update, then switch to the branch I am working in and attempt to hg merge, at which point I get a message I am unfamiliar with,

    hg merge
    abort: branch 'default' has one head - please merge with an explicit rev
    (run 'hg heads' to see all heads)

    if I hg merge default, something seems to happen successfully, but after

    hg commit
    hg push

    I get the following error,

    abort: push creates new remote branches: fix-cg-zero-guess, sparse-tutorial-doc-fix!
    (use 'hg push --new-branch' to create new remote branches)

    But I am not trying to create new branches, just commit and push my latest merge for the branch I am working in which might only be my lack of understanding using mercurial... (I never have problems like this I can't find good instruction on with git... long live git! :) )

    I am mostly posting this back here because it might give some insight into what field is missing, likely an appropriate head as is indicated from the terminal. I'll post that observation back to #11159 and try to keep updates on that active, open issue that might hopefully get a quicker assignee.

    Thanks again.


  7. Mark Sauder

    I have been able to use the terminal to pull from upstream to be then be able to sync my repo successfully using the web interface, I've posted some instructions here #11159.

    I'm not the greatest mercurial user, but hopefully this might be helpful to anyone else trying to get their repo sync'd in the future.


  8. Yerzhan Massalin

    I fetched code from upstream. Then did git merge upstream/master. It said fast-forward. no changes at all. but web site has the sync button saying 12 commits behind. And sync fails with message: Unable to merge This field is required. .

  9. Chirag Lakhani

    Hello Team, I am also facing same issue. Unable to merge This field is required. . I think this issue arising due to there is blank fileds pass in hidden element in Popup for "Sync repository" Please see this code <input type="hidden" value="" name="source"> <input type="hidden" value="" name="dest"> Or my attached screenshot. unable_to_merge.png

  10. Maksud Hossain

    Following way I have solved it.

    • Go to your fork repository.
    • Click compare from left side menu.
    • Compare fork repository with main repository. Then it will show the commits.
    • Set main repository as source and fork repository as destination.
    • Click the Merge button of upper right corner.
  11. Marcus Bertrand staff

    Hello, our apologies. There were many duplicates of this issue. It has been resolved for some time now. If you continue to encounter issues, please raise a support request to support@bitbucket.org so that we can investigate any specific issue you may experience.

  12. hansmong NA

    The issue happens suddenly. Yesterday I successfully merged my dev branch into master, but just now I did it again, the error occurred.

    Just wondering why. And I inspected the element, I saw there were no values for the hidden input "source" and "dest".

    This happened on both Google Chrome and Mac OS Safari.

  13. Log in to comment