Thread: Patch to add GIT support

Patch to add GIT support

From
Dave Page
Date:
The attached patch to the build system adds the ability for version
stamping to happen either when working in an SVN repo or GIT repo. In
an SVN repo, it will stamp the repo version number, such as 2134:2137M
as the current code does. In a GIT repo, it'll stamp the short version
of the last commit hash - eg. 42c03da.

Thanks to some^Wa lot of help from Robert Haas, it also manages to fix
the old problem in which the build system always thought that the
svnversion.h header had changed, thus resulting in svnversion.cpp
being recompiled and everything being relinked, regardless of whether
anything actually did change.

I need to do something similar for VC++, but does anyone object to
this? The intention is to apply it to all important branches so when
we move to GIT, they'll just work.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

Attachment

Re: Patch to add GIT support

From
Guillaume Lelarge
Date:
Le 25/06/2010 18:36, Dave Page a écrit :
> The attached patch to the build system adds the ability for version
> stamping to happen either when working in an SVN repo or GIT repo. In
> an SVN repo, it will stamp the repo version number, such as 2134:2137M
> as the current code does. In a GIT repo, it'll stamp the short version
> of the last commit hash - eg. 42c03da.
>
> Thanks to some^Wa lot of help from Robert Haas, it also manages to fix
> the old problem in which the build system always thought that the
> svnversion.h header had changed, thus resulting in svnversion.cpp
> being recompiled and everything being relinked, regardless of whether
> anything actually did change.
>
> I need to do something similar for VC++, but does anyone object to
> this? The intention is to apply it to all important branches so when
> we move to GIT, they'll just work.
>

No objection at all. It is just great :)


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: Patch to add GIT support

From
Ashesh Vashi
Date:
No objection from my end. :P
Looks good to me.

--
Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise Postgres Company



On Fri, Jun 25, 2010 at 10:06 PM, Dave Page <dpage@pgadmin.org> wrote:
The attached patch to the build system adds the ability for version
stamping to happen either when working in an SVN repo or GIT repo. In
an SVN repo, it will stamp the repo version number, such as 2134:2137M
as the current code does. In a GIT repo, it'll stamp the short version
of the last commit hash - eg. 42c03da.

Thanks to some^Wa lot of help from Robert Haas, it also manages to fix
the old problem in which the build system always thought that the
svnversion.h header had changed, thus resulting in svnversion.cpp
being recompiled and everything being relinked, regardless of whether
anything actually did change.

I need to do something similar for VC++, but does anyone object to
this? The intention is to apply it to all important branches so when
we move to GIT, they'll just work.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company


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


Re: Patch to add GIT support

From
Dave Page
Date:
OK, I applied the attached patch to TRUNK. I didn't bother with the
back branches - they'll just show up with a revision number of
'Unknown' anyway, and it's not like we're going to release any more
versions from them.

On Mon, Jun 28, 2010 at 7:39 AM, Ashesh Vashi
<ashesh.vashi@enterprisedb.com> wrote:
> No objection from my end. :P
> Looks good to me.
>
> --
> Thanks & Regards,
>
> Ashesh Vashi
> EnterpriseDB INDIA: Enterprise Postgres Company
>
> On Fri, Jun 25, 2010 at 10:06 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> The attached patch to the build system adds the ability for version
>> stamping to happen either when working in an SVN repo or GIT repo. In
>> an SVN repo, it will stamp the repo version number, such as 2134:2137M
>> as the current code does. In a GIT repo, it'll stamp the short version
>> of the last commit hash - eg. 42c03da.
>>
>> Thanks to some^Wa lot of help from Robert Haas, it also manages to fix
>> the old problem in which the build system always thought that the
>> svnversion.h header had changed, thus resulting in svnversion.cpp
>> being recompiled and everything being relinked, regardless of whether
>> anything actually did change.
>>
>> I need to do something similar for VC++, but does anyone object to
>> this? The intention is to apply it to all important branches so when
>> we move to GIT, they'll just work.
>>
>> --
>> Dave Page
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise Postgres Company
>>
>>
>> --
>> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgadmin-hackers
>>
>
>



--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

Attachment