aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-09 08:24:14 +0100
committerRobin H. Johnson <robbat2@gentoo.org>2015-11-22 12:57:35 -0800
commiteeeee76cae467df4fe18ee49b9d53bfa2badd671 (patch)
tree839b797ca1f5580caced66d21824459f28df0383
parentportage.util.locale: fix python2.7 setlocale ValueError (bug 566372) (diff)
downloadportage-eeeee76cae467df4fe18ee49b9d53bfa2badd671.tar.gz
portage-eeeee76cae467df4fe18ee49b9d53bfa2badd671.tar.bz2
portage-eeeee76cae467df4fe18ee49b9d53bfa2badd671.zip
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 <zmedico@gentoo.org> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xbin/egencache6
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/egencache b/bin/egencache
index 1cc2f3d4f..caf661309 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)