incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [7/7] git commit: [#5775] Minor change to ensure git process doesn't do any extra work in the background
Date Wed, 02 Oct 2013 16:29:51 GMT
[#5775] Minor change to ensure git process doesn't do any extra work in the background

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


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

Branch: refs/heads/master
Commit: 4c1f101ad028f5018d6aed31feabc7c0df5626f9
Parents: 4478bf3
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Wed Oct 2 16:29:01 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Oct 2 16:29:01 2013 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4c1f101a/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index b1c621b..3efc519 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -314,9 +314,8 @@ class GitImplementation(M.RepositoryImplementation):
                     if renamed and renamed['to'] == path:
                         rename_details['path'] = '/' + renamed['from']
                         # get first rev **before** rename
-                        _iter = self._git.iter_commits(revs, renamed['from'])
-                        prev_rev = next(_iter)
-                        prev_rev = next(_iter)
+                        _iter = self._git.iter_commits(revs, renamed['from'], max_count=2)
+                        prev_rev = list(_iter)[1]
                         rename_details['commit_url'] = self._repo.url_for_commit(
                             prev_rev.hexsha
                         )


Mime
View raw message