Checkout
 

lundblad in subversion

* notes/merge-tracking.txt:

Unclaim todo items that I will not have time for in the near future

to not block anyone else from taking them.

* subversion/libsvn_client/util.c

(svn_client__path_relative_to_root): Fix error leak.

* notes/merge-tracking.txt (Q&A): Remove out-dated question.

We're not using a revprop for the mergeinfo.

Split a file into two.

Suggested by: sanity

* subversion/libsvn_client/diff.c

(svn_client_diff_summarize_dup): Move to "public APIs' section.

(ENSURE_VALID_REVISION_KINDS, check_scheme_match,

svn_client__dry_run_deletions, dry_run_deleted_p, merge_props_changed,

merge_file_changed, merge_file_added, merge_file_deleted, merge_dir_added,

merge_delete_notify_baton_t, merge_delete_notify_func, merge_dir_deleted,

merge_callbacks, get_wc_merge_info, get_wc_and_repos_merge_info,

calculate_merge_ranges, notification_receiver_baton_t, notification_receiver,

default_conflict_resolver, determine_merges_performed,

update_wc_merge_info, merge_type, grok_range_info_from_opt_revisions,

do_merge, single_file_merge_get_file, do_single_file_merge,

discover_and_merge_children, svn_client_merge3, svn_client_merge2,

svn_client_merge, svn_client_merge_peg3, svn_client_merge_peg2,

svn_client_merge_peg): Move to...

* subversion/libsvn_client/merge.c: ... this new file.

    • ?
    /trunk/subversion/libsvn_client/merge.c
When configuring, make --enable-debug disable compiler optimization and make

--enable-maintainer-mode imply --enable-debug.

* configure.in:

Move check for --enable-maintainer-mode above conditional on

$enable_debugging and move addition of SVN_DEBUG and AP_DEBUG

to that conditional.

On the merge-tracking branch: Add a docstring.

* subversion/libsvn_client/diff.c

(display_mergeinfo_diff): Add docstring.

On the merge-tracking branch.

* TODO: Take an item.

Fix issue #1976: Set arbitrary revision properties (revprops) during

commit.

Patch by: Gerco Ballintijn <gerco@ballintijn.com>

(heavily tweaked by me)

Review by: malcolm

glasser

This patch adds a "--with-revprop" option to the various URL-based

modification operations (e.g., commit, mkdir, delete, etc.). This option

can be used multiple times to set multiple revision properties. The

argument of the --with-revprop option is of the form "name=value".

* subversion/include/svn_client.h

(svn_client_ctx_t): Added the revprop_table field.

* subversion/include/svn_props.h (svn_prop_has_svn_props): New function.

* subversion/include/svn_ra.h

(svn_ra_get_commit_editor3): New prototype.

(svn_ra_get_commit_editor2): Deprecate.

* subversion/include/svn_ra_svn.h

(SVN_RA_SVN_CAP_COMMIT_REVPROPS): New macro.

(svn_ra_svn_write_proplist,

svn_ra_svn_parse_proplist): Existing functions, moved and made public.

* subversion/include/svn_repos.h

(svn_repos_fs_begin_txn_for_commit2): New prototype.

(svn_repos_fs_begin_txn_for_commit): Deprecate.

(svn_repos_get_commit_editor5): New prototype.

(svn_repos_get_commit_editor4): Deprecate.

* subversion/libsvn_repos/repos.h

(svn_repos__change_txn_props): New function.

* subversion/libsvn_repos/commit.c

(edit_baton): Replace log_msg with revprop_table.

(open_root): Set all revprops on the transaction.

(revprop_table_dup): New function.

(svn_repos_get_commit_editor5): New. Pass on a copy of revprop_table in

edit_baton.

(svn_repos_get_commit_editor4): Add backward-compatability wrapper.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos__change_txn_props): New function.

(svn_repos_fs_begin_txn_for_commit2): Set the revision properties in

the new transaction.

(svn_repos_fs_begin_txn_for_commit): Add backward-compatability wrapper.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__vtable_t): Replaced log_msg parameter with revprop_table in

the get_commit_editor field.

* subversion/libsvn_ra/wrapper_template.h

(compat_get_commit_editor): Pass log message in a hash table.

* subversion/libsvn_ra/ra_loader.c

(svn_ra_get_commit_editor3): Take revprop_table parameter.

(svn_ra_get_commit_editor2): Add backward-compatability wrapper.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_commit_editor): Adjust prototype and pass revprops

table on.

* subversion/libsvn_ra_svn/protocol

(2.1.): Add commit-revprops server capability.

(3.1.1.): Adde revprops parameter.

* subversion/libsvn_ra_svn/client.c

(parse_proplist): Moved to marshal.c and made public.

(ra_svn_commit): Send the revprop_table to the server, erroring out if

caller tries to set arbitrary props, but server doesn't support it.

(ra_svn_rev_proplist, ra_svn_get_file, ra_svn_get_dir,

ra_svn_get_file_revs): Use public version of parse_proplist.

* subversion/libsvn_ra_svn/marshal.c

(svn_ra_svn_write_proplist): Extract from svnserve/serve.c and

made public.

(svn_ra_svn_parse_proplist): Extract from client.c and made public.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__get_commit_editor): Adjust prototype.

* subversion/libsvn_ra_dav/commit.c

(apply_log_message): Rename ...

(apply_revprops): ... to this, and add revprop_table marshalling.

(svn_ra_dav__get_commit_editor): Call apply_revprops.

* subversion/libsvn_client/client.h (svn_client__get_revprop_table),

* subversion/libsvn_client/commit_util.c (svn_client__get_revprop_table):

New function.

* subversion/libsvn_client/add.c (mkdir_urls),

* subversion/libsvn_client/commit.c (get_ra_editor),

* subversion/libsvn_client/copy.c (repos_to_repos_copy, wc_to_repos_copy),

* subversion/libsvn_client/delete.c (delete_urls),

* subversion/libsvn_client/prop_commands.c (propset_on_url):

Pass revprop_table as parameter when creating commit editor.

* subversion/libsvn_subr/properties.c

(svn_prop_has_svn_props): New function.

* subversion/svn/cl.h

(svn_cl__longopt_t): Add svn_cl__with_revprop_opt enum value.

(svn_cl__opt_state_t): Add revprop_table field.

* subversion/svn/main.c

(svn_cl__options): Add --with-revprop option.

(SVN_CL__LOG_MSG_OPTIONS): Add --with-revprop to other commit

related options.

(parse_revprop): New function.

(main): Handle --with-revprop option.

* subversion/svn/commit-cmd.c (svn_cl__commit),

* subversion/svn/import-cmd.c (svn_cl__import):

Pass on the revprop_table field.

* subversion/svn/copy-cmd.c (svn_cl__copy),

* subversion/svn/delete-cmd.c (svn_cl__delete),

* subversion/svn/mkdir-cmd.c (svn_cl__mkdir),

* subversion/svn/move-cmd.c (svn_cl__move),

* subversion/svn/propedit-cmd.c (svn_cl__propedit):

Check whether the revprop_table field is set only when actually

commiting, and pass on the revprop_table field.

* subversion/svnserve/serve.c

(serve): Send commit-revprops capability in the greeting.

(write_proplist): Move to libsvn_ra_svn/marshal.c and make public.

(rev_proplist, get_file, get_dir, file_rev_handler): Use public version

of write_proplist.

(commit): Call unmarshalling code when needed, and pass on the

revprop_table.

* subversion/tests/cmdline/commit_tests.py

(mkdir_with_revprop, delete_with_revprop, commit_with_revprop,

import_with_revprop, copy_R2R_with_revprop, copy_WC2R_with_revprop,

move_R2R_with_revprop, propedit_with_revprop,

set_multiple_props_with_revprop, use_empty_value_in_revprop_pair,

set_invalid_revprops): New test functions.

(test_list): Run 'm all.

* subversion/tests/cmdline/svneditor.py

(append_foo): New function.

* subversion/tests/cmdline/svntest/actions.py

(UnorderedOutput): New class.

(run_and_verify_svn): Deal with unordered output.

(display_lines): Print unordered output.

(compare_unordered_and_display_lines): Added call to

main.compare_unordered_output to do actual unordered comparison.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__get_commit_editor): Adjust prototype.

* subversion/libsvn_ra_serf/commit.c

(commit_context_t): Replace log_msg field with revprop_table.

(open_root): Pass all revprops to the server.

(svn_ra_serf__get_commit_editor): Take revprop_table instead of log message.

  1. … 25 more files in changeset.
On the sparse-directories branch: make the depth

parameter to the set-path and link-path ra_svn protocol commands non-optional.

NOTE: In a sense, this parameter is still "optional" because the parameter

list may end before it. However, if a client wants to put parameters after

depth (which might be added in the future), they have to specify a depth.

* subversion/libsvn_ra_svn/protocol (3.1.3): Make depth non-optional

for the commands that take a depth.

* subversion/libsvn_ra_svn/client.c

(ra_svn_set_path): Remove parens around depth parameter. (And don't

flush stdout, BTW;)

(ra_svn_link_path): Remove parens around depth parameter.

* svnserve/serve.c (set_path, link_path): Make depth non-optional.

On the sparse-directories branch: TODO changes.

* README.branch:

Document that we're not changing recurse to depth for certain report-related

calls.

On the sparse-directories branch: documentation fix.

* subversion/libsvn_wc/README:

Update the documentation of the depth entry field to use words instead

of numbers.

    • ?
    /branches/sparse-directories/subversion/libsvn_wc/README
On the sparse-directories branch: Minor stylistic fixes.

* subversion/libsvn_ra_dav/fetch.c (make_reporter):

* subversion/libsvn_repos/reporter.c (delta_dirs):

Fix indentation.

* subversion/svnserve/serve.c

(MAYBE_UNFOLD_TO_DEPTH): Fix wording in docstring.

On the sparse-directories branch: minor doco and formatting fixes.

* subversion/include/svn_repos.h

(svn_repos_begin_report2): Add a @since line.

* subversion/include/svn_ra.h

(svn_ra_do_update2): Fix docstring markup.

* subversion/libsvn_wc/adm_ops.c

(tweak_entries): Fix indentation.

* subversion/libsvn_wc/adm_ops.h

(svn_wc__do_update_cleanup): Remove duplicate word in docstring.

    • ?
    /branches/sparse-directories/subversion/include/svn_ra.h
* /branches/sparse-directories:

Add a few files that have been added on trunk, but, for some reason,

were not added to this branch when merging.

This, among other things, makes the branch buildable.

    • ?
    /branches/sparse-directories/www/dst-2007.html
    • ?
    /branches/sparse-directories/tools/dist/getsigs.pl
Avoid a case of potential working copy corruption when an update/switch

adds a file that was already scheduled for addition.

NOTE: This is a marginal backwards incompatible format change to the

working copy because of the addition of the force attribute to the

modify-entry log command.

If a new client uses this attribute (for example in the case mentioned

above), something fails and an old client is used for the cleanup, then

this flag will be ignored by the old client. This will not result

in a corrupt working copy, but will leave the added file in the schedule add

state. I consider this marginal case not worth a format upgrade by itself.

* subversion/libsvn_wc/update_editor.c

(merge_file): For an added file that was scheduled for addition, tweak

the schedule field of the file's entry loggily. In the same case

don't install an empty "fake" text base for merging, but instead

create a temporary empty file as the left side of the merge.

* subversion/libsvn_wc/log.c

(SVN_WC__LOG_ATTR_FORCE): New macro.

(log_do_modify_entry): Take the force flag in the log entry into account

when modifying the entry.

(svn_wc__loggy_entry_modify): Set force attribute in the log

entry if the corresponding modify flag is set.

For checkout/update/switch, don't bother opening a text base known not

to exist.

* subversion/libsvn_wc/update_editor.c

(apply_textdelta): Only open text base if the file wansn't added during

this editor run, and in that case always require the text-base to

exist.

For checkout/update --force, when encountering an obstruction, i.e. a

file that exists on disk but is not scheduled for addition, don't set

the entry's text-time at all if the obstructing file is modified compared

to the text-base being installed. It makes no sense to set this field

unless it reflects the file's timestamp on-disk.

* subversion/libsvn_wc/update_editor.c

(change_file_prop): Don't store the last changed date only because

the file is an obstruction.

(merge_file): Don't set the entry's text-time for an obstruction, but instead

leave it blank.

Remove unneeded parameter from internal function.

* subversion/libsvn_wc/wc.h,

* subversion/libsvn_wc/questions.c

(svn_wc__text_modified_internal_p): Remove use_tmp_textbase parameter,

which was false in all callers. All callers updated.

Clean up a frustratingly unmaintainable part of the working copy library.

This should have no vissible effect except for cleaning up some rather

insignificatn buglets.

There are two ### comments introduced in this commit, which I'm going to

address either by fixing them or on the dev@ list.

* subversion/libsvn_wc/update_editor.c

(struct file_baton): Add text_base_path and new_text_base_path fields.

As a little compensation, remove the text_changed and prop_changed fields.

(window_handler): Don't explicitly compare error values against SVN_NO_ERROR.

Use hb->pool for temporary stuff instead of the filebaton's pool.

Remove the correct temporary text base (by using the field from the file

babon) and do that using a function that expects an UTF8-encoded path name.

Don't set the text_changed field in the file baton.

(apply_textdelta): Avoid some redundant initializations. Set up

the text_base_path and new_text_base_path fields of the file baton.

Minor comment fixes.

On *error* when opening text bases, don't bother closing them!

(change_file_prop): Don't set the prop_change flag in the file baton.

(merge_file): Replace most of the parameters with a file baton.

Remove a whole lot of detail from the docstring.

Restructure this function to (hopefully) make it easier to follow what

is actually happening and why. Avoid some duplicate calculations

of paths. Extend some comments.

(close_file): Adjust the call to merge_file.

* STATUS: Nominate r23468 et al.

Merge r21453 and r23468 to the 1.4.x-r23468 branch.

* /branches/1.4.x-r23468: Create backport branch.

Fix regression introduced in r21720: update of a replaced file *without*

history uses the revert-base. Only replaced files *with* history have a

revert-base.

* subversion/libsvn_wc/update_editor.c

(apply_textdelta, merge_file): Only use revert-base for

replaced-with-history files.

* subversion/tests/cmdline/update_tests.py

(update_wc_with_replaced_file): Extend with a test with a file replaced

without history.

Get rid of an API, introduced after 1.4, that's not needed externally

and exposes implementation details of the WC library.

* subversion/include/svn_wc.h

(svn_wc_text_modified_p): Restore old docstring.

(svn_wc_text_modified_p2): Remove.

* subversion/libsvn_wc/props.c

(svn_wc_prop_set2): Fix reference to svn_wc_text_modified_p in comment.

* subversion/libsvn_client/diff.c (merge_file_changed):

* subversion/libsvn_client/commit_util.c (harvest_committables):

* subversion/libsvn_wc/log.c (svn_wc_cleanup2):

* subversion/libsvn_wc/adm_ops.c (svn_wc_remove_from_revision_control):

* subversion/libsvn_wc/status.c (assemble_status):

* subversion/libsvn_wc/diff.c (file_diff, close_file):

Use svn_wc_text_modified_p.

* subversion/libsvn_wc/update_editor.c

(merge_file): Use svn_wc__text_modified_internal_p.

* subversion/libsvn_wc/questions.c

(svn_wc_text_modified_p2): Rename to svn_wc_text_modified_p and remove

the use_tmp_base parameter.

(svn_wc_text_modified_p): Remove compatibility wrapper.

Fix a bug where reverting a path replaced with history leaves copyfrom info

behind.

* subversion/libsvn_wc/adm_ops.c

(revert_admin_things): In addition to clearing the copied flag, also

clear the copyfrom-url and copyfrom-rev fields.

* subversion/tests/cmdline/revert_tests.py

(revert_file_merge_replace_with_history): Check that the copy from info is

no longer present after reverting the replaced file.

Fix a misleading error message.

* subversion/libsvn_subr/io.c

(svn_io_read_link): Fix error message to indicate what we actually tried to

do. Trivial comment fix.

A follow-up to r23346.

Found by: malcolm

* libsvn_wc/props.c

(svn_wc__install_props): Invert the last condition when deciding

if we shall delete the propbase file, so that we delete the file if

we *had* any properties before, not the opposite.

* svn/trunk2/www/merge-tracking/func-spec.html

(conflict-resolution): Soften the requirement for interactive

conflict resultion in the command line client.

Review by: dlr

Make 'svn cleanup' not fail on a missing .svn/tmp directory. It is

removed and rebuilt anyway so failing if it does not exist is

counterproductive.

Patch by: Henner Zeller <h.zeller@acm.org>

* subversion/include/svn_io.h

(svn_io_remove_dir2): New function. Add ignore_enoent flag.

(svn_io_remove_dir): Deprecate. All callers updated to use

svn_io_remove_dir2.

* subversion/libsvn_subr/io.c

(svn_io_remove_dir2): Copy from svn_io_remove_dir, adding ignore_enoent

parameter.

(svn_io_remove_dir): Wrap svn_io_remove_dir2.

* subversion/libsvn_wc/adm_files.c (svn_wc__adm_cleanup_tmp_area): Don't

fail if the tmp directory doesn't exist.

* subversion/tests/cmdline/basic_tests.py

(basic_cleanup): Add regression: missing tmp-dir in cleanup.

* subversion/tests/cmdline/svntest/actions.py

(remove_admin_tmp_dir): New function.

Avoid renaming a file twice when installing working files.

Especially on remote filesystems, rename can be a very expensive operation.

Suggested by: Henner Zeller <h.zeller@acm.org>

me

* subversion/libsvn_wc/log.c

(file_xfer_under_path): When translating a file to expanded form, don't

go via a temporary file, since svn_subst_copy_and_translate3 already

guarantees atomicity.