--- compare_cs.html
+++ compare_cs.html
@@ -57,13 +57,13 @@
 
     %if c.as_form:
       <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
-      ## links should perhaps use ('rev', c.org_rev) instead ...
+      ## links should perhaps use ('rev', c.a_rev) instead ...
       ${h.link_to(_('Show merge diff'),
         h.url('compare_url',
-          repo_name=c.org_repo.repo_name,
-          org_ref_type=c.org_ref_type, org_ref_name=c.org_ref_name,
-          other_repo=c.other_repo.repo_name,
-          other_ref_type=c.other_ref_type, other_ref_name=c.other_ref_name,
+          repo_name=c.a_repo.repo_name,
+          org_ref_type=c.a_ref_type, org_ref_name=c.a_ref_name,
+          other_repo=c.cs_repo.repo_name,
+          other_ref_type=c.cs_ref_type, other_ref_name=c.cs_ref_name,
           merge='1'),
         target='_blank')}
       </div>
@@ -79,11 +79,11 @@
     %if c.cs_ranges_org is not None:
       ## TODO: list actual changesets?
       <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
-        ${h.link_to_ref(c.other_repo.repo_name, c.other_ref_type, c.other_ref_name, c.other_rev)}
+        ${h.link_to_ref(c.cs_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev)}
         ${_('is')}
         <a href="${c.swap_url}">${_('%s changesets') % (len(c.cs_ranges_org))}</a>
         ${_('behind')}
-        ${h.link_to_ref(c.org_repo.repo_name, c.org_ref_type, c.org_ref_name, c.org_rev)}
+        ${h.link_to_ref(c.a_repo.repo_name, c.a_ref_type, c.a_ref_name)}
       </div>
     %endif
   %endif
