changeset 5569:ebc4cc82cce2

Merge stable
author Mads Kiilerich <madski@unity3d.com>
date Sat, 07 Nov 2015 13:24:44 +0100
parents 21f80c6cdf0c (current diff) 737c3704b44a (diff)
children e856e728b916
files kallithea/controllers/files.py kallithea/model/db.py kallithea/public/js/base.js
diffstat 6 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/auth_modules/auth_pam.py	Sun Oct 25 18:32:18 2015 +0000
+++ b/kallithea/lib/auth_modules/auth_pam.py	Sat Nov 07 13:24:44 2015 +0100
@@ -123,9 +123,9 @@
         }
 
         try:
-            user_data = pwd.getpwnam(username)
+            user_pw_data = pwd.getpwnam(username)
             regex = settings["gecos"]
-            match = re.search(regex, user_data.pw_gecos)
+            match = re.search(regex, user_pw_data.pw_gecos)
             if match:
                 user_data["firstname"] = match.group('first_name')
                 user_data["lastname"] = match.group('last_name')
--- a/kallithea/lib/paster_commands/update_repoinfo.py	Sun Oct 25 18:32:18 2015 +0000
+++ b/kallithea/lib/paster_commands/update_repoinfo.py	Sat Nov 07 13:24:44 2015 +0100
@@ -63,7 +63,7 @@
                                self.options.repo_update_list.split(',')) \
                                if self.options.repo_update_list else None
 
-        if repo_update_list:
+        if repo_update_list is not None:
             repo_list = list(Repository.query()\
                 .filter(Repository.repo_name.in_(repo_update_list)))
         else:
--- a/kallithea/lib/vcs/backends/git/changeset.py	Sun Oct 25 18:32:18 2015 +0000
+++ b/kallithea/lib/vcs/backends/git/changeset.py	Sat Nov 07 13:24:44 2015 +0100
@@ -287,7 +287,7 @@
         cs_id = safe_str(self.id)
         f_path = safe_str(path)
 
-        if limit:
+        if limit is not None:
             cmd = ['log', '-n', str(safe_int(limit, 0)),
                    '--pretty=format:%H', '-s', cs_id, '--', f_path]
 
--- a/kallithea/lib/vcs/backends/hg/changeset.py	Sun Oct 25 18:32:18 2015 +0000
+++ b/kallithea/lib/vcs/backends/hg/changeset.py	Sat Nov 07 13:24:44 2015 +0100
@@ -256,7 +256,7 @@
         for cs in reversed([x for x in fctx.filelog()]):
             cnt += 1
             hist.append(hex(fctx.filectx(cs).node()))
-            if limit and cnt == limit:
+            if limit is not None and cnt == limit:
                 break
 
         return [self.repository.get_changeset(node) for node in hist]
--- a/kallithea/model/repo.py	Sun Oct 25 18:32:18 2015 +0000
+++ b/kallithea/model/repo.py	Sat Nov 07 13:24:44 2015 +0100
@@ -175,7 +175,7 @@
 
     @classmethod
     def update_repoinfo(cls, repositories=None):
-        if not repositories:
+        if repositories is None:
             repositories = Repository.getAll()
         for repo in repositories:
             repo.update_changeset_cache()
--- a/kallithea/public/js/base.js	Sun Oct 25 18:32:18 2015 +0000
+++ b/kallithea/public/js/base.js	Sat Nov 07 13:24:44 2015 +0100
@@ -977,7 +977,7 @@
                 $('body').prepend($hl_div);
             }
 
-            $hl_div.append($('<a>').html(_TM['Selection link']).prop('href', location.href.substring(0, location.href.indexOf('#')) + '#L' + ranges[0] + '-'+ranges[1]));
+            $hl_div.append($('<a>').html(_TM['Selection Link']).prop('href', location.href.substring(0, location.href.indexOf('#')) + '#L' + ranges[0] + '-'+ranges[1]));
             var xy = $(till).offset();
             $hl_div.css('top', (xy.top + yoffset) + 'px').css('left', xy.left + 'px');
             $hl_div.show();