allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [allura] 02/02: py3 fix: handle renamed like copied in repo diff
Date Mon, 08 Mar 2021 20:32:47 GMT
This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 2eb22e2f106d2251e4ddafbd62b6692b8551f583
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
AuthorDate: Mon Mar 8 14:39:29 2021 -0500

    py3 fix: handle renamed like copied in repo diff
---
 Allura/allura/model/repository.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 4fbb768..0c87dd8 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -531,7 +531,7 @@ class Repository(Artifact, ActivityObject):
     def set_default_branch(self, name):
         return self._impl.set_default_branch(name)
 
-    def paged_diffs(self, commit_id, start=0, end=None,  onlyChangedFiles=False):
+    def paged_diffs(self, commit_id, start=0, end=None, onlyChangedFiles=False):
         return self._impl.paged_diffs(commit_id, start, end, onlyChangedFiles)
 
     def init_as_clone(self, source_path, source_name, source_url):
@@ -1201,7 +1201,7 @@ class Commit(RepoObject, ActivityObject):
     def diffs(self):
         return self.paged_diffs()
 
-    def paged_diffs(self, start=0, end=None,  onlyChangedFiles=False):
+    def paged_diffs(self, start=0, end=None, onlyChangedFiles=False):
         diffs = self.repo.paged_diffs(self._id, start, end, onlyChangedFiles)
 
         return Object(
@@ -1209,7 +1209,7 @@ class Commit(RepoObject, ActivityObject):
             removed=sorted(diffs['removed']),
             changed=sorted(diffs['changed']),
             copied=sorted(diffs['copied'], key=itemgetter('new', 'old')),  # this is a list
of dicts
-            renamed=sorted(diffs['renamed']),
+            renamed=sorted(diffs['renamed'], key=itemgetter('new', 'old')),  # this is a
list of dicts
             total=diffs['total'])
 
     def get_path(self, path, create=True):


Mime
View raw message