On 6/16/05, Kouhei Sutou <kou@cozmixng.org> wrote:
> > This patch simplifies the svnshell.rb example script and adds documentation.
> Could you split the patch into simplifying script patch and
> adding documentation patch?
Sure. It probably makes sense to do the 'simplifying script' patch
first since the changes to the script will affect the documentation.
I have removed all of the documentation and whitespace changes from my
patch. The new version is attached. Once you have decided which of my
changes to include, I will submit a new patch to add documentation.
* tools/examples/svnshell.rb:
(SvnShell): Got rid of the 'in_rev_mode' variable. We now test for
txn.nil? instead.
(SvnShell.initialize): Refactor some of the code into a
get_youngest_rev method for getting the youngest revision of the
repository
(SvnShell.run): Check for cmd.nil? so that we skip entirely empty
commands
(SvnShell.dispatch): Capitalize first letter of error messages. Added
a list of valid commands to the 'Unknown command' message.
(SvnShell.do_cat): Renamed new_path variable to normalized_path.
(SvnShell.do_cd): Renamed new_path variable to normalized_path.
(SvnShell.do_ls): Output error message when directory entry is not
found for an existing file. Keep printing 'ls' output after
encountering file that does not exist (like the UNIX ls). Renamed
new_path variable to normalized_path.
(SvnShell.do_settxn): Got rid of unnecessary new_root variable.
(SvnShell.parse_path): Renamed to normalize_path.
(SvnShell.parent_dir): Created new helper function for finding the
parent directory of a specified path
(SvnShell.path_landing): Renamed to find_landing_path. Simplified
function by reimplementing it in a tail-recursive manner. Instead
of modifying @path, we now return the value.
Cheers,
David
--
David James -- http://www.cs.toronto.edu/~james
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 16 18:57:30 2005