[rfc][icedtea-web] Minor addition to html-gen.sh

Andrew Azores aazores at redhat.com
Mon Dec 23 13:45:21 PST 2013


----- Original Message -----
From: "Jiri Vanek" <jvanek at redhat.com>
To: "Andrew Azores" <aazores at redhat.com>
Cc: "IcedTea Distro List" <distro-pkg-dev at openjdk.java.net>
Sent: Monday, December 23, 2013 3:33:30 PM
Subject: Re: [rfc][icedtea-web] Minor addition to html-gen.sh

>On 12/23/2013 06:50 PM, Andrew Azores wrote:
>> Hi,
>>
>> ChangeLog:
>> * html-gen.sh: Added hyperlinks for revisions in generated ChangeLog
>>
>> This patch adds revision hyperlinks to the generated ChangeLog html used for javaws -about. The revisions should match up with the ChangeLog entry they're placed next to so long as the ChangeLog is properly kept in sync with the actual hg history. The script just assumes that the last 10 entries in hg log correspond 1:1 to the last 10 entries in the plain ChangeLog file. The script also uses the remote URL of the current repo to figure out where to link revisions, so it should still work and link to the correct revisions once the script is branched out of hg/icedtea-web and into hg/release/icedtea-web-1.5, for example.
>>
>> Thanks,
>>
>> Andrew A
>
>
>The code is ok, you are shell master :)

Oh stop, you're making me blush...

:)

>
>
>There was task (created and assigned to himself by Pavel, but he is to lazy to act O:)  to move our luncher.in from bashism to general shell. Do you wont to take it?

Hmm, perhaps. To be honest I don't actually have a very good grasp on what's bash-specific and what's plain sh compliant, but I'd be glad to look into it at least.

>
>
>Several general hints:
>
>
>"...sions should match up with the ChangeLog entry they're placed next to so long as the ChangeLog is properly kept in sync w..."
>   - thsi is  generally not true for head, but should be true for branches. Eg right now the head have one minor commit one push before head.
>     Anyway I'm against to fix this, as this will made code unnecessary complex, and current functionality is more then enough (is great anough :)
>
>On current head, the first link is broknen:
>generated http://icedtea.classpath.org/hg/icedtea-web/rev/4c1610ee5941 against real http://icedtea.classpath.org/hg/icedtea-web/rev/17818bc7aba3. Not sure how it happnede, but again not worthy to fix imho (it lead user to repo anyway)
>
>feel free to elaborate as you wish.

Hmm, not happening for me. At least not for the very first link. Do you have a local commit that you haven't pushed yet? The script doesn't do any checking to ensure that the commits it finds in the log have actually been pushed to remote - which should be okay, since really users are only ever going to see the result of this script when it's run during a release anyway, at which point I would think all local commits have been pushed?

I do see that the hyperlinks are out of sync later down the list, so I guess at some point there was a commit that is in "hg log" but not ChangeLog. Tsk, tsk... but yes, at least it brings users to the repo, even if it's not quite the right commit. I don't see a good way around this unless I start pulling the ChangeLog.html information from "hg log -v" rather than the ChangeLog itself. This would work but I think it's better to keep using ChangeLog, since every ChangeLog entry will definitely have good information and the proper format, whereas commit messages only "hopefully" do.

>
>"... out of hg/icedtea-web and into hg/release/icedtea-web-1.5..." .. nice :)
>
>Only one "against the immediate push" : I dont think the revision text is worthy. I would use current date-name as link text, and href same as have current revision text.
>

New patch uses the date part of the line as the hyperlink. I think it didn't look very nice when I included the author name as part of the link.

>
>One thing to think about, or for next push or whatever - There is hardcoded 10 items in chnaglog -  Imho the whole changelog since last release is worthy. So 1.5 will have whole changelog since 1.4 branching. 1.5.1 will have whole chnagelog since 1.5(.0)... and os on. I' afraid the  hgtags file is only helper here. Is it to hard to implement?
>
>
>Thanx! Nice patch!
>
>
>J.

This makes sense. I'll have to look at how I might make use of the hgtags file for this, but I don't think it's going to be trivial to make the script work that way. But it should be doable somehow.

Thanks,

Andrew A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: html-gen-revisions.patch
Type: text/x-patch
Size: 2328 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20131223/4e50f9a4/html-gen-revisions.patch 


More information about the distro-pkg-dev mailing list