[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
benefit.

[[[
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
   status.

* subversion/libsvn_subr/opt.c
  (svn_opt__arg_canonicalize_url): New function to canonicalize user input
   urls.
  (svn_opt__arg_canonicalize_path): New function to canonicalize user input
   paths.
  (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.
  (arg_is_repos_relative_url,
   resolve_repos_relative_url,
   check_root_url_of_target): New functions to support
   svn_client_args_to_target_array.
  (svn_client_args_to_target_array): New client function to parse user
   arguments into a target array. Replaces use of
   svn_opt_args_to_target_array3()

* 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
   svn_client_args_to_target_array.

* subversion/tests/cmdline/basic_tests.py
  (basic_relative_url_multi_repo,
   basic_relative_url_using_other_targets,
   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,
  subversion/svn/propdel-cmd.c,
  subversion/svn/checkout-cmd.c,
  subversion/svn/move-cmd.c,
  subversion/svn/mkdir-cmd.c,
  subversion/svn/cat-cmd.c,
  subversion/svn/revert-cmd.c,
  subversion/svn/copy-cmd.c,
  subversion/svn/mergeinfo-cmd.c,
  subversion/svn/list-cmd.c,
  subversion/svn/blame-cmd.c,
  subversion/svn/propget-cmd.c,
  subversion/svn/changelist-cmd.c,
  subversion/svn/log-cmd.c,
  subversion/svn/resolved-cmd.c,
  subversion/svn/cleanup-cmd.c,
  subversion/svn/commit-cmd.c,
  subversion/svn/add-cmd.c,
  subversion/svn/propset-cmd.c,
  subversion/svn/switch-cmd.c,
  subversion/svn/delete-cmd.c,
  subversion/svn/import-cmd.c,
  subversion/svn/proplist-cmd.c,
  subversion/svn/export-cmd.c,
  subversion/svn/status-cmd.c,
  subversion/svn/propedit-cmd.c,
  subversion/svn/lock-cmd.c,
  subversion/svn/info-cmd.c,
  subversion/svn/unlock-cmd.c
  Add client context variable to all the calls to
  svn_cl__args_to_target_array_print_reserved().
]]]

Troy

-- 
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.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.