You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/07/27 22:20:14 UTC
[06/22] allura git commit: [#7932] Fix pagination issue in the commit
browser
[#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/30173000
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/30173000
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/30173000
Branch: refs/heads/hs/7925
Commit: 30173000e217fe5756aa9aff34c372ac1db0b4b7
Parents: bbeebdb
Author: Heith Seewald <hs...@slashdotmedia.com>
Authored: Thu Jul 16 15:13:33 2015 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Tue Jul 21 20:25:39 2015 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/30173000/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':