On 09 Feb 2022, Ruediger Pluem wrote:
When rebuilding my own Subversion build I stumbled across the
following
patch that I add to my build:
Index: subversion/libsvn_client/patch.c
===================================================================
--- subversion/libsvn_client/patch.c (revision 1897905)
+++ subversion/libsvn_client/patch.c (working copy)
@@ -3246,6 +3246,15 @@ install_patched_target(patch_target_t
*target, con
target->content->eol_style ==
svn_subst_eol_style_native);
+ /* Make sure the patched file has the same
permissions the
+ * original file, but only if it does not get
added.
+ */
+ if (!target->added)
+ {
+ SVN_ERR(svn_io_copy_perms(
+ target->local_abspath,
target->patched_path, pool));
+ }
+
SVN_ERR(svn_subst_copy_and_translate4(
target->patched_path,
target->move_target_abspath
It ensures that files that get modified (not added) during svn
patch
keep their permissions. Can this be added to trunk?
I'm curious: what is the case that causes the patched target file
to have different permissions than it had before the patch? (Or
am I misunderstanding what you're saying?)
If you feel like writing a regression test for this case, then I
could probably answer my question by looking at the test's code
(but I realize you might not have time to do that).
Best regards,
-Karl