allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [10/17] git commit: [#5775] ticket:433 fixed filesize after copied from link
Date Thu, 03 Oct 2013 18:05:20 GMT
[#5775] ticket:433  fixed filesize after copied from link


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

Branch: refs/heads/cj/5561
Commit: 7b9db7ba20bc48d90bb32886c200628f33d9589e
Parents: baed285
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Tue Oct 1 13:59:04 2013 +0400
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Oct 2 15:40:30 2013 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py              | 2 ++
 ForgeGit/forgegit/tests/model/test_repository.py | 2 ++
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7b9db7ba/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index fa62c23..b1c621b 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -326,6 +326,8 @@ class GitImplementation(M.RepositoryImplementation):
                         size = node.size if node.type == 'blob' else None
                     except KeyError as e:
                         size = None
+                    if rename_details:
+                        path = rename_details['path'].strip('/')
                 yield {
                         'id': ci.hexsha,
                         'message': h.really_unicode(ci.message or '--none--'),

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7b9db7ba/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 365060d..a494886 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -575,6 +575,8 @@ class TestGitRename(unittest.TestCase):
             rename_commit['rename_details']['commit_url'],
             '/p/test/src-git/ci/fbb0644603bb6ecee3ebb62efe8c86efc9b84ee6/'
         )
+        self.assertEqual(rename_commit['size'], 19)
+        self.assertEqual(commits[2]['size'], 19)
 
     def test_merge_commit(self):
         merge_sha = '13951944969cf45a701bf90f83647b309815e6d5'


Mime
View raw message