Checkout Tools
  • last updated 21 mins ago
Constraints: committers
Constraints: files
Constraints: dates

Changeset 1482962 is being indexed.

Don't create two unneeded ra sessions on every 'svn import' without

--no-ignore. Also avoid a race condition on the HEAD revision by passing

the explicit revision to several ra operations, to make sure they all look

at the same revision.

* subversion/libsvn_client/import.c

(import): Add base_rev argument and pass it for the root open operation.

(svn_client_import5): Obtain the base revision, properties and inherited

properties on the primary ra session instead of via two separate sessions.

Add note that we still open an ra session for the autoprops.

Update calls to deprecated svn_io_stat_dirent.

* subversion/libsvn_fs_fs/fs_fs.c

(hotcopy_io_dir_file_copy): Update deprecated calls.

* src/subversion/libsvn_client/import.c

(import): Update deprecated call.

* src/subversion/libsvn_wc/questions.c

(svn_wc__internal_file_modified_p): Update deprecated call.

* src/subversion/libsvn_wc/status.c

(internal_status): Update deprecated call.

* src/subversion/libsvn_wc/wc_db.c

(remove_node_txn, has_local_mods): Update deprecated calls.

  1. … 4 more files in changeset.
Add support for custom keyword definitions, fixing issue #890.

Custom keywords can be defined using a format string which controls

the way keyword information is expanded. For instance, a keyword set

the command 'svn propset svn:keywords MyKeyword=%a%_%b%_%d myfile'

can be referenced in 'myfile' as $MyKeyword$, and expands to the author,

a space, the file's name ('myfile'), another space, and the short

representation of the date of the last-changed revision.

The following format codes are currently available:

%a - The author.

%b - The basename of the URL.

%d - Short format of the date.

%D - Long format of the date.

%P - The file's path, relative to the repository root URL.

%r - The revision.

%R - The URL to the root of the repository.

%u - The URL of the file.

%_ - A space (keyword definitions cannot contain a literal space).

%% - A literal '%'.

Most of these were already defined internally in libsvn_subr.

This patch adds the %P, %R, and %_ format codes.

More format codes could be added in the future but might require API changes.

Based on a patch submitted several times by various FreeBSD developers

who have added this feature to their port of Subversion.

I'm crediting those who I know were involved in this patch in one way

or another. But I don't know for sure who wrote the initial implementation.

Patch by: Peter Wemm <peter{_AT_}>

David O'Brien <obrien{_AT_}>

Lev A. Serebryakov <lev{_AT_}>

Alfred Perlstein <alfred{_AT_}>


* subversion/include/svn_subst.h

(svn_subst_build_keywords3): Declare.

(svn_subst_build_keywords2): Deprecate.

* subversion/libsvn_client/cat.c

(svn_client__get_normalized_stream): Call svn_subst_build_keywords3().

* subversion/libsvn_client/export.c

(export_node, close_file): Call svn_subst_build_keywords3().

* subversion/libsvn_client/import.c

(send_file_contents): Call svn_subst_build_keywords3().

* subversion/libsvn_subr/subst.c

(keyword_printf): Add support for %P, %R, and %_. Add repos_root_url

parameter which is required to implement these new format codes.

(build_keywords): New helper function which implements the guts of

svn_subst_build_keywords2() and svn_subst_build_keywords3().

(svn_subst_build_keywords2): Reimplement as wrapper around build_keywords().

Turn off support for custom keywords to ensure backwards compatibility.

(svn_subst_build_keywords3): New, implemented as wrapper around the

build_keywords() helper. Enable support for custom keywords.

* subversion/libsvn_wc/translate.c

(svn_wc__expand_keywords): Call svn_subst_build_keywords3().

* subversion/svn/svn.c

(svn_cl__cmd_table): Document the custom keywords feature, including the

support format codes, in the output of 'svn help propset'.

* subversion/tests/libsvn_subr/subst_translate-test.c

(test_svn_subst_build_keywords3): New test.

(test_funcs): Add new test.

  1. … 7 more files in changeset.
Use svn_hash_gets and svn_hash_sets.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/status.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

  1. … 30 more files in changeset.
Use svn_hash_gets/svn_hash_sets, part 1: #include "svn_hash.h" everywhere

that <apr_hash.h> is included. I assume most of those use APR_HASH_KEY_STRING.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/import.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs/fs-loader.c

* subversion/libsvn_fs_base/bdb/changes-table.c

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/conflicts.c

* subversion/mod_dav_svn/deadprops.c

* subversion/mod_dav_svn/merge.c

* subversion/mod_dav_svn/mod_dav_svn.c

* subversion/mod_dav_svn/repos.c

* subversion/svn/props.c

* subversion/tests/libsvn_subr/mergeinfo-test.c

(svn_hash.h): Add #include.

  1. … 22 more files in changeset.
Rev the standard libsvn_client api used for opening ra sessions, to allow

access to the libsvn_wc pristine store in many more cases. This allows serf

to obtain texts from the local working copy in many cases where it first


For just this patch makes libsvn_ra_serf avoid more than 550

http requests.

* subversion/include/private/svn_client_private.h

(svn_client__ra_session_from_path2): Update documentation.

* subversion/include/svn_client.h

(svn_client_open_ra_session2): New function.

(svn_client_open_ra_session): Deprecate function.

* subversion/libsvn_client/add.c

(mkdir_urls): Update caller.

* subversion/libsvn_client/client.h

(svn_client__open_ra_session_internal): Change some arguments. Update

documentation. Add scratch_pool.

* subversion/libsvn_client/commit.c

(check_url_kind): Update caller.

* subversion/libsvn_client/copy.c

(repos_to_repos_copy): Update caller.

(wc_to_repos_copy): Use session pool to avoid opening two sessions at the

same time. Remove unneeded wait for timestamps, as we do a repository only

commit here.

(repos_to_wc_copy): Update caller.

* subversion/libsvn_client/delete.c

(delete_urls_multi_repos): Update caller.

* subversion/libsvn_client/deprecated.c

(svn_client_open_ra_session): New function.

(svn_client_uuid_from_url): Wrap svn_client_get_repos_root, but with a

subpool to avoid keeping ra sessions open in functions without dual pools.

(svn_client_root_url_from_path): Use session pool, as there is no result_pool.

* subversion/libsvn_client/diff.c


diff_repos_repos): Obtain wri_abspath and use it when opening ra



diff_summarize_repos_repos): Update caller.

* subversion/libsvn_client/import.c

(svn_client_import5): Update caller.

* subversion/libsvn_client/iprops.c

(get_inheritable_props): Update caller.

* subversion/libsvn_client/list.c

(svn_client__ra_stat_compatible): Update caller.

* subversion/libsvn_client/locking_commands.c


svn_client_unlock): Update caller.

* subversion/libsvn_client/merge.c

(ensure_ra_session_url): Pass wri_abspath to speed up merging.



do_automatic_merge_locked): Update caller.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo_catalog): Update caller.

* subversion/libsvn_client/prop_commands.c


svn_client_revprop_set2): Update caller.


svn_client_revprop_list): Update caller. Introduce subpool for function

without result_pool argument.

* subversion/libsvn_client/ra.c

(callback_baton_t): Add wcroot_abspath argument to make looking this up

from the ra call a hashtable lookup.

(get_wc_contents): Use wcroot_abspath.

(svn_client__open_ra_session_internal): Separate wri_abspath and base

abspath handling. Use scratch_pool where possible.

(svn_client_open_ra_session): Rename to ...

(svn_client_open_ra_session2): ... this and update caller.

(svn_client__ra_session_from_path2): Update caller.

(svn_client__repos_locations): Update caller.

(svn_client__get_youngest_common_ancestor): Update caller.

* subversion/libsvn_client/status.c


svn_client_status5): Update caller.

* subversion/libsvn_client/update.c

(update_internal): Update caller.

* subversion/libsvn_client/util.c

(svn_client_get_repos_root): Update caller.

  1. … 19 more files in changeset.
* subversion/libsvn_client/import.c

(svn_client_import5): Use the new svn_sort__array_reverse() instead of

doing it the long way. Clean up some use of local variables, moving to

tighter scope etc.

Hide that originally commit and import shared some code by separating these

features to separate files. The current status is that they don't share

any implementation and this separation turns out to be much easier than expected.

* subversion/libsvn_client/commit.c

(includes): Remove unused includes.

(*): Remove functions that are used by import.

* subversion/libsvn_client/import.c

New file, copied from commit.c

(includes): Remove unused includes.

(*): Remove functions that are used by commit.

  1. … 1 more file in changeset.

* import.c: delete this old crufty file.

* commit.c (send_to_repos): duh, don't call the auth storage callback

when finished with an import!

  1. … 1 more file in changeset.
Update copyright from 2000 to 2000-2001. Used gstein's script to make it all happen. Thanks, Greg.

  1. … 157 more files in changeset.
Get a brain:

* include/svn_wc.h (svn_wc_import): Remove declaration.

* libsvn_client/import.c: Removed, code transferred to commit.c.

* libsvn_client/ (libsvn_client_la_SOURCES): Removed


* libsvn_client/commit.c (import): New internal func, was


  1. … 3 more files in changeset.
Protect against importing "SVN/" subdirs.

* libsvn_client/import.c (svn_wc_import, import_dir): Check name

before importing.

* include/svn_wc.h (SVN_WC_ADM_DIR_NAME): New #define.

* libsvn_wc/adm_files.c (SVN_WC__ADM_DIR_DEFAULT): Removed in favor of


(adm_subdir): Adjust for above.

* include/svn_error.h (svn_errno_t): New error


Fix related to the previous commit that moved import.c:

* libsvn_client/import.c: Don't #include "wc.h".

Notes on the first change:

This may or may not resolve Kevin Pilch-Bisson's recent bug report,


PR: 340

and these dev mails





I haven't closed the PR yet, as there may be more to this issue.

  1. … 3 more files in changeset.
Put import.c in libsvn_client instead of libsvn_wc, as suggested by

Greg Stein:

* libsvn_wc/import.c: Moved to ../libsvn_client.

* libsvn_wc/ (libsvn_wc_la_SOURCES): Removed import.c.

* libsvn_client/import.c: New file, copied from ../libsvn_wc.

Repository history not kept, as wasn't much anyway.

* libsvn_client/ (libsvn_client_la_SOURCES): Added


  1. … 3 more files in changeset.