# HG changeset patch # User Marcin Kuzminski # Date 2012-10-17 19:34:52 # Node ID 07d620f6db2e05d3e3a9fa841d48135faa850354 # Parent 19ea3e16f65b71b84774fc1839af8b6d5a308c1b pull requests throw an error if parent of fork didn't have any changesets yet. Now it's filter out from list of available sources diff --git a/rhodecode/controllers/pullrequests.py b/rhodecode/controllers/pullrequests.py --- a/rhodecode/controllers/pullrequests.py +++ b/rhodecode/controllers/pullrequests.py @@ -149,8 +149,8 @@ class PullrequestsController(BaseRepoCon self._get_repo_refs(fork.scm_instance), class_='refs') } - #add parents of this fork also - if org_repo.parent: + #add parents of this fork also, but only if it's not empty + if org_repo.parent and org_repo.parent.scm_instance.revisions: c.default_pull_request = org_repo.parent.repo_name c.default_pull_request_rev = self._get_default_rev(org_repo.parent) c.default_revs = self._get_repo_refs(org_repo.parent.scm_instance)