allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hei...@apache.org
Subject allura git commit: [#7932] Fix pagination issue in the commit browser
Date Thu, 16 Jul 2015 19:14:46 GMT
Repository: allura
Updated Branches:
  refs/heads/hs/7932 [created] 61f3bbc1a


[#7932] Fix pagination issue in the commit browser


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/61f3bbc1
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/61f3bbc1
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/61f3bbc1

Branch: refs/heads/hs/7932
Commit: 61f3bbc1a4150c9c0c737f88e3d502c016258720
Parents: de47627
Author: Heith Seewald <hseewald@slashdotmedia.com>
Authored: Thu Jul 16 15:13:33 2015 -0400
Committer: Heith Seewald <hseewald@slashdotmedia.com>
Committed: Thu Jul 16 15:14:15 2015 -0400

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/61f3bbc1/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 7d87a09..9549fa6 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -652,13 +652,14 @@ class GitImplementation(M.RepositoryImplementation):
             # relies on this)
             '-t',
             '-z',  # don't escape filenames and use \x00 as fields delimiter
-            commit_id)
-        files = files.split('\x00')[:-1]
-        # files = ['A', 'filename', 'D', 'another filename', ...]
+            commit_id).split('\x00')[:-1]
+
         total = len(files) / 2
-        for i in range(1, len(files), 2):
-            status = files[i-1]
-            name = h.really_unicode(files[i])
+        files = [(files[i], h.really_unicode(files[i+1]))
+                 for i in xrange(0, len(files), 2)]
+
+        # files = [('A', u'filename'), ('D', u'another filename'), ...]
+        for status, name in files[start:end]:
             if status == 'A':
                 added.append(name)
             elif status == 'D':


Mime
View raw message