[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Repository root relative support for the command-line client

From: Troy Curtis Jr <troycurtisjr_at_gmail.com>
Date: Tue, 25 Mar 2008 23:20:49 -0500

Here is my first shot at implementing the command-line repository root
relative url support in libsvn_client. Note to Julian: I chose not to return
a structure because after looking into it I found that it was a much larger
job than I wanted to do for relative url support...it was definetly not a
"gimme". I also found that it did not really gain me (or this patch) much

Implement repository root relative url support for the svn command-line
client. This allows the user to use '^/' in front of any target to
mean the repository root url. The repository root url is determined by
checking the other arguments' root urls (if they exist) and using that common
url. If none is found the root url of the current directory is used. If no
common repository root url can be found, an error is generated.

* subversion/include/private/svn_opt_private.h
  New file to hold inter-library svn_opt functions.
  (svn_opt__arg_canonicalize_url): New function prototype.
  (svn_opt__arg_canonicalize_path): New function prototype.

* subversion/include/svn_opt.h
  (svn_opt_args_to_target_array3): Change doc string to reflect deprecated

* subversion/libsvn_subr/opt.c
  (svn_opt__arg_canonicalize_url): New function to canonicalize user input
  (svn_opt__arg_canonicalize_path): New function to canonicalize user input
  (svn_opt_args_to_target_array3): Replace the inline canonicalization code
   with calls to the new svn_opt__arg_canonicalize_* functions.

* subversion/include/svn_client.h
  (svn_client_args_to_target_array): New function prototype.

* subversion/libsvn_client/cmdline.c
  New file for client library commandline processing functionality.
   check_root_url_of_target): New functions to support
  (svn_client_args_to_target_array): New client function to parse user
   arguments into a target array. Replaces use of

* subversion/tests/libsvn_client/client-test.c
  (test_args_to_target_array): New test function.
  (test_funcs): Run new test function.

* subversion/tests/cmdline/special_tests.py
  (warn_on_reserved_name): Modify test to work right with

* subversion/tests/cmdline/basic_tests.py
   basic_relative_url_using_current_dir): New test functions.
  (test_list): Run new test functions.

* subversion/svn/cl.h
  (svn_cl__args_to_target_array_print_reserved): Add client context parameter.

* subversion/svn/util.c
  (svn_cl__args_to_target_array_print_reserved): Replace call to
   svn_opt_args_to_target_array3() with svn_client_args_to_target_array().

* subversion/svn/update-cmd.c
  (svn_cl__update): Replace svn_opt_args_to_target_array3() with
   svn_cl__args_to_target_array_print_reserved() for consistency with the other
   command line functions.

* subversion/svn/diff-cmd.c
  (svn_cl__diff): Create a client context variable and use it in the
   svn_cl__args_to_target_array_print_reserved() function along with every
   else it is needed.

* subversion/svn/merge-cmd.c,
  Add client context variable to all the calls to


Beware of spyware. If you can, use the Firefox browser. - USA Today
Download now at http://getfirefox.com
Registered Linux User #354814 ( http://counter.li.org/)

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-03-26 05:21:24 CET

This is an archived mail posted to the Subversion Dev mailing list.