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
Received on Thu Oct 20 22:38:56 2005