Обсуждение: Re: [COMMITTERS] pgsql: Remove tabs in SGML.

Поиск
Список
Период
Сортировка

Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
David Fetter
Дата:
On Tue, Jan 26, 2010 at 02:21:29PM +0000, Bruce Momjian wrote:
> Log Message:
> -----------
> Remove tabs in SGML.

Can we see about making a commit hook for CVS that disallows \t in
SGML files?  The process in git is pretty simple.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Peter Eisentraut
Дата:
On tis, 2010-01-26 at 10:20 -0800, David Fetter wrote:
> On Tue, Jan 26, 2010 at 02:21:29PM +0000, Bruce Momjian wrote:
> > Log Message:
> > -----------
> > Remove tabs in SGML.
> 
> Can we see about making a commit hook for CVS that disallows \t in
> SGML files?  The process in git is pretty simple.

Better write a check in the makefile.



Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
David Fetter
Дата:
On Wed, Jan 27, 2010 at 04:52:00PM +0200, Peter Eisentraut wrote:
> On tis, 2010-01-26 at 10:20 -0800, David Fetter wrote:
> > On Tue, Jan 26, 2010 at 02:21:29PM +0000, Bruce Momjian wrote:
> > > Log Message:
> > > -----------
> > > Remove tabs in SGML.
> > 
> > Can we see about making a commit hook for CVS that disallows \t in
> > SGML files?  The process in git is pretty simple.
> 
> Better write a check in the makefile.

That assumes that everyone will always actually run the appropriate
make before committing, which I wouldn't assume, especially for a
"trivial" patch that's going out when someone is pressed for time.
Checking in an unavoidable place seems much more foolproof.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Tom Lane
Дата:
David Fetter <david@fetter.org> writes:
> On Wed, Jan 27, 2010 at 04:52:00PM +0200, Peter Eisentraut wrote:
>> Better write a check in the makefile.

> That assumes that everyone will always actually run the appropriate
> make before committing, which I wouldn't assume, especially for a
> "trivial" patch that's going out when someone is pressed for time.
> Checking in an unavoidable place seems much more foolproof.

The rule against tabs in SGML files is only a bit of anal retentivity
anyway.  I don't think that enforcing it is worth special hacks that
we do not use anywhere else.
        regards, tom lane


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
David Fetter
Дата:
On Wed, Jan 27, 2010 at 12:27:08PM -0500, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > On Wed, Jan 27, 2010 at 04:52:00PM +0200, Peter Eisentraut wrote:
> >> Better write a check in the makefile.
> 
> > That assumes that everyone will always actually run the
> > appropriate make before committing, which I wouldn't assume,
> > especially for a "trivial" patch that's going out when someone is
> > pressed for time.  Checking in an unavoidable place seems much
> > more foolproof.
> 
> The rule against tabs in SGML files is only a bit of anal
> retentivity anyway.  I don't think that enforcing it is worth
> special hacks that we do not use anywhere else.

Good point.  What other pre-commit hooks do we need?

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
"Joshua D. Drake"
Дата:
On Wed, 2010-01-27 at 12:27 -0500, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > On Wed, Jan 27, 2010 at 04:52:00PM +0200, Peter Eisentraut wrote:
> >> Better write a check in the makefile.
>
> > That assumes that everyone will always actually run the appropriate
> > make before committing, which I wouldn't assume, especially for a
> > "trivial" patch that's going out when someone is pressed for time.
> > Checking in an unavoidable place seems much more foolproof.
>
> The rule against tabs in SGML files is only a bit of anal retentivity
> anyway.

I disagree. SGML suffers the same as code if you are using tabs.


Joshua D. Drake


--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir.

Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Tom Lane
Дата:
David Fetter <david@fetter.org> writes:
> On Wed, Jan 27, 2010 at 12:27:08PM -0500, Tom Lane wrote:
>> The rule against tabs in SGML files is only a bit of anal
>> retentivity anyway.  I don't think that enforcing it is worth
>> special hacks that we do not use anywhere else.

> Good point.  What other pre-commit hooks do we need?

Hm, aren't you one of the main cheerleaders for moving to git?
Why would you want us to be installing any additional CVS dependencies
right now?  Adding commit hooks would just create another must-do-
before-moving task.  If we actually desperately *needed* some, maybe
it'd be worth it, but I can't see that this kind of thing is worth it.
        regards, tom lane


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
David Fetter
Дата:
On Wed, Jan 27, 2010 at 12:41:28PM -0500, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > On Wed, Jan 27, 2010 at 12:27:08PM -0500, Tom Lane wrote:
> >> The rule against tabs in SGML files is only a bit of anal
> >> retentivity anyway.  I don't think that enforcing it is worth
> >> special hacks that we do not use anywhere else.
> 
> > Good point.  What other pre-commit hooks do we need?
> 
> Hm, aren't you one of the main cheerleaders for moving to git?

Yes.

> Why would you want us to be installing any additional CVS dependencies
> right now?  Adding commit hooks would just create another must-do-
> before-moving task.

Right now is not the time.

> If we actually desperately *needed* some, maybe it'd be worth it,
> but I can't see that this kind of thing is worth it.

Post-git-move would be a better time to revisit this.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Peter Eisentraut
Дата:
On ons, 2010-01-27 at 09:04 -0800, David Fetter wrote:
> On Wed, Jan 27, 2010 at 04:52:00PM +0200, Peter Eisentraut wrote:
> > On tis, 2010-01-26 at 10:20 -0800, David Fetter wrote:
> > > On Tue, Jan 26, 2010 at 02:21:29PM +0000, Bruce Momjian wrote:
> > > > Log Message:
> > > > -----------
> > > > Remove tabs in SGML.
> > > 
> > > Can we see about making a commit hook for CVS that disallows \t in
> > > SGML files?  The process in git is pretty simple.
> > 
> > Better write a check in the makefile.
> 
> That assumes that everyone will always actually run the appropriate
> make before committing, which I wouldn't assume, especially for a
> "trivial" patch that's going out when someone is pressed for time.

Even if you are pressed for time, you are supposed to check your patch.
And even then, we have the community and automated build services to
pick up after you.

> Checking in an unavoidable place seems much more foolproof.

I'm going to put in an advance vote here against any kind of
code-checking commit hook.  Because they live in the repository
metadata, they can only be seen and changed by the system
administrators, they do not travel with the source code, and they are
not under version control themselves.  The source code and the scripts
and tests to manage it should be self-consistent and not dependent on
external containers.




Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
"Joshua D. Drake"
Дата:
On Wed, 2010-01-27 at 12:27 -0500, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > On Wed, Jan 27, 2010 at 04:52:00PM +0200, Peter Eisentraut wrote:
> >> Better write a check in the makefile.
> 
> > That assumes that everyone will always actually run the appropriate
> > make before committing, which I wouldn't assume, especially for a
> > "trivial" patch that's going out when someone is pressed for time.
> > Checking in an unavoidable place seems much more foolproof.
> 
> The rule against tabs in SGML files is only a bit of anal retentivity
> anyway. 

I disagree. SGML suffers the same as code if you are using tabs.


Joshua D. Drake


-- 
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 503.667.4564
Consulting, Training, Support, Custom Development, Engineering
Respect is earned, not gained through arbitrary and repetitive use or Mr. or Sir.



Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Bruce Momjian
Дата:
Peter Eisentraut wrote:
> On tis, 2010-01-26 at 10:20 -0800, David Fetter wrote:
> > On Tue, Jan 26, 2010 at 02:21:29PM +0000, Bruce Momjian wrote:
> > > Log Message:
> > > -----------
> > > Remove tabs in SGML.
> >
> > Can we see about making a commit hook for CVS that disallows \t in
> > SGML files?  The process in git is pretty simple.
>
> Better write a check in the makefile.

Done, and attached.  The rule is more shell script than makefile, but I
am not sure how else to do it.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: doc/src/sgml/Makefile
===================================================================
RCS file: /cvsroot/pgsql/doc/src/sgml/Makefile,v
retrieving revision 1.135
diff -c -c -r1.135 Makefile
*** doc/src/sgml/Makefile    6 Jan 2010 19:07:05 -0000    1.135
--- doc/src/sgml/Makefile    5 Feb 2010 14:49:26 -0000
***************
*** 345,350 ****
--- 345,352 ----

  endif # sqlmansectnum != 7

+ check-tabs:
+     ( ! grep '    ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files";  exit
1)

  ##
  ## Clean

Re: [COMMITTERS] pgsql: Remove tabs in SGML.

От
Alvaro Herrera
Дата:
Bruce Momjian wrote:
> Peter Eisentraut wrote:
> > On tis, 2010-01-26 at 10:20 -0800, David Fetter wrote:
> > > On Tue, Jan 26, 2010 at 02:21:29PM +0000, Bruce Momjian wrote:
> > > > Log Message:
> > > > -----------
> > > > Remove tabs in SGML.
> > > 
> > > Can we see about making a commit hook for CVS that disallows \t in
> > > SGML files?  The process in git is pretty simple.
> > 
> > Better write a check in the makefile.
> 
> Done, and attached.  The rule is more shell script than makefile, but I
> am not sure how else to do it.

Maybe have the check-tabs rule as a dependency of the "check", "html"
and/or "draft" rules?

> + check-tabs:
> +     ( ! grep '    ' $(wildcard $(srcdir)/*.sgml $(srcdir)/ref/*.sgml) ) || (echo "Tabs appear in SGML files";  exit
1)



-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.