# HG changeset patch # User Søren Løvborg # Date 2015-08-31 17:42:56 # Node ID a6bc489cc536ddde18b5286619fad49b081364a9 # Parent b52ada72fc9998eab5e0cde399b1a1a0c572d4ad compare: ignore whitespace around revision string When manually entering a revision ID, it's possible for spurious whitespace to occur around it; this should not cause a 404. diff --git a/kallithea/controllers/compare.py b/kallithea/controllers/compare.py --- a/kallithea/controllers/compare.py +++ b/kallithea/controllers/compare.py @@ -165,6 +165,9 @@ class CompareController(BaseRepoControll @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', 'repository.admin') def compare(self, repo_name, org_ref_type, org_ref_name, other_ref_type, other_ref_name): + org_ref_name = org_ref_name.strip() + other_ref_name = other_ref_name.strip() + org_repo = c.db_repo.repo_name other_repo = request.GET.get('other_repo', org_repo) # If merge is True: