[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] mode-changing patches ∩ binary patches

From: Daniel Shahaf <danielsh_at_apache.org>
Date: Tue, 29 Sep 2015 22:30:19 +0000

Could someone commit this for me, please? It passes tests (as of r1705925).

(I've followed up with infra@ about my account problems, but I don't want this
patch to bitrot while my karma is getting sorted out.)

Thanks!

Daniel

On Mon, Sep 28, 2015 at 06:25:43PM +0000, Daniel Shahaf wrote:
> svn.apache.org doesn't let me commit this, even though it accepts my
> password...
>
> [[[
> patch: Make binary patches and git mode changes coexist.
>
> * subversion/libsvn_diff/parse-diff.c
> (transitions): Add missing transition.
>
> * subversion/tests/cmdline/patch_tests.py
> (patch_binary_file): Tweak the test to trigger the new codepath.
> ]]]
>
> [[[
> Index: subversion/libsvn_diff/parse-diff.c
> ===================================================================
> --- subversion/libsvn_diff/parse-diff.c (revision 1705734)
> +++ subversion/libsvn_diff/parse-diff.c (working copy)
> @@ -2038,6 +2038,7 @@ static struct transition transitions[] =
>
> {"GIT binary patch", state_git_diff_seen, binary_patch_start},
> {"GIT binary patch", state_git_tree_seen, binary_patch_start},
> + {"GIT binary patch", state_git_mode_seen, binary_patch_start},
> };
>
> svn_error_t *
> Index: subversion/tests/cmdline/patch_tests.py
> ===================================================================
> --- subversion/tests/cmdline/patch_tests.py (revision 1705734)
> +++ subversion/tests/cmdline/patch_tests.py (working copy)
> @@ -5659,7 +5659,13 @@ def patch_binary_file(sbox):
> sbox.simple_revert('iota')
>
> tmp = sbox.get_tempname()
> - svntest.main.file_write(tmp, ''.join(diff_output))
> + patch = diff_output[:]
> + patch[3:3] = [
> + "old mode 100644\n",
> + "new mode 100755\n",
> + #"index ...\n",
> + ]
> + svntest.main.file_write(tmp, ''.join(patch))
>
> expected_output = wc.State(wc_dir, {
> 'iota' : Item(status='UU'),
> @@ -5666,7 +5672,8 @@ def patch_binary_file(sbox):
> })
> expected_disk = svntest.main.greek_state.copy()
> expected_disk.tweak('iota',
> - props={'svn:mime-type':'application/binary'},
> + props={'svn:mime-type':'application/binary',
> + 'svn:executable': '*'},
> contents =
> 'This is the file \'iota\'.\n'
> '\0\202\203\204\205\206\207nsomething\nelse\xFF')
> ]]]
Received on 2015-09-30 00:30:26 CEST

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.