Forum: Ruby Ruby path for SVN log XML -> HTML

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bil K. (Guest)
on 2006-02-27 15:29
(Received via mailing list)
So what's the Ruby way to go from

  svn log --limit 40 --xml --verbose

to HTML?

Thanks,
Kouhei S. (Guest)
on 2006-02-28 14:25
(Received via mailing list)
Hi,

In <dtuulo$1rg$removed_email_address@domain.invalid>
  "Ruby path for SVN log XML -> HTML" on Mon, 27 Feb 2006 22:28:34
+0900,
  Bil K. <removed_email_address@domain.invalid> wrote:

> So what's the Ruby way to go from
>
>   svn log --limit 40 --xml --verbose
>
> to HTML?

Here is my answer.

A sample output is here:
  http://pub.cozmixng.org/~kou/archives/svnlog2html-...
Bil K. (Guest)
on 2006-03-01 04:03
(Received via mailing list)
Kouhei S. wrote:
> Hi,

Hello.

> Here is my answer.
>
> A sample output is here:
>   http://pub.cozmixng.org/~kou/archives/svnlog2html-...

Awesome, thanks.

BTW: I did end up using your commit-email.rb.  Thanks!

Regards,
Bil K. (Guest)
on 2006-03-01 20:59
(Received via mailing list)
Kouhei S. wrote:
>
> Here is my answer.

Question: why isn't this part of our commit-email.rb?  Don't
you use it as part of your post-commit hook?

BTW: I got a nil String error from $PWD.  Here's my patch,

Index: svnlog2html.rb
===================================================================
--- svnlog2html.rb      (revision 18105)
+++ svnlog2html.rb      (working copy)
@@ -5,7 +5,7 @@

  include ERB::Util

-path = File.expand_path(ARGV.shift || $PWD)
+path = File.expand_path(ARGV.shift || ENV['PWD'])

  html = <<-HEADER
  <?xml version="1.0" encoding="utf-8"?>

Regards,
Kouhei S. (Guest)
on 2006-03-02 05:46
(Received via mailing list)
Hi,

In <du4qkv$gi2$removed_email_address@domain.invalid>
  "Re: Ruby path for SVN log XML -> HTML" on Thu, 2 Mar 2006 03:58:37
+0900,
  Bil K. <removed_email_address@domain.invalid> wrote:

> Question: why isn't this part of our commit-email.rb?  Don't
> you use it as part of your post-commit hook?

No. I made the script only for you. ;)

I added the script to trunk Subversion repository as
example:
  https://svn.collab.net/repos/svn/trunk/tools/examp...

> BTW: I got a nil String error from $PWD.  Here's my patch,

Thanks. I used Dir.pwd instead of ENV['PWD'].


Regards,
Bil K. (Guest)
on 2006-03-02 13:58
(Received via mailing list)
Kouhei S. wrote:
> Hi,

Hello.

> I added the script to trunk Subversion repository as example:
>   https://svn.collab.net/repos/svn/trunk/tools/examp...

Excellent, the world will thank you.

Are you hording any other svn gems?

My next project is to figure out how to check inbound
files as part of a pre-commit hook ... care to sketch
that out?

>>BTW: I got a nil String error from $PWD.  Here's my patch,
>
> Thanks. I used Dir.pwd instead of ENV['PWD'].

Ah, much better.

Thanks again,
Kouhei S. (Guest)
on 2006-03-02 15:58
(Received via mailing list)
Hi,

> Are you hording any other svn gems?

All of my gems are committed in Subversion repository:
  * https://svn.collab.net/repos/svn/trunk/tools/examp...
  * https://svn.collab.net/repos/svn/trunk/tools/examp...

And you have already seen scripts:

  * https://svn.collab.net/repos/svn/trunk/tools/examp...
  *
https://svn.collab.net/repos/svn/trunk/tools/hook-...


> My next project is to figure out how to check inbound
> files as part of a pre-commit hook ... care to sketch
> that out?

I can't show you any sample scripts without check condition
details. But svnlook.rb may help you.


Thanks,
This topic is locked and can not be replied to.