Return-Path: X-Original-To: apmail-allura-commits-archive@www.apache.org Delivered-To: apmail-allura-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 64C0D17F8E for ; Mon, 30 Mar 2015 12:26:31 +0000 (UTC) Received: (qmail 43344 invoked by uid 500); 30 Mar 2015 12:26:18 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 43302 invoked by uid 500); 30 Mar 2015 12:26:18 -0000 Mailing-List: contact commits-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list commits@allura.apache.org Received: (qmail 42546 invoked by uid 99); 30 Mar 2015 12:26:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Mar 2015 12:26:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id F4002E17BC; Mon, 30 Mar 2015 12:26:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jetmind@apache.org To: commits@allura.apache.org Date: Mon, 30 Mar 2015 12:26:49 -0000 Message-Id: In-Reply-To: <299571def27f49118490863bb0eaee47@git.apache.org> References: <299571def27f49118490863bb0eaee47@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [33/45] allura git commit: [#7837] ticket:736 Rewrite Commit.added_paths [#7837] ticket:736 Rewrite Commit.added_paths Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/12963fc4 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/12963fc4 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/12963fc4 Branch: refs/heads/ib/7837 Commit: 12963fc4514d1a24117ab4db9f474dcfa66c9e14 Parents: d14a546 Author: Igor Bondarenko Authored: Mon Mar 2 15:01:25 2015 +0000 Committer: Igor Bondarenko Committed: Fri Mar 27 15:09:24 2015 +0000 ---------------------------------------------------------------------- Allura/allura/model/repository.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/12963fc4/Allura/allura/model/repository.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py index 9255c66..d15394f 100644 --- a/Allura/allura/model/repository.py +++ b/Allura/allura/model/repository.py @@ -1235,7 +1235,7 @@ class Commit(RepoObject, ActivityObject): Leading and trailing slashes are removed, and the list is complete, meaning that if a directory with subdirectories is added, all of the child - paths are included (this relies on the DiffInfoDoc + paths are included (this relies on the :meth paged_diffs: being complete). Example: @@ -1245,13 +1245,10 @@ class Commit(RepoObject, ActivityObject): the file /foo/bar/baz/qux.txt, this would return: ['foo/bar', 'foo/bar/baz', 'foo/bar/baz/qux.txt'] ''' - diff_info = DiffInfoDoc.m.get(_id=self._id) - diffs = set() - if diff_info: - for d in diff_info.differences: - if d.lhs_id is None: - diffs.add(d.name.strip('/')) - return diffs + paths = set() + for path in self.paged_diffs(self._id)['added']: + paths.add(path.strip('/')) + return paths @LazyProperty def info(self):