Bug #3950
[ce, ee] trying to merge pr against a deleted branch/bookmark breaks the pr page
0%
Description
reproduce steps:
- create PR against a bookmark/branch
- delete bookmark/branch in the target repository
- try merge the PR or even just opening the PR page again
reproduce steps:
- create a PR from a bookmark in a fork to the base repo
- remove the bookmark in the fork
- Observe: Message that an unknown exception occured
- Expect: Understandable message that the source bookmark does not exist anymore. (compare missing source commits)
ae report:
https://internal-code.rhodecode.com/dan/rhodecode-enterprise-ce-dan/pull-request/2229
Related issues
Updated by Johannes Bornhold over 4 years ago
Similar case when the source bookmark is missing:
2016-06-23 09:56:35.576 DEBUG [rhodecode.lib.vcs.client_http] RepoMaker call on /home/rhodecode/rhodecode/repositories/.__shadow_rhodecode-enterprise-ac-tests_pr-2361 2016-06-23 09:56:35.576 DEBUG [rhodecode.lib.vcs.client_http] Calling http://localhost:9900/hg@localrepository 2016-06-23 09:56:35.581 DEBUG [rhodecode.lib.vcs.backends.hg.repository] Pulling in target reference Reference(type=u'branch', name=u'default', commit_id='4b9b5f49766c0735ffcf8d59 bd181547d27491ca') 2016-06-23 09:56:35.581 DEBUG [rhodecode.lib.vcs.client_http] Calling http://localhost:9900/hg@pull_cmd 2016-06-23 09:56:35.588 DEBUG [rhodecode.lib.vcs.backends.hg.repository] Pulling in source reference Reference(type=u'book', name=u'issue-actests-running', commit_id=u'c9167d91235 a4757eca0072254de1fbdd0975b1d') 2016-06-23 09:56:35.588 DEBUG [rhodecode.lib.vcs.client_http] Calling http://localhost:9900/hg@get_all_commit_ids 2016-06-23 09:56:35.593 DEBUG [rhodecode.lib.vcs.client_http] Calling http://localhost:9900/hg@bookmarks 2016-06-23 09:56:35.595 DEBUG [rhodecode.lib.vcs.client_http] Calling http://localhost:9900/hg@branches 2016-06-23 09:56:35.596 DEBUG [rhodecode.lib.vcs.client_http] Calling http://localhost:9900/hg@pull_cmd 2016-06-23 09:56:35.602 ERROR [rhodecode.lib.vcs.backends.base] Unexpected failure when running merge, dry-run=True Traceback (most recent call last): File "/nix/store/jvrirv5nz6nl9418l2ridi4mqdzq3j00-python2.7-rhodecode-enterprise-ce-4.2.0+20160622x133017x18685cb6d9ee/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/base.py", line 410, in merge source_ref, message, user_name, user_email, dry_run=dry_run) File "/nix/store/jvrirv5nz6nl9418l2ridi4mqdzq3j00-python2.7-rhodecode-enterprise-ce-4.2.0+20160622x133017x18685cb6d9ee/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/hg/repository.py", line 681, in _merge_repo shadow_repo._local_pull(source_repo.path, source_ref) File "/nix/store/jvrirv5nz6nl9418l2ridi4mqdzq3j00-python2.7-rhodecode-enterprise-ce-4.2.0+20160622x133017x18685cb6d9ee/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/hg/repository.py", line 773, in _local_pull self._remote.pull_cmd(repository_path, hooks=False, **options) File "/nix/store/jvrirv5nz6nl9418l2ridi4mqdzq3j00-python2.7-rhodecode-enterprise-ce-4.2.0+20160622x133017x18685cb6d9ee/lib/python2.7/site-packages/rhodecode/lib/vcs/client_http.py", line 105, in f return self._call(name, *args, **kwargs) File "/nix/store/jvrirv5nz6nl9418l2ridi4mqdzq3j00-python2.7-rhodecode-enterprise-ce-4.2.0+20160622x133017x18685cb6d9ee/lib/python2.7/site-packages/rhodecode/lib/vcs/client_http.py", line 123, in _call_with_logging return RemoteRepo._call(self, name, *args, **kwargs) File "/nix/store/jvrirv5nz6nl9418l2ridi4mqdzq3j00-python2.7-rhodecode-enterprise-ce-4.2.0+20160622x133017x18685cb6d9ee/lib/python2.7/site-packages/rhodecode/lib/vcs/exceptions.py", line 182, in wrapper raise _EXCEPTION_MAP[kind](*e.args) RepositoryError: remote bookmark issue-actests-running not found!
Updated by Johannes Bornhold over 4 years ago
- Description updated (diff)
Extended the description with a very similar case in the source repository.
Updated by Marcin Kuzminski [CTO] over 4 years ago
- Related to Feature #1055: [pr, vcs] Expose the shadow repository of a pull request added
Updated by Martin Bornhold about 4 years ago
- Status changed from New to In Progress
- Assignee set to Martin Bornhold
Updated by Redmine Integration about 4 years ago
pullrequest created by martinb (status: under_review). https://internal-code.rhodecode.com/rhodecode-enterprise-ce/pull-request/2817
Updated by Redmine Integration about 4 years ago
Commit ab74df4426b2 by Martin Bornhold martin@rhodecode.com on default branch references this issue. https://internal-code.rhodecode.com/rhodecode-enterprise-ce/changeset/ab74df4426b2c5b2c0f6cea714852d7ec498c07b
Commit ab17456ba95e by Martin Bornhold martin@rhodecode.com on default branch references this issue. https://internal-code.rhodecode.com/rhodecode-enterprise-ce/changeset/ab17456ba95e430d6f1a392a54100942bf030b44
Updated by Redmine Integration about 4 years ago
pullrequest merged by marcink (status: approved). https://internal-code.rhodecode.com/rhodecode-enterprise-ce/pull-request/2817