Thread: [pgsql-www] buildfarm git references pointing at github?

[pgsql-www] buildfarm git references pointing at github?

From
Tom Lane
Date:
If you go to, say,

https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koreaceratops&dt=2017-03-13%2020%3A49%3A29

and check the git links near the bottom of the page, you'll notice they
all point at github, not at git.postgresql.org.  I do not like that,
first because I do not consider github to be an authoritative source
for this purpose, and second because the links are all 404 anyway.

Some other nearby pages have only some of the links pointing at github,
but why are any of them doing that?
        regards, tom lane



Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/13/2017 11:06 PM, Tom Lane wrote:
> If you go to, say,
>
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koreaceratops&dt=2017-03-13%2020%3A49%3A29
>
> and check the git links near the bottom of the page, you'll notice they
> all point at github, not at git.postgresql.org.  I do not like that,
> first because I do not consider github to be an authoritative source
> for this purpose, and second because the links are all 404 anyway.
>
> Some other nearby pages have only some of the links pointing at github,
> but why are any of them doing that?
>
>


This actually goes back to the time when we were switching from CVS to git.

We can clean that up now, I think :-)

As for use of github, its use is hardcoded in the case of multi-commit
changesets because I don't know a way to make the standard gitweb
display those, although it might exist. And TBH github's display of
indiviual commits is lots nicer, too. Compare
<https://github.com/postgres/postgres/commit/a82178020de2c4b3576d0a079e11a431e382e4de>
with
<https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a82178020de2c4b3576d0a079e11a431e382e4de>

The github repo is a mirror of the repo at git.postgresql.org. I don't
see a problem with using it.

cheers

andrew

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





Re: [pgsql-www] buildfarm git references pointing at github?

From
Justin Clift
Date:
> On 14 Mar 2017, at 13:53, Andrew Dunstan <andrew.dunstan@2ndquadrant.com> wrote:
<snip>
> ... github's display of indiviual commits is lots nicer, too. Compare
> <https://github.com/postgres/postgres/commit/a82178020de2c4b3576d0a079e11a431e382e4de>
> with
> <https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a82178020de2c4b3576d0a079e11a431e382e4de>

As a data point, the "commitdiff" tab instead of the "commit" one seems
closer in nature to the GH one:
 https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=a82178020de2c4b3576d0a079e11a431e382e4de

+ Justin

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi




Re: [pgsql-www] buildfarm git references pointing at github?

From
Tom Lane
Date:
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> As for use of github, its use is hardcoded in the case of multi-commit
> changesets because I don't know a way to make the standard gitweb
> display those, although it might exist. And TBH github's display of
> indiviual commits is lots nicer, too. Compare
> <https://github.com/postgres/postgres/commit/a82178020de2c4b3576d0a079e11a431e382e4de>
> with
> <https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a82178020de2c4b3576d0a079e11a431e382e4de>

Beauty is in the eye of the beholder I guess, but to me the first one
is a prime example of crappy webdesign --- too busy, too convinced that
randomly colored backgrounds and legibility-killing font coloring choices
are great ideas.  I really would rather not be directed to github when
checking on our commits.
        regards, tom lane



Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/14/2017 10:15 AM, Tom Lane wrote:
> Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
>> As for use of github, its use is hardcoded in the case of multi-commit
>> changesets because I don't know a way to make the standard gitweb
>> display those, although it might exist. And TBH github's display of
>> indiviual commits is lots nicer, too. Compare
>> <https://github.com/postgres/postgres/commit/a82178020de2c4b3576d0a079e11a431e382e4de>
>> with
>> <https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a82178020de2c4b3576d0a079e11a431e382e4de>
> Beauty is in the eye of the beholder I guess, but to me the first one
> is a prime example of crappy webdesign --- too busy, too convinced that
> randomly colored backgrounds and legibility-killing font coloring choices
> are great ideas. 


So I guess you're also not keen on gitweb's commitdiff display suggested
nearby by Justin Clift?

Is there anyone else who wants to stick with the commit display instead
of switching to commitdiff?

>  I really would rather not be directed to github when
> checking on our commits.


I have already changed that except for the case where gitweb provides no
equivalent functionality (the "Change set" links).

cheers

andrew

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




Re: [pgsql-www] buildfarm git references pointing at github?

From
Tom Lane
Date:
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> On 03/14/2017 10:15 AM, Tom Lane wrote:
>> Beauty is in the eye of the beholder I guess, but to me the first one
>> is a prime example of crappy webdesign --- too busy, too convinced that
>> randomly colored backgrounds and legibility-killing font coloring choices
>> are great ideas. 

> So I guess you're also not keen on gitweb's commitdiff display suggested
> nearby by Justin Clift?

Well, I find it a considerable improvement over github's, at least in this
example.

> Is there anyone else who wants to stick with the commit display instead
> of switching to commitdiff?

+1 for commitdiff, that's pretty much always the form of the page I want
to see.
        regards, tom lane



Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/14/2017 10:32 AM, Tom Lane wrote:
> Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
>> On 03/14/2017 10:15 AM, Tom Lane wrote:
>>> Beauty is in the eye of the beholder I guess, but to me the first one
>>> is a prime example of crappy webdesign --- too busy, too convinced that
>>> randomly colored backgrounds and legibility-killing font coloring choices
>>> are great ideas. 
>> So I guess you're also not keen on gitweb's commitdiff display suggested
>> nearby by Justin Clift?
> Well, I find it a considerable improvement over github's, at least in this
> example.
>
>> Is there anyone else who wants to stick with the commit display instead
>> of switching to commitdiff?
> +1 for commitdiff, that's pretty much always the form of the page I want
> to see.


OK, We'll do that.

cheers

andrew

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




Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/14/2017 10:32 AM, Tom Lane wrote:
>
> +1 for commitdiff, that's pretty much always the form of the page I want
> to see.


Done.

cheers

andrew

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




Re: [pgsql-www] buildfarm git references pointing at github?

From
Alvaro Herrera
Date:
Andrew Dunstan wrote:

> On 03/14/2017 10:15 AM, Tom Lane wrote:

> >  I really would rather not be directed to github when
> > checking on our commits.
> 
> I have already changed that except for the case where gitweb provides no
> equivalent functionality (the "Change set" links).

https://git.postgresql.org/gitweb/?p=postgresql.git;a=shortlog;hp=9e09264;h=9ca5c8721dfa

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



Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/14/2017 10:45 AM, Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>
>> On 03/14/2017 10:15 AM, Tom Lane wrote:
>>>  I really would rather not be directed to github when
>>> checking on our commits.
>> I have already changed that except for the case where gitweb provides no
>> equivalent functionality (the "Change set" links).
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=shortlog;hp=9e09264;h=9ca5c8721dfa
>


Yes, but you can't get the diff for the whole changeset AFAIK. If you
click the commitdiff button for that link it only shows you the diff for
one commit. And we're already showing you the summary in the buildfarm
web page, so there's not much value in changing it to this.

cheers

andrew

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




Re: [pgsql-www] buildfarm git references pointing at github?

From
Tom Lane
Date:
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> On 03/14/2017 10:32 AM, Tom Lane wrote:
>> +1 for commitdiff, that's pretty much always the form of the page I want
>> to see.

> Done.

Thanks for changing that, it's definitely helpful.

I'm a bit confused about the links for the "files changed this run"
list.  What they seem to be now is pointers to the last commit that
changed each file.  I might be misremembering, but I thought they
had been links to the individual files in our git tree.  As long
as we're fooling around here, it seems like links to the per-file
history logs would be convenient; eg instead of

http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=a82178020de2c4b3576d0a079e11a431e382e4de

which is the link being offered right now for
src/backend/optimizer/plan/createplan.c in recent runs, perhaps


https://git.postgresql.org/gitweb/?p=postgresql.git;a=history;f=src/backend/optimizer/plan/createplan.c;h=4629ca27ee559086929daf437ac5e6954b1987d6

That particular display is useful since it's easy to get to either
the raw file contents ("blob") or the relevant commitdiffs from there.
However, fooling with it, it seems that the blob links don't get offered
unless the "h=" hash is the file's hash, not the commit's hash.  (gitweb
bug?)  That might make it too hard to do, dunno.  A close second in
usefulness would be to use the commit's hash,


https://git.postgresql.org/gitweb/?p=postgresql.git;a=history;f=src/backend/optimizer/plan/createplan.c;h=a82178020de2c4b3576d0a079e11a431e382e4de
        regards, tom lane



Re: [pgsql-www] buildfarm git references pointing at github?

From
Alvaro Herrera
Date:
Andrew Dunstan wrote:
> 
> 
> On 03/14/2017 10:45 AM, Alvaro Herrera wrote:
> > Andrew Dunstan wrote:
> >
> >> On 03/14/2017 10:15 AM, Tom Lane wrote:
> >>>  I really would rather not be directed to github when
> >>> checking on our commits.
> >> I have already changed that except for the case where gitweb provides no
> >> equivalent functionality (the "Change set" links).
> > https://git.postgresql.org/gitweb/?p=postgresql.git;a=shortlog;hp=9e09264;h=9ca5c8721dfa
> 
> Yes, but you can't get the diff for the whole changeset AFAIK. If you
> click the commitdiff button for that link it only shows you the diff for
> one commit. And we're already showing you the summary in the buildfarm
> web page, so there's not much value in changing it to this.

Ah, so what you want is this:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;hp=1e6de941e;h=9ca5c8721dfa
(I changed the "hp" parent commit to avoid a large diff).

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



Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/14/2017 11:14 AM, Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>>
>> On 03/14/2017 10:45 AM, Alvaro Herrera wrote:
>>> Andrew Dunstan wrote:
>>>
>>>> On 03/14/2017 10:15 AM, Tom Lane wrote:
>>>>>  I really would rather not be directed to github when
>>>>> checking on our commits.
>>>> I have already changed that except for the case where gitweb provides no
>>>> equivalent functionality (the "Change set" links).
>>> https://git.postgresql.org/gitweb/?p=postgresql.git;a=shortlog;hp=9e09264;h=9ca5c8721dfa
>> Yes, but you can't get the diff for the whole changeset AFAIK. If you
>> click the commitdiff button for that link it only shows you the diff for
>> one commit. And we're already showing you the summary in the buildfarm
>> web page, so there's not much value in changing it to this.
> Ah, so what you want is this:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;hp=1e6de941e;h=9ca5c8721dfa
> (I changed the "hp" parent commit to avoid a large diff).
>


That is still only showing me the diff for a single commit AFAICT.

cheers

andrew

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




Re: [pgsql-www] buildfarm git references pointing at github?

From
Alvaro Herrera
Date:
Andrew Dunstan wrote:

> > Ah, so what you want is this:
> > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;hp=1e6de941e;h=9ca5c8721dfa
> > (I changed the "hp" parent commit to avoid a large diff).
> 
> That is still only showing me the diff for a single commit AFAICT.

No, it's the diff for all commits in the interval.  I admit that the
fact that the header shows only one commit invites confusion -- gitweb
bug, clearly.  Compare:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9ca5c8721dfa

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



Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/14/2017 11:29 AM, Alvaro Herrera wrote:
> Andrew Dunstan wrote:
>
>>> Ah, so what you want is this:
>>> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;hp=1e6de941e;h=9ca5c8721dfa
>>> (I changed the "hp" parent commit to avoid a large diff).
>> That is still only showing me the diff for a single commit AFAICT.
> No, it's the diff for all commits in the interval.  I admit that the
> fact that the header shows only one commit invites confusion -- gitweb
> bug, clearly.  Compare:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9ca5c8721dfa
>


Yeah, That's very, very confusing. I'll be happy to change it if that
bug gets fixed.

cheers

andrew

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




Re: [pgsql-www] buildfarm git references pointing at github?

From
Andrew Dunstan
Date:

On 03/14/2017 11:07 AM, Tom Lane wrote:
> Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
>> On 03/14/2017 10:32 AM, Tom Lane wrote:
>>> +1 for commitdiff, that's pretty much always the form of the page I want
>>> to see.
>> Done.
> Thanks for changing that, it's definitely helpful.
>
> I'm a bit confused about the links for the "files changed this run"
> list.  What they seem to be now is pointers to the last commit that
> changed each file.  I might be misremembering, but I thought they
> had been links to the individual files in our git tree.  As long
> as we're fooling around here, it seems like links to the per-file
> history logs would be convenient; eg instead of
>
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=a82178020de2c4b3576d0a079e11a431e382e4de
>
> which is the link being offered right now for
> src/backend/optimizer/plan/createplan.c in recent runs, perhaps
>
>
https://git.postgresql.org/gitweb/?p=postgresql.git;a=history;f=src/backend/optimizer/plan/createplan.c;h=4629ca27ee559086929daf437ac5e6954b1987d6
>
> That particular display is useful since it's easy to get to either
> the raw file contents ("blob") or the relevant commitdiffs from there.
> However, fooling with it, it seems that the blob links don't get offered
> unless the "h=" hash is the file's hash, not the commit's hash.  (gitweb
> bug?)  That might make it too hard to do, dunno.  A close second in
> usefulness would be to use the commit's hash,
>
>
https://git.postgresql.org/gitweb/?p=postgresql.git;a=history;f=src/backend/optimizer/plan/createplan.c;h=a82178020de2c4b3576d0a079e11a431e382e4de
>
>             



It's pretty much always been this way, pointing to the most recent
relevant commit.

Originally, the server knew nothing of git refs (or CVS revision
numbers) at all. It just took information from the client about versions
of each file and shoved it into a URL, and the client code has always
pointed to the most recent revision in the relevant time period.

We could do a lot better than that now, as we know the git commit ref
for each snapshot, and the server keeps a pretty up to data mirror of
the code.

I agree it would be nice to get a history for the file for the relevant
period. I didn't really like either of your suggestions, though, because
they are showing a lot more history that I want to see.

However, there's more work there than just a line or two to change, so
it's going to take a bit of time to get right.

cheers

andrew

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