pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: test_pg_dump TAP test whitespace cleanup
8+ messages / 2 participants
[nested] [flat]

* pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 04:06  Stephen Frost <sfrost@snowman.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Stephen Frost @ 2017-01-30 04:06 UTC (permalink / raw)
  To: pgsql-committers

test_pg_dump TAP test whitespace cleanup

The formatting of the perl hashes used in the TAP tests for test_pg_dump
was rather horribly inconsistent and made it more difficult than it
really should have been to add new tests or adjust what tests are for
what runs, etc.

Reformat to clean that all up.

Whitespace-only changes.

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/73cd4896f41052bdaf779fa1b63aca5f10c56a62

Modified Files
--------------
src/test/modules/test_pg_dump/t/001_base.pl | 784 ++++++++++++++++------------
1 file changed, 462 insertions(+), 322 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 04:06  Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 8+ messages in thread

From: Stephen Frost @ 2017-01-30 04:06 UTC (permalink / raw)
  To: pgsql-committers

test_pg_dump TAP test whitespace cleanup

The formatting of the perl hashes used in the TAP tests for test_pg_dump
was rather horribly inconsistent and made it more difficult than it
really should have been to add new tests or adjust what tests are for
what runs, etc.

Reformat to clean that all up.

Whitespace-only changes.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fb94ca77f1400e236b00d432dccfbe4f1124971c

Modified Files
--------------
src/test/modules/test_pg_dump/t/001_base.pl | 784 ++++++++++++++++------------
1 file changed, 462 insertions(+), 322 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 16:59  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Stephen Frost <sfrost@snowman.net>
  0 siblings, 1 reply; 8+ messages in thread

From: Alvaro Herrera @ 2017-01-30 16:59 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-committers

Stephen Frost wrote:
> test_pg_dump TAP test whitespace cleanup
> 
> The formatting of the perl hashes used in the TAP tests for test_pg_dump
> was rather horribly inconsistent and made it more difficult than it
> really should have been to add new tests or adjust what tests are for
> what runs, etc.
> 
> Reformat to clean that all up.
> 
> Whitespace-only changes.

This will be undone by the next perltidy run.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 17:07  Stephen Frost <sfrost@snowman.net>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Stephen Frost @ 2017-01-30 17:07 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: pgsql-committers

* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> Stephen Frost wrote:
> > test_pg_dump TAP test whitespace cleanup
> > 
> > The formatting of the perl hashes used in the TAP tests for test_pg_dump
> > was rather horribly inconsistent and made it more difficult than it
> > really should have been to add new tests or adjust what tests are for
> > what runs, etc.
> > 
> > Reformat to clean that all up.
> > 
> > Whitespace-only changes.
> 
> This will be undone by the next perltidy run.

Ugh.

I certainly hope what was there before wasn't the result of a perltidy
run as it was quite ugly and inconsistent..

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 18:10  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Stephen Frost <sfrost@snowman.net>
  0 siblings, 2 replies; 8+ messages in thread

From: Alvaro Herrera @ 2017-01-30 18:10 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-committers

Stephen Frost wrote:
> * Alvaro Herrera (alvherre@2ndquadrant.com) wrote:

> > This will be undone by the next perltidy run.
> 
> Ugh.
> 
> I certainly hope what was there before wasn't the result of a perltidy
> run as it was quite ugly and inconsistent..

Maybe it was.  I checked the diff after running perltidy after your
commit and there are some changes that look like a reversion of your
changes, but I don't know if there are other changes.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [COMMITTERS] pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 19:31  Stephen Frost <sfrost@snowman.net>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Stephen Frost @ 2017-01-30 19:31 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: pgsql-hackers@postgresql.org

* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> Stephen Frost wrote:
> > * Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> 
> > > This will be undone by the next perltidy run.
> > 
> > Ugh.
> > 
> > I certainly hope what was there before wasn't the result of a perltidy
> > run as it was quite ugly and inconsistent..
> 
> Maybe it was.  I checked the diff after running perltidy after your
> commit and there are some changes that look like a reversion of your
> changes, but I don't know if there are other changes.

Yeah, I took a look at what perltidy is doing and at least some of that
was stuff I went through and fixed.

The changes to the %tests structure are pretty reasonable and it looks
like it's going to preserve at least some of what I did there because it
doesn't (always, at least) re-combine lines that have been split.
Unfortunately, what's it's doing to the %pgdump_runs structure are
rather annoying because it wants to turn something like:

-       column_inserts => {
-               dump_cmd => [
-                       'pg_dump',
-                       '-f', "$tempdir/column_inserts.sql",
-                       '-a',
-                       '--column-inserts',
-                       'postgres',
-               ], },

into:

+    column_inserts => {
+        dump_cmd => [
+            'pg_dump',                     '-f',
+            "$tempdir/column_inserts.sql", '-a',
+            '--column-inserts',            'postgres',
+        ],
+    },

I don't mind the change in indentation, of course, but obviously it's a
lot nicer when the '-f $tempdir/column_insert.sql' is all on the same
line since that's clearly a flag with an argument.

I could change all of those to be long versions, eg "--file=blah", to
keep them together.  Not really ideal, but I'm not really worried that
getopt() is going to break either.

Unless anyone has a better idea, I'll see about doing that, and then
run perltidy of it to clean it up.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [COMMITTERS] pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 20:08  Stephen Frost <sfrost@snowman.net>
  parent: Alvaro Herrera <alvherre@2ndquadrant.com>
  1 sibling, 1 reply; 8+ messages in thread

From: Stephen Frost @ 2017-01-30 20:08 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: pgsql-hackers@postgresql.org

* Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> Stephen Frost wrote:
> > * Alvaro Herrera (alvherre@2ndquadrant.com) wrote:
> 
> > > This will be undone by the next perltidy run.
> > 
> > Ugh.
> > 
> > I certainly hope what was there before wasn't the result of a perltidy
> > run as it was quite ugly and inconsistent..
> 
> Maybe it was.  I checked the diff after running perltidy after your
> commit and there are some changes that look like a reversion of your
> changes, but I don't know if there are other changes.

Uh, after finding our perltidyrc and running with that, I have to ask,
why are we setting vertical-tightness to 2 (never break before a closing
token)?  The default of 0 (always break) end up being a lot nicer when
working on lists.  Stacking isolated opening/closing tokens does make
sense, to me, at least.  Then again, I guess those might screw up other
bits of code. :/

Sigh.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [COMMITTERS] pgsql: test_pg_dump TAP test whitespace cleanup
@ 2017-01-30 20:20  Alvaro Herrera <alvherre@2ndquadrant.com>
  parent: Stephen Frost <sfrost@snowman.net>
  0 siblings, 0 replies; 8+ messages in thread

From: Alvaro Herrera @ 2017-01-30 20:20 UTC (permalink / raw)
  To: Stephen Frost <sfrost@snowman.net>; +Cc: pgsql-hackers@postgresql.org

Stephen Frost wrote:

> Uh, after finding our perltidyrc and running with that, I have to ask,
> why are we setting vertical-tightness to 2 (never break before a closing
> token)?  The default of 0 (always break) end up being a lot nicer when
> working on lists.  Stacking isolated opening/closing tokens does make
> sense, to me, at least.  Then again, I guess those might screw up other
> bits of code. :/

I think it's mostly a matter of personal preference among the (small
group of) people who first set up the perltidy args -- see the thread
around here:
https://www.postgresql.org/message-id/20120616024516.GC26006@momjian.us

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2017-01-30 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 04:06 pgsql: test_pg_dump TAP test whitespace cleanup Stephen Frost <sfrost@snowman.net>
2017-01-30 04:06 pgsql: test_pg_dump TAP test whitespace cleanup Stephen Frost <sfrost@snowman.net>
2017-01-30 16:59 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2017-01-30 17:07   ` Stephen Frost <sfrost@snowman.net>
2017-01-30 18:10     ` Alvaro Herrera <alvherre@2ndquadrant.com>
2017-01-30 19:31       ` Stephen Frost <sfrost@snowman.net>
2017-01-30 20:08       ` Stephen Frost <sfrost@snowman.net>
2017-01-30 20:20         ` Alvaro Herrera <alvherre@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox