Skip to content

Instantly share code, notes, and snippets.

@jamsyoung
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamsyoung/ac7ce113214e2843b82b to your computer and use it in GitHub Desktop.
Save jamsyoung/ac7ce113214e2843b82b to your computer and use it in GitHub Desktop.
Bitbucket REST API merge error on POST

UPDATE 1: I found a related issue: https://bitbucket.org/site/master/issue/8744/500-error-when-trying-to-merge-pull

UPDATE 2: I have found the problem. See my comment on the issue linked above on how to get around this error.

The Response

{
    "message": "name, email or commit message not provided",
    "detail": "  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\", line 208, in __call__\n    result = checked_meth(request, *args, **kwargs)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\", line 195, in checked_meth\n    return meth(*args, **kwargs)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/hooks/component_piston.py\", line 33, in __call__\n    return self._nr_wrapped(*args, **kwargs)\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/bb/decorators.py\", line 38, in wrap\n    return f(request, *a, **kwa)\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/bb/decorators.py\", line 353, in wrapped_function\n    return func(*args, **kwargs)\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 78, in wrapped_function\n    return func(*args, **kwargs)\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/api/v10/decorators.py\", line 183, in wrapper\n    return f(self, request, *args, **kwargs)\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/api/decorators.py\", line 35, in wrapper\n    val = func(self, request, *args, **kwargs)\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/pullrequests/api/v20/handlers.py\", line 331, in create\n    return form.save()\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/pullrequests/forms.py\", line 688, in save\n    self._merge()\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/pullrequests/forms.py\", line 655, in _merge\n    closebranch=self.instance.close_anchor_branch)\n  File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/compare/merge.py\", line 61, in merge\n    destinationhead=destcset)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/git.py\", line 1468, in merge\n    fastforward=fastforward)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\", line 500, in pull\n    fastforward=fastforward)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\", line 552, in fetchandmerge\n    localmarker=localmarker, remotemarker=remotemarker, force=force)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\", line 590, in _fetchandmerge\n    localmarker=localmarker, remotemarker=remotemarker)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\", line 469, in merge\n    date)\n  File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\", line 195, in commit\n    raise CommitError('name, email or commit message not provided')\n",
    "id": "ad988755f8a746538099600a7f1ca0eb"
}

The Stacktrace, made readable(ish)

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\",
line 208, in __call__\n    result = checked_meth(request, *args, **kwargs)\n

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/piston/resource.py\",
line 195, in checked_meth\n    return meth(*args, **kwargs)\n  

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/newrelic-2.18.1.15/newrelic/hooks/component_piston.py\",
line 33, in __call__\n    return self._nr_wrapped(*args, **kwargs)\n

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/bb/decorators.py\",
line 38, in wrap\n    return f(request, *a, **kwa)\n

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/bb/decorators.py\",
line 353, in wrapped_function\n    return func(*args, **kwargs)\n  

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/api/v10/decorators.py\", 
line 78, in wrapped_function\n    return func(*args, **kwargs)\n  

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/api/v10/decorators.py\", 
line 183, in wrapper\n    return f(self, request, *args, **kwargs)\n  

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/api/decorators.py\", 
line 35, in wrapper\n    val = func(self, request, *args, **kwargs)\n  

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/pullrequests/api/v20/handlers.py\", 
line 331, in create\n    return form.save()\n  

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/pullrequests/forms.py\", 
line 688, in save\n    self._merge()\n  

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/pullrequests/forms.py\",
line 655, in _merge\n    closebranch=self.instance.close_anchor_branch)\n

File \"/opt/python/domains/bitbucket.org/2014-08-13/bitbucket/../bitbucket/apps/compare/merge.py\",
line 61, in merge\n    destinationhead=destcset)\n

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/git.py\",
line 1468, in merge\n    fastforward=fastforward)\n

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\",
line 500, in pull\n    fastforward=fastforward)\n

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\",
line 552, in fetchandmerge\n    localmarker=localmarker, remotemarker=remotemarker, force=force)\n 

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\",
line 590, in _fetchandmerge\n    localmarker=localmarker, remotemarker=remotemarker)\n 

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\",
line 469, in merge\n    date)\n

File \"/opt/python/domains/bitbucket.org/current/bitbucket/local/env/lib/python2.7/site-packages/orochi/_gitmerge.py\",
line 195, in commit\n    raise CommitError('name, email or commit message not provided')\n",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment