Re: strict version of version_stamp.pl

Lists: pgsql-hackers
From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: strict version of version_stamp.pl
Date: 2009-05-08 21:15:59
Message-ID: 1241817359.5178.281.camel@jd-laptop.pragmaticzealot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hello,

Here is a diff of version_stamp.pl. It is not quite done as I can't
actually get it to run. No matter what I do it doesn't appear to be able
to open configure.in.

If someone could help me figure out where I am being stupid I would
appreciate it.

Joshua D. Drake

--
PostgreSQL - XMPP: jdrake(at)jabber(dot)postgresql(dot)org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997

Attachment Content-Type Size
version_stamp.pl.diff text/x-patch 920.1 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jd(at)commandprompt(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 21:44:22
Message-ID: 16028.1241819062@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> Here is a diff of version_stamp.pl.

... and nearly a megabyte of irrelevant junk. Please take a closer look at
what you're sending before you send it ...

regards, tom lane


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 21:44:32
Message-ID: 1241819072.5178.287.camel@jd-laptop.pragmaticzealot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2009-05-08 at 14:16 -0700, Joshua D. Drake wrote:
> Hello,
>
> Here is a diff of version_stamp.pl. It is not quite done as I can't
> actually get it to run. No matter what I do it doesn't appear to be able
> to open configure.in.
>
> If someone could help me figure out where I am being stupid I would
> appreciate it.

Well you can all start by pointing out that I included a patch to
configure (which was wholly unintended). Sorry about that. Here is the
straight perl patch.

Sincerely,

Joshua D. Drake

--
PostgreSQL - XMPP: jdrake(at)jabber(dot)postgresql(dot)org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997

Attachment Content-Type Size
version_stamp.pl.diff text/x-patch 6.4 KB

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 21:45:39
Message-ID: 1241819139.5178.288.camel@jd-laptop.pragmaticzealot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2009-05-08 at 17:44 -0400, Tom Lane wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> > Here is a diff of version_stamp.pl.
>
> ... and nearly a megabyte of irrelevant junk. Please take a closer look at
> what you're sending before you send it ...

Yes I apologize for that. Git reacted differently than I expected to a
"git diff". I have since reposted a proper patch.

/me walks away in shame

Sincerely,

Joshua D. Drake

>
> regards, tom lane
>
--
PostgreSQL - XMPP: jdrake(at)jabber(dot)postgresql(dot)org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 21:50:24
Message-ID: 1241819424.5178.289.camel@jd-laptop.pragmaticzealot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, 2009-05-08 at 17:44 -0400, Tom Lane wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> > Here is a diff of version_stamp.pl.
>
> ... and nearly a megabyte of irrelevant junk. Please take a closer look at
> what you're sending before you send it ...

Never mind on this. I have obviously not re-honed my perl skills enough
to handle this.

Sorry for the noise.

Joshua D. Drake

>
> regards, tom lane
>
--
PostgreSQL - XMPP: jdrake(at)jabber(dot)postgresql(dot)org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jd(at)commandprompt(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 21:50:28
Message-ID: 16172.1241819428@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> Yes I apologize for that. Git reacted differently than I expected to a
> "git diff". I have since reposted a proper patch.

mmm ... I've recently been forced into using git for another project,
and I find myself mystified as to why anyone would want to use it.
Seems like baroqueness and unexpected behaviors are all over the thing.

regards, tom lane


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jd(at)commandprompt(dot)com
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 22:18:21
Message-ID: 200905090118.22627.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Saturday 09 May 2009 00:50:28 Tom Lane wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> > Yes I apologize for that. Git reacted differently than I expected to a
> > "git diff". I have since reposted a proper patch.
>
> mmm ... I've recently been forced into using git for another project,
> and I find myself mystified as to why anyone would want to use it.
> Seems like baroqueness and unexpected behaviors are all over the thing.

Obviously, an unchecked cvs diff would have produced the same garbage. Any
other problems?


From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 22:22:06
Message-ID: 1241821326.5178.298.camel@jd-laptop.pragmaticzealot.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Sat, 2009-05-09 at 01:18 +0300, Peter Eisentraut wrote:
> On Saturday 09 May 2009 00:50:28 Tom Lane wrote:
> > "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
> > > Yes I apologize for that. Git reacted differently than I expected to a
> > > "git diff". I have since reposted a proper patch.
> >
> > mmm ... I've recently been forced into using git for another project,
> > and I find myself mystified as to why anyone would want to use it.
> > Seems like baroqueness and unexpected behaviors are all over the thing.
>
> Obviously, an unchecked cvs diff would have produced the same garbage. Any
> other problems?

There are a number of conceptual differences. For example as a majority
svn user, svn diff does not act the way git diff does. In that svn diff
will only give me the difference within the current working directory.
It will not go to the beginning of the tree and give me a diff.

Perhaps a more difficult problem is that there is no easy way to update
a single file within a git repo. In cvs or svn, if I blow something up
on a particular file and I just want to take a fresh look, I just rm;svn
update.

Those are two things I can think of from my own working perspective that
have been an adjustment.

I would be curious to Tom's differences as well.

Sincerely,

Joshua D. Drake

--
PostgreSQL - XMPP: jdrake(at)jabber(dot)postgresql(dot)org
Consulting, Development, Support, Training
503-667-4564 - http://www.commandprompt.com/
The PostgreSQL Company, serving since 1997


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 22:26:20
Message-ID: 20090508222620.GN10794@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Joshua D. Drake wrote:

> Perhaps a more difficult problem is that there is no easy way to update
> a single file within a git repo. In cvs or svn, if I blow something up
> on a particular file and I just want to take a fresh look, I just rm;svn
> update.

Hmm, you should use "git revert" for that (same with SVN actually).

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Andres Freund <andres(at)anarazel(dot)de>
To: jd(at)commandprompt(dot)com
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 22:27:26
Message-ID: 4A04B1CE.7090601@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Joshua,

On 05/09/2009 12:22 AM, Joshua D. Drake wrote:
>> Obviously, an unchecked cvs diff would have produced the same garbage. Any
>> other problems?
> There are a number of conceptual differences. For example as a majority
> svn user, svn diff does not act the way git diff does. In that svn diff
> will only give me the difference within the current working directory.
> It will not go to the beginning of the tree and give me a diff.
git diff .

Although admittedly that takes some time getting used to.

> Perhaps a more difficult problem is that there is no easy way to update
> a single file within a git repo. In cvs or svn, if I blow something up
> on a particular file and I just want to take a fresh look, I just rm;svn
> update.
git checkout HEAD [--] your_file

Andres


From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 22:28:50
Message-ID: 4A04B222.7030702@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi Alvaro,

On 05/09/2009 12:26 AM, Alvaro Herrera wrote:
>> Perhaps a more difficult problem is that there is no easy way to update
>> a single file within a git repo. In cvs or svn, if I blow something up
>> on a particular file and I just want to take a fresh look, I just rm;svn
>> update.
> Hmm, you should use "git revert" for that (same with SVN actually).
Uh. Unfortunately not. git revert is for reverting the effects of an
earlier commit, not a working copy difference.

Andres


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 22:41:20
Message-ID: 20090508224120.GO10794@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andres Freund wrote:
> Hi Alvaro,
>
> On 05/09/2009 12:26 AM, Alvaro Herrera wrote:
>>> Perhaps a more difficult problem is that there is no easy way to update
>>> a single file within a git repo. In cvs or svn, if I blow something up
>>> on a particular file and I just want to take a fresh look, I just rm;svn
>>> update.
>> Hmm, you should use "git revert" for that (same with SVN actually).
> Uh. Unfortunately not. git revert is for reverting the effects of an
> earlier commit, not a working copy difference.

Thanks for the clarification :-)

So how do you revert WC changes? At least I got the SVN part right --
which is not surprising because that's the one I actually use. Oh, and
monotone uses 'revert' for the WC meaning too (the other one does not
really make much sense to me, but so does git as a whole)

(You can't be serious that for reverting a WC file to the repository
state you use "git checkout"?)

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-08 23:00:58
Message-ID: 200905090201.00357.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Saturday 09 May 2009 01:41:20 Alvaro Herrera wrote:
> (You can't be serious that for reverting a WC file to the repository
> state you use "git checkout"?)

Why not? The purpose of the operation is to get a file from the repository.
It's not much different whether you do it the first or the second time.


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-09 00:05:24
Message-ID: 603c8f070905081705y41fad1feoa8cc20dcc7557ff8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, May 8, 2009 at 6:41 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Andres Freund wrote:
>> Hi Alvaro,
>>
>> On 05/09/2009 12:26 AM, Alvaro Herrera wrote:
>>>> Perhaps a more difficult problem is that there is no easy way to update
>>>> a single file within a git repo. In cvs or svn, if I blow something up
>>>> on a particular file and I just want to take a fresh look, I just rm;svn
>>>> update.
>>> Hmm, you should use "git revert" for that (same with SVN actually).
>> Uh. Unfortunately not. git revert is for reverting the effects of an
>> earlier commit, not a working copy difference.
>
> Thanks for the clarification :-)
>
> So how do you revert WC changes?  At least I got the SVN part right --
> which is not surprising because that's the one I actually use.  Oh, and
> monotone uses 'revert' for the WC meaning too (the other one does not
> really make much sense to me, but so does git as a whole)
>
> (You can't be serious that for reverting a WC file to the repository
> state you use "git checkout"?)

Yes, that's right. I found that a bit odd too, but it's really not
bad once you get used to it.

If you want to blow away ALL your changes, you can use "git reset
--hard". If you want to remove all the untracked files from your
working tree, you can use "git clean".

...Robert


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: jd(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-09 00:25:54
Message-ID: 603c8f070905081725g26f0593bs5aa1ff35365fba9e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, May 8, 2009 at 5:50 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Joshua D. Drake" <jd(at)commandprompt(dot)com> writes:
>> Yes I apologize for that. Git reacted differently than I expected to a
>> "git diff". I have since reposted a proper patch.
>
> mmm ... I've recently been forced into using git for another project,
> and I find myself mystified as to why anyone would want to use it.
> Seems like baroqueness and unexpected behaviors are all over the thing.

I had that same reaction at first. It is definitely different than
cvs or svn. The first time I tried to use it, I gave up. The second
time I tried to use it, I gave up. The third time I tried to use it,
I almost gave up. But now I love it. A couple of really nice things:

In CVS or SVN, there is no easy way (AFAIK) to get the entire history
of all changes to the repository. You can get the history of changes
to a FILE, but not the history of changes, period. In git, you just
run "git log". (Of course if you want to restrict the output to
changes that modified a certain file, you just do "git log filename".)

If you are trying to find the last time something related to mumble
was changed, you can run "git log -Smumble", and it shows you every
commit that adds or removes a line containing the string "mumble".
This is pretty useful when trying to familiarize yourself with the
history of a certain bit of code. There are also options to search by
regex, etc.

The branching and merging stuff is incredibly good and useful. It
takes a bit of getting used to the commands, but it is so much easier
than cvs or svn. Actually, svn isn't bad for MAKING branches (which
was what initially persuaded me to use it), but it @$# sucks for
merging them. It is just terrible. It may even be worse than CVS.
Don't get me wrong: I used CVS very happily for more than 10 years,
and it does what it does just fine, but git is so much more powerful
that it's not even funny. I can't get over how much faster I can do
things now that used to be a major headache.

...Robert


From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-09 01:02:45
Message-ID: CD911AB5-708A-4A09-A72A-2E8912A24EAE@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On May 8, 2009, at 4:00 PM, Peter Eisentraut wrote:

>> (You can't be serious that for reverting a WC file to the repository
>> state you use "git checkout"?)
>
> Why not? The purpose of the operation is to get a file from the
> repository.
> It's not much different whether you do it the first or the second
> time.

Yeah, this makes it difficult for me to remember, too. I'm constantly
asking how to do this on #git.

Best,

David


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: jd(at)commandprompt(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-09 01:04:18
Message-ID: 4A04D692.4090806@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Joshua D. Drake wrote:
> Hello,
>
> Here is a diff of version_stamp.pl. It is not quite done as I can't
> actually get it to run. No matter what I do it doesn't appear to be able
> to open configure.in.
>
> If someone could help me figure out where I am being stupid I would
> appreciate it.
>
>

Maybe you aren't running it in the right directory (i.e. the directory
where configure.in exists)?

Anyway, I think what you want to achieve (without all the git crap) is
the attached.

cheers

andrew

Attachment Content-Type Size
version-stamp.diff text/x-patch 1.9 KB

From: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: jd(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-09 19:14:28
Message-ID: 8CE35272-4937-4CF9-A95A-C15E326BBBA5@hi-media.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

Le 8 mai 09 à 23:50, Tom Lane a écrit :
> mmm ... I've recently been forced into using git for another project,
> and I find myself mystified as to why anyone would want to use it.
> Seems like baroqueness and unexpected behaviors are all over the
> thing.

As a user of darcs I've been reacting in the same way for a long time,
and trying to avoid to have to try out git. It turns out that a
tutorial style video for an emacs mode for git made me change my mind
(what I dislike about git is its user interface):
http://vimeo.com/2871241

Maybe this would have some positive effect on your way to appreciate
git too? :)

Regards,
--
dim


From: David Fetter <david(at)fetter(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: jd(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2009-05-09 20:41:28
Message-ID: 20090509204128.GX18067@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, May 08, 2009 at 09:04:18PM -0400, Andrew Dunstan wrote:
>
>
> Joshua D. Drake wrote:
>> Hello,
>>
>> Here is a diff of version_stamp.pl. It is not quite done as I can't
>> actually get it to run. No matter what I do it doesn't appear to be able
>> to open configure.in.
>>
>> If someone could help me figure out where I am being stupid I would
>> appreciate it.
>
>
> Maybe you aren't running it in the right directory (i.e. the directory
> where configure.in exists)?
>
> Anyway, I think what you want to achieve (without all the git crap) is
> the attached.

Here's some git crap, but it makes all the .pl programs strict-clean.
Many are still horrendous, though.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

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

Attachment Content-Type Size
perl_strict_clean.diff text/plain 43.5 KB

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, jd(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2010-02-25 22:39:10
Message-ID: 201002252239.o1PMdAk16032@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


David, I am sorry this didn't get applied, and the code has drifted too
much to apply it now. Would you be able to make a new patch to make our
Perl files strict?

---------------------------------------------------------------------------

David Fetter wrote:
> On Fri, May 08, 2009 at 09:04:18PM -0400, Andrew Dunstan wrote:
> >
> >
> > Joshua D. Drake wrote:
> >> Hello,
> >>
> >> Here is a diff of version_stamp.pl. It is not quite done as I can't
> >> actually get it to run. No matter what I do it doesn't appear to be able
> >> to open configure.in.
> >>
> >> If someone could help me figure out where I am being stupid I would
> >> appreciate it.
> >
> >
> > Maybe you aren't running it in the right directory (i.e. the directory
> > where configure.in exists)?
> >
> > Anyway, I think what you want to achieve (without all the git crap) is
> > the attached.
>
> Here's some git crap, but it makes all the .pl programs strict-clean.
> Many are still horrendous, though.
>
> Cheers,
> David.
> --
> David Fetter <david(at)fetter(dot)org> http://fetter.org/
> Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
> Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
>
> Remember to vote!
> Consider donating to Postgres: http://www.postgresql.org/about/donate

[ Attachment, skipping... ]

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

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
PG East: http://www.enterprisedb.com/community/nav-pg-east-2010.do
+ If your life is a hard drive, Christ can be your backup. +


From: David Fetter <david(at)fetter(dot)org>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, jd(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2010-02-25 23:29:02
Message-ID: 20100225232902.GW2917@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Feb 25, 2010 at 05:39:10PM -0500, Bruce Momjian wrote:
>
> David, I am sorry this didn't get applied, and the code has drifted too
> much to apply it now. Would you be able to make a new patch to make our
> Perl files strict?

Please find updated patch attached. It passes strict, warnings, and
perlcritic -4

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)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

Attachment Content-Type Size
version_stamp.diff text/plain 2.8 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, jd(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: strict version of version_stamp.pl
Date: 2010-02-25 23:59:50
Message-ID: 9388.1267142390@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

David Fetter <david(at)fetter(dot)org> writes:
> -} elsif ($minor eq "devel") {
> - $dotneeded = 0;
> - $numericminor = 0;
> -} elsif ($minor =~ m/^alpha\d+$/) {
> - $dotneeded = 0;
> - $numericminor = 0;
> -} elsif ($minor =~ m/^beta\d+$/) {
> - $dotneeded = 0;
> - $numericminor = 0;
> -} elsif ($minor =~ m/^rc\d+$/) {
> +} elsif ($minor =~ m/
> + ^
> + (
> + devel |
> + alpha\d+ |
> + beta\d+ |
> + rc\d+
> + )
> + $/x) {

FWIW, I don't care for the above part of the patch. It doesn't seem to
me to improve readability one iota, if anything the reverse; and it
makes the logic less amenable to modification. If we wanted to make the
behavior at all different for alpha/beta/rc cases, we'd have to undo it
anyway.

regards, tom lane