Hi,
When applying a patch in dry-run mode, svn can return an error even if
the patching would work just fine. The returned error is then:
The Node ..../newDirectory was not found
If you want to reproduce this, here's the mailing list thread on the
TSVN mailing list:
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2899409
(steps to reproduce at the bottom, with the patch files attached to that
thread).
Attached here is my patch which would fix this issue: when running in
dry_run mode, the function delete_empty_dirs() isn't executed.
I'm not completely sure but I think that function is only necessary when
the patch is actually applied.
Could someone please review my patch? I'm sure you guys can see
immediately whether this is save or not. If it's ok, then I'll commit it
later.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
[[[
* subversion/libsvn_client/patch.c
(apply_patches): don't try to delete empty dirs for dry-runs.
]]]
Index: subversion/libsvn_client/patch.c
===================================================================
--- subversion/libsvn_client/patch.c (Revision 1230694)
+++ subversion/libsvn_client/patch.c (Arbeitskopie)
@@ -2920,8 +2920,9 @@
}
while (patch);
- /* Delete directories which are empty after patching, if any. */
- SVN_ERR(delete_empty_dirs(targets_info, ctx, dry_run, scratch_pool));
+ if (!dry_run)
+ /* Delete directories which are empty after patching, if any. */
+ SVN_ERR(delete_empty_dirs(targets_info, ctx, dry_run, scratch_pool));
SVN_ERR(svn_diff_close_patch_file(patch_file, iterpool));
svn_pool_destroy(iterpool);