* Re: [gentoo-portage-dev] [PATCH] egencache --update-changelogs: Respect GIT_DIR
@ 2015-11-12 20:24 99% ` Zac Medico
0 siblings, 0 replies; 1+ results
From: Zac Medico @ 2015-11-12 20:24 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: robbat2, Michał Górny
On 11/08/2015 11:24 PM, Michał Górny wrote:
> Allow generating ChangeLogs from external git checkout via using
> GIT_DIR, rather than requiring the repository to be git.
> ---
> bin/egencache | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/bin/egencache b/bin/egencache
> index 51d115a..eeca255 100755
> --- a/bin/egencache
> +++ b/bin/egencache
> @@ -73,8 +73,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
> @@ -886,7 +884,7 @@ class GenChangeLogs(object):
> repo_path = self._portdb.porttrees[0]
> os.chdir(repo_path)
>
> - if 'git' not in FindVCS():
> + if not os.path.isdir(os.environ.get('GIT_DIR', '.git')):
> writemsg_level(
> "ERROR: --update-changelogs supported only in git repos\n",
> level=logging.ERROR, noiselevel=-1)
>
Since this code runs inside of a generator method now, it would be much
nicer to avoid the chdir call, and instead do something like this:
if not os.path.isdir(
os.environ.get('GIT_DIR', os.path.join(repo_path, '.git'))):
--
Thanks,
Zac
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2015-11-09 7:24 [gentoo-portage-dev] [PATCH] egencache --update-changelogs: Respect GIT_DIR Michał Górny
2015-11-12 20:24 99% ` Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox