cvschangelogbuilder
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
-
- Registered User
- Posts: 653
- Joined: Wed Sep 21, 2005 3:01 pm
cvschangelogbuilder
just noticed that the cvs stats were moved to cvschangelogbuilder. (didnt see an announcement, maybe one will be made later?)
thanks! i especially like the "diff" button. it really helps those who want to poke into the code and see what was actually changed!
not to detract from this very nice improvement, i'd like to make a small request:
when viewing a php source file, it would be nice if highlight_file() or highlight_string() would be used.
Thanks!!!
thanks! i especially like the "diff" button. it really helps those who want to poke into the code and see what was actually changed!
not to detract from this very nice improvement, i'd like to make a small request:
when viewing a php source file, it would be nice if highlight_file() or highlight_string() would be used.
Thanks!!!
Re: cvschangelogbuilder
code reader wrote: just noticed that the cvs stats were moved to cvschangelogbuilder. (didnt see an announcement, maybe one will be made later?)
No, there will be no announcement of course.
when viewing a php source file, it would be nice if highlight_file() or highlight_string() would be used.
Sorry, but you eventually noticed that the diff and source link are all redirecting to sourceforge viewcvs...
-
- Registered User
- Posts: 653
- Joined: Wed Sep 21, 2005 3:01 pm
Re: cvschangelogbuilder
Acyd Burn wrote: Sorry, but you eventually noticed that the diff and source link are all redirecting to sourceforge viewcvs...
the nice thing about highlight_file() is that it can work with remote files as well.
all you need is to have a single php file in your site, say highlight.php that looks approximately so:
Code: Select all
<?php highlight_file($_GET['url']); ?>
Code: Select all
sub FormatCvsFileLink {
my $url=shift;
my $version=shift;
if ($ViewCvsUrl) {
my $string='';
$string="$ViewCvsUrl";
$string =~ s/__MODULE__/$Module/g;
$url =~ s/$Module\@//g;
$string.="$url";
$string.="?rev=".$version;
return "<a href=\"$string\" target=\"_newcvs\">$url</a>";
}
else {
return "$url";
}
}
Code: Select all
sub FormatCvsFileLink {
my $url=shift;
my $version=shift;
if ($ViewCvsUrl) {
my $string='';
$string="$ViewCvsUrl";
$string =~ s/__MODULE__/$Module/g;
$url =~ s/$Module\@//g;
$string.="$url";
$string.="?rev=".$version;
// next line is the change. we need to convert urlencode $string, which in perl is called uri_escape. for this we have to add URI::Escape to the uses clause at the head of the file.
return "<a href=\"highlight.php?url=" . uri_escape($string) . "\" target=\"_newcvs\">$url</a>";
}
else {
return "$url";
}
}
one nice side-effect is that now, when viewing a html file in the styles directory, it looks bizzare. with highlight_file it looks straight.
[EDIT:
the required perl module name is URI::Escape, not URL::Escape ]
-
- Registered User
- Posts: 653
- Joined: Wed Sep 21, 2005 3:01 pm
Re: cvschangelogbuilder
i dont understand.naderman wrote: Or a simple &view=markup is added to the sf.net url.
i tried to add &view=markup to both php and html files, and it did not seem to make any difference. could you please clarify?
thx.
Re: cvschangelogbuilder
Current link: http://phpbb.cvs.sourceforge.net/phpbb/ ... p?rev=1.66" target="_blank
Link with highlighting:
http://phpbb.cvs.sourceforge.net/phpbb/ ... iew=markup" target="_blank
Link with highlighting:
http://phpbb.cvs.sourceforge.net/phpbb/ ... iew=markup" target="_blank
-
- Registered User
- Posts: 653
- Joined: Wed Sep 21, 2005 3:01 pm
Re: cvschangelogbuilder
thanks!
the reason i didnt see it is that the links generated by the tool al look like this:
http://phpbb.cvs.sourceforge.net/phpbb/phpBB2/mcp.php?rev=1.113
this link will be automatically redirected by sf to:
http://phpbb.cvs.sourceforge.net/*checkout*/phpbb/phpBB2/mcp.php?revision=1.113
(note the /*checkout*/ part). these links ignore the view=markup.
you have to remove the /*checkout*/ part for the view=markup to work.
bottom line:
in the FormatCvsFileLink sub, if you change the line:
to
everyone will be happy.
this is better than using highlight_file() as i originally suggested, because it highlight nicely html files as well.
so, please, could you please do this change?
thanks.
the reason i didnt see it is that the links generated by the tool al look like this:
http://phpbb.cvs.sourceforge.net/phpbb/phpBB2/mcp.php?rev=1.113
this link will be automatically redirected by sf to:
http://phpbb.cvs.sourceforge.net/*checkout*/phpbb/phpBB2/mcp.php?revision=1.113
(note the /*checkout*/ part). these links ignore the view=markup.
you have to remove the /*checkout*/ part for the view=markup to work.
bottom line:
in the FormatCvsFileLink sub, if you change the line:
Code: Select all
$string.="?rev=".$version;
Code: Select all
$string.="?revision=$version&view=markup";
this is better than using highlight_file() as i originally suggested, because it highlight nicely html files as well.
so, please, could you please do this change?
thanks.
Re: cvschangelogbuilder
This change seems to be useful, though i do not understand why are you are pressuring this so much - the relevant things i wanted to include is the diff link - the file could have been stayed there without any link at all.
-
- Registered User
- Posts: 653
- Joined: Wed Sep 21, 2005 3:01 pm
Re: cvschangelogbuilder
you are right. as i said in my initial post, i think this is a great improvement.
i also agree that the diff is the important link.
it's just that by implementing naderman's insight with view=markup, you get the best of both worlds: the concise report by cvschangelogbuilder, plus all the goodies viewvc used by sf provides: syntax highlighting, immediate access to the file's revision log (through which you can diff any two revisions), and cvs annotate.
i didnt think i was pressuring, just suggesting a small improvement. if that's how it feels, i guess i should ease of...
[EDIT:
just noticed that you did implement the view=markup. thanks!
i also noticed that when the commit comment is bug #xxxx, you create a link to the bug tracker! wow! that's ingenious!
]
i also agree that the diff is the important link.
it's just that by implementing naderman's insight with view=markup, you get the best of both worlds: the concise report by cvschangelogbuilder, plus all the goodies viewvc used by sf provides: syntax highlighting, immediate access to the file's revision log (through which you can diff any two revisions), and cvs annotate.
i didnt think i was pressuring, just suggesting a small improvement. if that's how it feels, i guess i should ease of...
[EDIT:
just noticed that you did implement the view=markup. thanks!
i also noticed that when the commit comment is bug #xxxx, you create a link to the bug tracker! wow! that's ingenious!
]
Re: cvschangelogbuilder
Not quite as pretty on the eyes.. And the thing thats annoying is that i cannot see net line change amounts for each commit..
But its still functional, good job guys..
Yawnster
But its still functional, good job guys..
Yawnster