subversion

Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1805623 is being indexed.

Add a new --accept recommended option to 'svn'.

--accept recommended works like --accept postpone, except that tree

conflicts for which a recommended resolution option exists are

automatically resolved.

* subversion/svn/cl.h

(SVN_CL__ACCEPT_RECOMMENDED): Declare (as string: "recommended").

* subversion/svn/conflict-callbacks.c

(svn_cl__accept_from_word): Handle SVN_CL__ACCEPT_RECOMMENDED and provide

the shorthand form 'r'.

* subversion/svn/svn.c

(svn_cl__options): Update --accept option help text.

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout:

Update expected help output.

Make svn --non-interactive use recommended tree conflict resolution

options by default. Previously, it would postpone such conflicts.

This mode is not yet exposed as a separate --accept option argument.

Perhaps we will do that later.

* subversion/svn/cl.h

(svn_cl__accept_recommended): Declare.

* subversion/svn/conflict-callbacks.c

(svn_cl__resolve_conflict): Add support for svn_cl__accept_recommended.

* subversion/svn/merge-cmd.c

(conflict_func_merge_cmd): Add svn_cl__accept_recommended to the switch

statement (as an invalid option to use in this context).

* subversion/svn/svn.c

(sub_main): Default to svn_cl__accept_recommended if --non-interactive.

On the 'shelve' branch: Clean up some command-line options and help.

* subversion/svn/svn.c

(...): Use dedicated options for 'delete' and 'keep-shelved' instead

of sharing existing options. Add help text for 'unshelve'.

    • ?
    /branches/shelve/subversion/svn/svn.c
Add a new tree conflict resolver test (currently XFAIL) for the case

where we cherry-pick-merge a file edit after the file has been moved on the

source branch.

* subversion/tests/libsvn_client/conflicts-test.c

(test_cherry_pick_post_move_edit): New test.

* docs/community-guide/releasing.part.html:

(#rolling-releases): Replace wording of milestone with version since JIRA

doesn't quite use the former terminology.

* CHANGES (1.10.0): Add missing entry for #4315.
Following up on r1443815, add issue-reference to #4315.

* subversion/tests/cmdline/patch_tests.py

(patch_lacking_trailing_eol_on_context): Add issue-reference.

* publish/roadmap.html: Move shelve/checkpoint to 1.11?
* docs/community-guide/releasing.part.html: Typo fix

* docs/community-guide/releasing.part.html

(#releasing-press): New section.

Fix a bug similar to issue 4688, "New conflict resolver bug in tracing history".

* subversion/libsvn_client/conflicts.c

(conflict_tree_get_details_incoming_delete): Start scanning the parent's

history from its checked out peg-revision, where it is guaranteed to exist.

The previous code was using new revision recorded in conflict data as peg

revisions for the parent path. But this revision does not necessarily relate

to the conflict victim's parent path, it relates to the update operation

which was attempted on the victim.

Fix issue 4688, "New conflict resolver bug in tracing history".

* subversion/libsvn_client/conflicts.c

(conflict_tree_get_details_local_missing): Start scanning the parent's

history from its checked out peg-revision, where it is guaranteed to exist.

The previous code was using the old/new revisions recorded in conflict

data as peg revisions for the parent path. But these revisions do not

necessarily relate to the conflict victim's parent path, they relate

to the merge operation which was attempted on the victim.

* publish/faq.html

(dumpload): Highlight property names in the 2 dump error messages to

make their difference stand out more. Fix a wording ambiguity.

* site/publish/security/CVE-2017-9800/advisory.txt,

site/publish/security/CVE-2017-9800/advisory.txt.asc:

Update the CVE-2017-9800 advisory.

Fill in the Details section to explain how the attack actually works.

Provide an example config setting which disables svn+ssh URLs and

prevents the attack.

Explain why the -- workaround cannot work with PuTTY.

Move the discussion of "custom tunnels" further down to draw less

attention to it. Most people don't use costom tunnels, and prominent

mention of them will confuse users who are unfamiliar with the svn+ssh

and tunnel mechanisms in the first place.

index.html: Correct the 1.9.7 release date.
news.html: Correct the 1.9.7 release date.
Add stricter key file syntax checks for releases.

* tools/dist/release.py (get_siginfo):

Check the key delimiters for syntax errors.

Follow-up to r1805241:

* style/site.css

(.notice, span.notice): Override .notice's margins on <span/> elements, to

avoid whitespace between the parentheses added in r1805241 and the yellow

box inside them.

* docs/community-guide/releasing.part.html

(#tarball-signing): Document that the 3+3 requirement is to be relaxed. (The

dev@ thread is ongoing.)

Prevent the tree conflict resolver from creating spurious text conflicts

when merging files with non-LF line endings.

(For example, on Windows, assuming no svn:eol-style, this has been causing

unexpected text conflicts due to mismatching EOLs in the majority of

cases.)

The issue is that the conflict resolver has been unconditionally translating

the contents to LF endings, whereas the actual repository-normal form can

be different.

* subversion/include/private/svn_wc_private.h

(svn_wc__translated_stream): Declare new function.

* subversion/libsvn_wc/translate.c

(svn_wc__translated_stream): Implement this new function by calling

its internal counterpart, svn_wc__internal_translated_stream().

* subversion/libsvn_client/conflicts.c

(get_keywords): Remove this helper, as it's no longer required.

(resolve_incoming_move_file_text_merge,

resolve_merge_incoming_added_file_text_update,

resolve_merge_incoming_added_file_replace_and_merge):

Call svn_wc__translated_stream() for the optional detranslation to

the repository-normal form.

* subversion/tests/libsvn_client/conflicts-test.c

(test_merge_incoming_move_file_text_merge_crlf): New test, fails

without the fix.

(test_merge_incoming_move_file_text_merge_native_eol): New test.

(test_funcs): Add new tests.

* subversion/libsvn_delta/text_delta.c

(apply_window): Use the standard error handling pattern with SVN_ERR()

and tighten the scope of the local variable.

Minor code cleanup: use svn checksum routines instead of calling apr_md5

functions in the implementation of svn_txdelta_apply().

* subversion/libsvn_delta/text_delta.c

(struct apply_baton): Make md5_context an svn_checksum_ctx_t.

(apply_window): Replace apr_md5_final() with svn_checksum_final(),

compose and handle potential errors. Replace apr_md5_update() with

svn_checksum_update().

(svn_txdelta_apply): Update context initialization.

release.py: Follow-up to r1800225.

* tools/dist/release.py

(clean_dist): Don't remove 1.8.19 artifacts when 1.9.7 and 1.10.0-alpha3 are

present. Leave a note about an edge case that currently requires manual

intervention once every two years.

Following up on r1803899, properly negotiate the svndiff version when a

client indicates the preference of svndiff2 format, but the compression

is disabled on the server.

In this case, the server configuration should override the client's

preference (and this is how Subversion 1.9 worked), so tweak the

negotiation scheme so that the server would always be use uncompressed

svndiff0 format with "SVNCompressionLevel 0".

* subversion/mod_dav_svn/repos.c

(negotiate_encoding_prefs): Add special handling for compression level 0.

Stream svndiff deltas without creating temporary files during 'svn commit'

over HTTP.

Creating the temporary files has a certain overhead (time to write them

and disk space), but what is more important, it prevents the client and

server from simultaneously processing the data, i.e., checksumming and

compressing it. See the log message to r1803144 for additional details

on this.

Technically, in order to do this, we use the new apply_textdelta_stream()

delta editor callback for the wc commit. In order to do that, we need

to make some of the used streams (mostly, with associated temporary files

on disk) properly support svn_stream_reset().

* subversion/include/private/svn_io_private.h

(svn_stream__from_aprfile): Declare this new function.

* subversion/libsvn_subr/stream.c

(struct baton_apr): Add new 'truncate_on_seek' field.

(make_stream_from_apr_file): Accept a new 'truncate_on_seek' argument,

which we'd need to properly reset streams over temporary files.

(seek_handler_apr): Honor the new 'truncate_on_seek' field.

(svn_stream__from_aprfile): Implement by forwarding the arguments to

make_stream_from_apr_file().

(svn_stream_from_aprfile2, svn_stream_for_stdin2, svn_stream_for_stdout

svn_stream_for_stderr): Update calls to make_stream_from_apr_file(),

don't change the existing behavior.

(svn_stream__create_for_install): Set the temporary file to be truncated

on seeks.

* subversion/libsvn_wc/adm_crawler.c

(seek_handler_copy): New function.

(copying_stream): Implement reset support in this stream.

(open_txdelta_stream_baton_t): New.

(open_txdelta_stream): New, implements svn_txdelta_stream_open_func_t.

Note that this function must be restartable, as it can be called

more than once, for example, if the HTTP server decides to do a

renegotiation, and we would be forced to resend the whole request

body. If this is the case, we reset the streams and continue.

(svn_wc__internal_transmit_text_deltas): Use the new apply_textdelta_stream()

delta editor callback. Calculate the MD5 checksum with the help of

svn_stream_checksummed2() stream. Pass the disowned streams to the open

txdelta callback.

* subversion/libsvn_wc/deprecated.c

(): Include svn_io_private.h.

(svn_wc_transmit_text_deltas2): Set the temporary file to be truncated

on seeks.

Make the core of the wc commit do less by moving the logic responsible

for creating temporary files with the detranslated working file contents

to one of its calling sites.

The mentioned core function is svn_wc__internal_transmit_text_deltas(),

and the ability to create such files is only required for the deprecated

svn_wc_transmit_text_deltas2() and svn_wc_transmit_text_deltas() API

functions. That's where we will move this logic.

The side effect of this change is that it also fixes a minor bug — such

temporary files could be left behind in case of some of the errors.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_transmit_text_deltas): Accept a stream to the temporary

file, instead of an out argument where we'd (previously) put the path

to the temporary file.

* subversion/libsvn_wc/adm_crawler.c

(svn_wc__internal_transmit_text_deltas): Don't create and delete the

temporary file, and only optionally wrap the passed-in stream with

the copying_stream() handler.

* subversion/libsvn_wc/deprecated.c

(svn_wc_transmit_text_deltas2): Create the temporary file in this

deprecated function. Pass the disowned tempstream to the core

implementation, svn_wc_transmit_text_deltas2(). Properly close

the stream and don't leave the temporary file on the disk in case

of all errors.

Stream svndiff deltas without creating temporary files during 'svn import'

over HTTP.

Creating the temporary files has a certain overhead (time to write them

and disk space), but what is more important, it prevents the client and

server from simultaneously processing the data, i.e., checksumming and

compressing it.

This is an alternative solution that involves using resettable streams.

The original and more complex solution was implemented in r1803144, see

its log message for more details on why do we start streaming deltas.

* subversion/libsvn_client/import.c

(open_txdelta_stream_baton_t): New.

(open_txdelta_stream): New, implements svn_txdelta_stream_open_func_t.

Note that this function must be restartable, as it can be called

more than once, for example, if the HTTP server decides to do a

renegotiation, and we would be forced to resend the whole request

body. If this is the case, we reset the stream and continue.

(send_file_contents): Use the new apply_textdelta_stream() delta

editor callback. Calculate the MD5 checksum with the help of

svn_stream_checksummed2() stream instead of using svn_txdelta2()

for this purpose. Pass the disowned stream to the open txdelta

callback, and explicitly close the stream in this function (to

finalize the checksum).

(import_file): Update, according to the changes in send_file_contents().

Revert r1804673, r1804672 and r1803144 which made "svn import" stream

deltas without creating temporary files over HTTP.

There is a better (simpler and less invasive) solution that involves using

resettable streams, instead of implementing an open txdelta callback that

always creates a new stream. That is what I'll try to do.

The shortlog of the reverted changesets is:

r1803144: Stream svndiff deltas without creating temporary files during

'svn import' over HTTP.

r1804672: Fix an oversight in the txdelta_next_window adapter used when

importing files over HTTP.

r1804673: Rewrite the txdelta_next_window() function using a local variable.

Return resettable streams from svn_stream_checksummed2().

This lays the groundwork required to stream commits over HTTP without

creating temporary files. To switch to the new apply_textdelta_stream()

delta editor callback, we need to make the callback that opens a txdelta

stream restartable, and this is where a resettable checksummed stream

would be handy to have.

Please note that currently the ability to reset a stream, and the new

associated svn_stream_supports_reset() API is tied to the existence of

a non-default seek_fn implementation. The implementation is free to

_only_ support seek_fn(NULL) requests. It would probably be slightly

better to have a separate reset_fn callback. However, we already had it

at some point, and then reverted it in r966156, so let's keep everything

without a separate callback and keep using seek_fn(NULL) for now.

* subversion/include/svn_io.h

(svn_stream_checksummed2): Note that now this API returns a

resettable stream.

(svn_stream_supports_reset): Declare this new function.

* subversion/include/svn_checksum.h

(svn_checksum_ctx_reset): Declare this new function.

* subversion/libsvn_subr/checksum.c

(svn_checksum_ctx_reset): Implement this new function. Forward FNV1-a

implementations to ...

* subversion/libsvn_subr/fnv1a.h

(svn_fnv1a_32__context_reset, svn_fnv1a_32x4__context_reset): ...

* subversion/libsvn_subr/fnv1a.c

(svn_fnv1a_32__context_reset, svn_fnv1a_32x4__context_reset): ...these

new helper functions.

* subversion/libsvn_subr/stream.c

(svn_stream_supports_reset): Implement this new function.

(seek_handler_checksum): Implement the seek handler for checksummed

streams, only support reset requests for now.

(svn_stream_checksummed2): Optionally install the new seek handler.

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

(test_checksummed_stream_read,

test_checksummed_stream_reset): New tests.

(test_funcs): Add new tests.

* tools/dev/unix-build/Makefile.svn: Pass --with-utf8proc=internal for >= 1.10