changeset 4521:5f310a5597bf

files: use current revision as default for 'show at' (Issue #31) Before, clicking 'show at' before selecting a changeset would fail when looking for 'no revision'.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 24 Sep 2014 14:24:40 +0200
parents bc2e030bff7f
children a9a1560dad79
files kallithea/controllers/files.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/files.py	Wed Sep 24 14:24:40 2014 +0200
+++ b/kallithea/controllers/files.py	Wed Sep 24 14:24:40 2014 +0200
@@ -605,8 +605,8 @@
     def diff(self, repo_name, f_path):
         ignore_whitespace = request.GET.get('ignorews') == '1'
         line_context = request.GET.get('context', 3)
-        diff1 = request.GET.get('diff1', '')
         diff2 = request.GET.get('diff2', '')
+        diff1 = request.GET.get('diff1', '') or diff2
         c.action = request.GET.get('diff')
         c.no_changes = diff1 == diff2
         c.f_path = f_path