- r995215: 2010-09-08 19:29:11 [dannas] Daniel Näslund
-
/subversion/libsvn_client/patch.c [diff, log, file]
* subversion/libsvn_client/patch.c
(apply_one_patch): Remove a question with an associated answer from
the code.
- r995210: 2010-09-08 19:18:29 [dannas] Daniel Näslund
-
/subversion/libsvn_client/patch.c [diff, log, file]
In the patch code, factor out the code dealing with closing streams to
its own function for readability.
* subversion/libsvn_client/patch.c
(close_target_streams): New. Created with code from ...
(apply_one_patch): .. here.
Suggested by: stsp
- r995194: 2010-09-08 18:58:29 [dannas] Daniel Näslund
-
/subversion/libsvn_client/patch.c [diff, log, file]
In the patch code, remove some unnecessary intermediate variables.
* subversion/libsvn_client/patch.c
(apply_one_patch): Use 'prop_patch_target_t' variables directly
instead of introducing intermediate variables to hold some
members.
Suggested by: stsp
- r993504: 2010-09-07 19:49:02 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/patch_tests.py [diff, log, file]
Add patch test for adding empty files.
Such files can only be applied if the diff uses the git extensions to
the unidiff format.
* subversion/tests/cmdline/patch_tests.py
(patch_git_add_file): New.
(test_list): Add patch_git_add_file.
- r992402: 2010-09-03 18:17:12 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/diff_tests.py [diff, log, file]
Make some diff tests not depend on ordering of output.
There is no guarentee that all RA layers will return the
information in the same order.
* subversion/tests/cmdline/diff_tests.py
(diff_git_format_wc_wc,
diff_git_format_url_wc,
diff_git_format_url_url): Don't depend on ordering for output.
- r991508: 2010-09-01 12:11:33 [dannas] Daniel Näslund
-
/subversion/libsvn_client/patch.c [diff, log, file]
Enable empty files to be added with svn patch.
This only works if the diff uses the git extension format. The extra
logic is for allowing us to create added empty files for paths that
has property changes, be the patch in the git format or not. If we only allowed
git diffs to create empty files, the code could be simplified.
* subversion/libsvn_client/patch.c
(init_patch_target): Mark the target as added if the patch has recorded
it as <to be added>.
(apply_one_patch): Don't skip paths that should be added according to the
git diff information.
(install_patched_prop_targets): Check if the path is already added before
trying to add that was not existing when the patching process began.
(apply_patches): Allow added paths to be installed even if they are empty.
- r991459: 2010-09-01 07:44:13 [dannas] Daniel Näslund
-
/subversion/libsvn_diff/parse-diff.c [diff, log, file]
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
Fix the diff parser to look for the correct first line of a git diff.
The change that is beeing applied is s/git --diff/diff --git/.
* subversion/libsvn_diff/parse-diff.c
(parse_next_hunk,
git_start,
svn_diff_parse_next_patch): Check for 'diff --git' as first line of a
git diff header.
* subversion/libsvn_diff/parse-diff-test.c
(git_unidiff,
git_tree_and_text_unidiff,
bad_git_diff_header,
path_with_spaces_unidiff): Use 'diff --git as first line of git
diff headers.
Found by: stsp
- r990830: 2010-08-30 15:50:46 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/diff_tests.py [diff, log, file]
Revert r990772 and r990774. "Adjust diff tests to include copied paths".
It turns out that determing copyfrom information is more involved
than I first anticipated. We first need a proper definition of
what kind of information the server should send.
- r990826: 2010-08-30 15:46:37 [dannas] Daniel Näslund
-
Click to show all 17 changes...
Revert r990790 and r990804. "Make the diff editor able to receive
copyfrom info"
It turns out that determing copyfrom information is more involved
than I first anticipated. We first need a proper definition of
what kind of information the server should send.
- r990804: 2010-08-30 13:48:18 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/diff_tests.py [diff, log, file]
Follow-up to r990790.
Skip a diff test unless we're using ra_neon. For some reason,
ra_local and ra_svn does not call apply_textdelta() for copied
paths with no text changes while ra_neon does.
* subversion/tests/cmdline/diff_tests.py
(test_list): Mark diff_backward_repos_wc_copy() with SkipUnless.
- r990790: 2010-08-30 12:54:46 [dannas] Daniel Näslund
-
Click to show all 17 changes...
Make the diff editor able to receive copyfrom information. Involves
passing down a 'send_copyfrom_args' to all RA implemtations.
The copyfrom information is needed when creating diffs with the git
unidiff extension for copied paths.
Note that this commit merely allows the copyfrom args to be passed to
the client. They copyfrom information is not yet stored and used.
* subversion/libsvn_ra/ra_loader.c
(svn_ra_do_diff4): New.
(svn_ra_do_diff3): Move from here ..
* subversion/libsvn_ra/deprecated.c
(svn_ra_do_diff3): .. To here.
(svn_ra_do_diff2): Call svn_ra_do_diff3() instead of the vtable
callback since the signature has changed.
* subversion/libsvn_ra/wrapper_template.h
(compat_do_diff): Track the new 'send_copyfrom_args' parameter.
* subversion/libsvn_ra/ra_loader.h
(svn_ra__vtable_t): Add 'send_copyfrom_args' parameter.
* subversion/libsvn_ra_local/ra_plugin.c
(svn_ra_local__do_diff): Add 'send_copyfrom_args' parameter.
* subversion/tests/cmdline/diff_tests.py
(test_list): Mark diff_backward_repos_wc_copy() as XFailing.
The tested code currently does not handle copied paths
with no text changes. Will be fixed in a follow-up.
* subversion/libsvn_ra_svn/protocol
(...) Update the diff command description.
* subversion/libsvn_ra_svn/client.c
(ra_svn_diff): Add 'send_copyfrom_args' to the command to be written.
* subversion/include/svn_ra.h
(svn_ra_do_diff4): New.
(svn_ra_do_diff3): Deprecate.
* subversion/libsvn_wc/diff.c
(add_file): Add TODO about recording the copyfrom info and checking
that the copyfrom revision is within the span of the diff operation.
* subversion/libsvn_client/repos_diff.c
(add_file): Add TODO about recording the copyfrom info and checking
that the copyfrom revision is within the span of the diff operation.
* subversion/libsvn_client/diff.c
(diff_repos_repos,
diff_repos_wc,
diff_summarize_repos_repos): Replace svn_ra_do_diff3() with
svn_ra_do_diff4().
* subversion/libsvn_ra_neon/ra_neon.h
(svn_ra_neon__do_diff): Add 'send_copyfrom_args' parameter.
* subversion/libsvn_ra_neon/fetch.c
(svn_ra_neon__do_diff): Add 'send_copyfrom_args' parameter.
* subversion/libsvn_ra_serf/update.c
(svn_ra_serf__do_diff): Add 'send_copyfrom_args' parameter.
* subversion/libsvn_ra_serf/ra_serf.h
(svn_ra_serf__do_diff): Add 'send_copyfrom_args' parameter.
* subversion/svnserve/serve.c
(diff): Parse the parameters for send_copyfrom_param.
- r990774: 2010-08-30 11:32:12 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/diff_tests.py [diff, log, file]
Adjust diff test for URL->URL to include copied paths.
Since the server does not send copyfrom args for diff
operations we do not yet handle copied paths.
* subversion/tests/cmdline/diff_tests.py
(diff_git_format_url_wc): Remove TODO about to test for copied paths.
We do that.
(diff_git_format_url_url): Start testing copied paths.
(test_list): Mark diff_git_format_url_url() as XFailing.
- r990772: 2010-08-30 11:22:47 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/diff_tests.py [diff, log, file]
Adjust diff test for URL->WC to include copied paths.
Since the server does not send copyfrom args for diff
operations we do not yet handle copied paths.
* subversion/tests/cmdline/diff_tests.py
(diff_git_format_url_wc): Add copied paths.
(test_list): Mark diff_git_format_url_wc() as XFailing.
- r985621: 2010-08-15 07:20:21 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/diff_tests.py [diff, log, file]
Make a wc-wc diff test include a copied path.
Currently we don't handle copied paths for wc-wc diffs unless the
--show-copies-as-adds flag is specified. The idea is that copied
paths should always show up in the diff when we use the git diff
format.
* subversion/tests/cmdline/diff_tests.py
(diff_git_format_wc_wc): Add copied path.
(test_list): Mark diff_git_format_wc_wc() as XFailing.
- r982762: 2010-08-05 20:13:39 [dannas] Daniel Näslund
-
/subversion/libsvn_diff/parse-diff.c [diff, log, file]
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
Make the diff parser able to properly handle added and deleted files with
content. Previously, only empty files worked.
Just as for copies and renames we may or may not have '---' and '+++'
lines following the header lines involving tree changes. Handle the
add and delete case in the same way as the copy and move ones.
* subversion/libsvn_diff/parse-diff.c
(git_minus,
git_plus): Store '/dev/null' as filename if given.
(git_new_file,
git_deleted_file): Return a state saying we have seen header lines
that involves tree changes to the target.
(svn_diff_parse_next_patch): Add cases where the input is '/dev/null'
to the lookup-table.
* subversion/tests/libsvn_diff/parse-diff-test.c
(git_tree_and_text_unidiff): Fix typo.
(test_funcs): Remove XFail marker for
test_parse_git_tree_and_text_diff().
- r982726: 2010-08-05 18:33:51 [dannas] Daniel Näslund
-
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
Adjust a C-unit test for parsing git diffs to include added and deleted
paths.
Currently the parser does not handle paths without a leading "a/" or "b/", i.e.
"/dev/null" that is used for added and deleted paths does not work.
* subversion/libsvn_diff/parse-diff-test.c
(git_tree_and_text_unidiff): Add an added and a deleted file to the patch
data.
(test_parse_git_tree_and_text_diff): Add checks for the new files.
(test_funcs): Mark test_parse_git_tree_and_text_diff() as XFailing.
- r982717: 2010-08-05 18:07:26 [dannas] Daniel Näslund
-
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
* subversion/tests/libsvn_diff/parse-diff-tests.c
(git_tree_and_text_unidiff): Add '---' and '+++' lines to the input
patch. For patches with text changes, we should always have those
headers.
- r982706: 2010-08-05 17:44:01 [dannas] Daniel Näslund
-
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
* subversion/tests/libsvn_diff/parse-diff-tests.c
(test_git_diffs_with_spaces_diff): Follow-up to r982582. Remove a
dangling debug statement.
Found by: pburba
- r982582: 2010-08-05 12:41:51 [dannas] Daniel Näslund
-
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
Adjust a C-unit test for parsing git diffs to have " b/" as part of
the paths.
The diff-parser searches for " b/" to find the start of old_path.
* subversion/tests/libsvn_diff/parse-diff-tests.c
(git_diff_with_spaces_diff,
test_git_diffs_with_spaces_diff): See above.
- r982563: 2010-08-05 12:10:52 [dannas] Daniel Näslund
-
/subversion/libsvn_diff/parse-diff.c [diff, log, file]
Follow-up to r982534. Remove obsolute TODO's.
We're not going to do any checks to compare the paths found
on the '--git diff a/old_path b/new_path' line with paths found
in subsequent lines. I haven't come up with a way to handle
paths with spaces in the git diff line unless old_path and
new_path are the same which is only guarenteed for added and
deleted empty paths.
* subversion/libsvn_diff/parse-diff.c
(git_minus,
git_plus,
git_move_from,
git_move_to,
git_copy_from,
git_copy_to,
svn_diff_parse_next_patch): Remove obsolute TODO's.
- r982534: 2010-08-05 10:24:23 [dannas] Daniel Näslund
-
/subversion/libsvn_diff/parse-diff.c [diff, log, file]
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
Make the diff parser able to handle paths with spaces in the
"--git diff a/path b/path" line. At the same time start
recording path information from other header fields.
We only need the filenames from the --git diff line if we're
dealing with added or deleted empty files. In those cases, the
paths should be identical.
The git_start() function probably needs some adjusting but it passes
the tests so I'm committing it. :).
* subversion/libsvn_diff/parse-diff.c
(git_start): First check that we have a header line on the form
"--git diff a/.+ b/.+". Then grab the old and new filename if
they are the same.
(git_minus,
git_plus,
git_move_from,
git_move_to,
git_copy_from,
git_copy_to): Start grabbing filenames.
* subversion/tests/libsvn_diff/parse-diff-test.c
(test_funcs): Remove XFail marker for test_git_diffs_with_spaces_diff.
- r982527: 2010-08-05 09:56:19 [dannas] Daniel Näslund
-
/subversion/libsvn_diff/parse-diff.c [diff, log, file]
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
Adjust the parser to match aginst lines beginning with 'rename {from/to}' instead of
'moved {from,to}'. Using 'moved' was plain wrong and was a mistake caused by
sloppiness.
* subversion/libsvn_diff/parse-diff.c
(svn_diff_parse_next_patch): Adjust the parser.
* subversion/tests/libsvn_diff/parse-diff-test.c
(git_tree_and_text_unidiff): Adjust test data.
- r982295: 2010-08-04 15:19:40 [dannas] Daniel Näslund
-
/subversion/tests/libsvn_diff/parse-diff-test.c [diff, log, file]
Add XFailing test for parsing git diffs with spaces in the paths.
Note that we only need to parse the '--git diff a/path b/path' line
for added and deleted empty files. In all other cases we have other
header lines to obtain the information from.
* subversion/tests/libsvn_diff/parse-diff-test.c
(path_with_spaces_unidiff): New unidiff test data.
(test_git_diffs_with_spaces_diff): New.
(test_funcs): Add test_git_diffs_with_spaces_diff() as XFailing.
- r982259: 2010-08-04 14:11:50 [dannas] Daniel Näslund
-
/subversion/tests/cmdline/diff_tests.py [diff, log, file]
Add XFailing diff test for creating git diffs with added and deleted
empty files. The git diff format only displays '---' and '+++' lines
if we have text changes. Currently it works for added paths but not
deleted ones.
* subversion/tests/cmdline/diff_tests.py
(make_git_diff_header): Add new parameter 'text_changes' defaulting to
True. Only print '---' and '+++' lines if we have text changes.
(diff_git_empty_files): New.
(test_list): Add diff_git_empty_files().
- r981960: 2010-08-03 16:36:43 [dannas] Daniel Näslund
-
/subversion/libsvn_client/patch.c [diff, log, file]
/subversion/tests/cmdline/patch_tests.py [diff, log, file]
Make 'svn patch' always skip targets if the parent dir is scheduled for
deletion.
* subversion/tests/cmdline/patch_tests.py
(patch_add_new_dir): Adjust expected values that were sloppily set.
(test_list): Remove XFail marker for patch_add_new_dir().
* subversion/libsvn_client/patch.c
(create_missing_parents,
install_patched_target): Mark the target to be skipped if a parent dir
is scheduled for deletion.