diff rhodecode/controllers/compare.py @ 3322:c9b0f1d363c7 beta

compare: swap org and other when they refer to different repos, ie are pull request style Pull requests will have a different from/to description - but in a consistent and slightly better way that can be improved later. A pull request diff is empathic: "How will this look for the peer I'm proposing to" style.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 01 Feb 2013 23:13:10 +0100
parents 75431548602a
children a07296564f6b
line wrap: on
line diff
--- a/rhodecode/controllers/compare.py	Mon Feb 04 21:26:01 2013 +0100
+++ b/rhodecode/controllers/compare.py	Fri Feb 01 23:13:10 2013 +0100
@@ -132,7 +132,7 @@
 
         c.statuses = c.rhodecode_db_repo.statuses([x.raw_id for x in
                                                    c.cs_ranges])
-        c.target_repo = c.repo_name
+        c.target_repo = c.other_repo.repo_name
         # defines that we need hidden inputs with changesets
         c.as_form = request.GET.get('as_form', False)
         if partial:
@@ -150,7 +150,7 @@
                                       if c.cs_ranges[0].parents
                                       else EmptyChangeset(), 'raw_id'))
             log.debug('Changed org_ref from %s to %s' % (_org_ref, org_ref))
-            other_repo = org_repo
+            org_repo = other_repo
 
         diff_limit = self.cut_off_limit if not fulldiff else None