You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> on 2005/10/20 20:38:19 UTC
[PATCH] Fix the breakage of tools/examples/svnlook.rb.
Hi,
Since the Ruby binding APIs has been changed in this summer,
tools/examples/svnlook.rb is broken now.
This patch fix it.
Could you review my patch and approve committing?
-nori
Log:
[[[
Use new APIs of Ruby bindings to fix the breakage of
tools/examples/svnlook.rb.
* tools/examples/svnlook.rb
(SvnLook#cmd_date): Use Time#strftime directly instead of via
SvnLook#str_to_time.
(SvnLook#print_tree): Change arguments passed to
Svn::Fs::Root#dir_delta.
(SvnLook#str_to_time): Removed.
(SvnLook::Editor,
SvnLook::DirsChangedEditor,
SvnLook::ChangedEditor,
SvnLook::DiffEditor):
Inherit not Svn::Delta::Editor but Svn::Delta::BaseEditor.
(SvnLook::DiffEditor#apply_textdelta): Change arguments passed to
SvnLook::DiffEditor#do_diff.
]]]
Index: tools/examples/svnlook.rb
===================================================================
--- tools/examples/svnlook.rb (revision 16864)
+++ tools/examples/svnlook.rb (working copy)
@@ -99,8 +99,7 @@
if date
# Print out the date in a nice format
- time = str_to_time(date)
- puts time.strftime('%Y-%m-%d %H:%M(%Z)')
+ puts date.strftime('%Y-%m-%d %H:%M(%Z)')
else
# The specified revision doesn't have an associated date.
# Output just a blank line.
@@ -189,17 +188,11 @@
# Do a directory delta between the two roots with
# the specified editor
- base_root.editor = editor
- base_root.dir_delta('', '', root, '')
+ base_root.dir_delta('', '', root, '', editor)
end
- # Convert a string to an SVN date/time object
- def str_to_time(str)
- Svn::Util.string_to_time(str)
- end
-
# Output the current tree for a specified revision
- class Editor < Svn::Delta::Editor
+ class Editor < Svn::Delta::BaseEditor
# Initialize the Editor object
def initialize(root=nil, base_root=nil)
@@ -252,7 +245,7 @@
# Output directories that have been changed
- class DirsChangedEditor < Svn::Delta::Editor
+ class DirsChangedEditor < Svn::Delta::BaseEditor
# Recurse through the root node
def open_root(base_revision)
@@ -315,7 +308,7 @@
end
# Output files that have been changed between two roots
- class ChangedEditor < Svn::Delta::Editor
+ class ChangedEditor < Svn::Delta::BaseEditor
# Constructor
def initialize(root, base_root)
@@ -412,7 +405,7 @@
end
# Output diffs of files that have been changed
- class DiffEditor < Svn::Delta::Editor
+ class DiffEditor < Svn::Delta::BaseEditor
# Constructor
def initialize(root, base_root)
@@ -448,7 +441,7 @@
if file_baton[2].nil?
nil
else
- do_diff(file_baton[2], file_baton[2], file_baton[3])
+ do_diff(file_baton[2], file_baton[2])
end
end
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix the breakage of tools/examples/svnlook.rb.
Posted by Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp>.
Hi David,
> > > Since the Ruby binding APIs has been changed in this summer,
> > > tools/examples/svnlook.rb is broken now.
> > > This patch fix it.
> > >
> > > Could you review my patch and approve committing?
> >
> > +1
> >
> > Thank you for reviewing example ruby scripts.
> Please also nominate this for merge to the 1.3.x branch.
>
> Thanks!
Thank you for committing and merging into the 1.3.x release branch.
I noticed your mail just after your work.
Sorry for my late reply.
Regards,
-nori
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Fix the breakage of tools/examples/svnlook.rb.
Posted by David James <ja...@gmail.com>.
On 10/20/05, Kouhei Sutou <ko...@cozmixng.org> wrote:
> Hi,
>
> In <20...@dolphin.c.u-tokyo.ac.jp>
> "[PATCH] Fix the breakage of tools/examples/svnlook.rb." on Fri, 21 Oct 2005 05:38:19 +0900 (JST),
> Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> wrote:
>
> > Since the Ruby binding APIs has been changed in this summer,
> > tools/examples/svnlook.rb is broken now.
> > This patch fix it.
> >
> > Could you review my patch and approve committing?
>
> +1
>
> Thank you for reviewing example ruby scripts.
Please also nominate this for merge to the 1.3.x branch.
Thanks!
David
--
David James -- http://www.cs.toronto.edu/~james
Re: [PATCH] Fix the breakage of tools/examples/svnlook.rb.
Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,
In <20...@dolphin.c.u-tokyo.ac.jp>
"[PATCH] Fix the breakage of tools/examples/svnlook.rb." on Fri, 21 Oct 2005 05:38:19 +0900 (JST),
Kobayashi Noritada <no...@dolphin.c.u-tokyo.ac.jp> wrote:
> Since the Ruby binding APIs has been changed in this summer,
> tools/examples/svnlook.rb is broken now.
> This patch fix it.
>
> Could you review my patch and approve committing?
+1
Thank you for reviewing example ruby scripts.
Cheers,
--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org