Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: robbat2@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] egencache --update-changelogs: Respect GIT_DIR
Date: Mon, 09 Nov 2015 07:24:27
Message-Id: 1447053854-2345-1-git-send-email-mgorny@gentoo.org
1 Allow generating ChangeLogs from external git checkout via using
2 GIT_DIR, rather than requiring the repository to be git.
3 ---
4 bin/egencache | 4 +---
5 1 file changed, 1 insertion(+), 3 deletions(-)
6
7 diff --git a/bin/egencache b/bin/egencache
8 index 51d115a..eeca255 100755
9 --- a/bin/egencache
10 +++ b/bin/egencache
11 @@ -73,8 +73,6 @@ else:
12 else:
13 from repoman.metadata import parse_metadata_use
14
15 -from repoman.vcs.vcs import FindVCS
16 -
17 if sys.hexversion >= 0x3000000:
18 # pylint: disable=W0622
19 long = int
20 @@ -886,7 +884,7 @@ class GenChangeLogs(object):
21 repo_path = self._portdb.porttrees[0]
22 os.chdir(repo_path)
23
24 - if 'git' not in FindVCS():
25 + if not os.path.isdir(os.environ.get('GIT_DIR', '.git')):
26 writemsg_level(
27 "ERROR: --update-changelogs supported only in git repos\n",
28 level=logging.ERROR, noiselevel=-1)
29 --
30 2.6.3

Replies