From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D782E1384B4 for ; Sun, 22 Nov 2015 20:58:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 640BDE07EC; Sun, 22 Nov 2015 20:58:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 155C2E07EC for ; Sun, 22 Nov 2015 20:58:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4C43C340751 for ; Sun, 22 Nov 2015 20:58:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 10829A7F for ; Sun, 22 Nov 2015 20:57:58 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1448225855.eeeee76cae467df4fe18ee49b9d53bfa2badd671.robbat2@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/egencache X-VCS-Directories: bin/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: eeeee76cae467df4fe18ee49b9d53bfa2badd671 X-VCS-Branch: master Date: Sun, 22 Nov 2015 20:57:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b392c5b6-cc83-4be0-9c9d-768810378aaa X-Archives-Hash: f6e1f86eaa8c50f2585d882fb03e2f99 commit: eeeee76cae467df4fe18ee49b9d53bfa2badd671 Author: Michał Górny gentoo org> AuthorDate: Mon Nov 9 07:24:14 2015 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Nov 22 20:57:35 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=eeeee76c egencache --update-changelogs: Respect GIT_DIR Allow generating ChangeLogs from external git checkout via using GIT_DIR, rather than requiring the repository to be git. Note: zmedico's suggestion to drop the chdir included. X-URL: https://archives.gentoo.org/gentoo-portage-dev/message/181d99a68918ef659d5947b27c3ff322 X-URL: https://archives.gentoo.org/gentoo-portage-dev/message/24c479a4e994c5d896526a0f65f3db46 Acked-by: Zac Medico gentoo.org> Signed-off-by: Robin H. Johnson gentoo.org> bin/egencache | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/egencache b/bin/egencache index 1cc2f3d..caf6613 100755 --- a/bin/egencache +++ b/bin/egencache @@ -75,8 +75,6 @@ else: else: from repoman.metadata import parse_metadata_use -from repoman.vcs.vcs import FindVCS - if sys.hexversion >= 0x3000000: # pylint: disable=W0622 long = int @@ -920,9 +918,7 @@ class GenChangeLogs(object): output.close() def _task_iter(self): - os.chdir(self._repo_path) - - if 'git' not in FindVCS(): + if not os.path.isdir(os.environ.get('GIT_DIR', os.path.join(repo_path, '.git'))): writemsg_level( "ERROR: --update-changelogs supported only in git repos\n", level=logging.ERROR, noiselevel=-1)