Re: Patch to make pgindent work cleanly
От | Gurjeet Singh |
---|---|
Тема | Re: Patch to make pgindent work cleanly |
Дата | |
Msg-id | CABwTF4WTHFLr7=3d8k06F8hcEoNUKxEsdLyb1cSOtPKQOaBDjw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Patch to make pgindent work cleanly (Bruce Momjian <bruce@momjian.us>) |
Ответы |
Re: Patch to make pgindent work cleanly
|
Список | pgsql-hackers |
On Fri, Apr 12, 2013 at 11:44 AM, Bruce Momjian <bruce@momjian.us> wrote:
Thanks!
Can you also improve the output when it dies upon failure to fetch something? Currently the only error message it emits is "fetching xyz", and leaves the user confused as to what really the problem was. The only indication of a problem might be the exit code, but I'm not sure of that, and that doesn't help the interactive user running it on terminal.
-- I have applied this patch. However, I modified the tarball name toOn Tue, Feb 19, 2013 at 04:50:45PM -0500, Gurjeet Singh wrote:
> Please find attached the patch for some cleanup and fix bit rot in pgindent
> script.
>
> There were a few problems with the script.
>
> .) It failed to use the $ENV{PGENTAB} even if it was set.
> .) The file it tries to download from Postgres' ftp site is no longer present.
> ftp://ftp.postgresql.org/pub/dev/indent.netbsd.patched.tgz
> .) The tar command extracted the above-mentioned file to a child directory, but
> did not descend into it before running make on it.
> I think it expected a tarbomb, but clearly the current .tgz file on ftp
> site is not a tarbomb.
>
> I don't like the fact that it dies with a message "fetching xyz" rather than
> saying "Could not fetch xyz", but this patch does not address that since it
> doesn't really affect the output when script does work.
>
> With this patch in place I could very easily run it on any arbitrary file,
> which seemed like a black-magic before the patch.
>
> src/tools/pgindent/pgindent --build <your file path here>
reference $INDENT_VERSION, rather than hard-coding "1.2".
Thanks!
Can you also improve the output when it dies upon failure to fetch something? Currently the only error message it emits is "fetching xyz", and leaves the user confused as to what really the problem was. The only indication of a problem might be the exit code, but I'm not sure of that, and that doesn't help the interactive user running it on terminal.
В списке pgsql-hackers по дате отправления: