Directory becomes file when applying patch
From: Dmitry Pavlenko <pavlenko_at_tmatesoft.com>
Date: Mon, 16 Jul 2018 17:00:01 +0200
Here I provide a reproducing script and also add a file for comparison.
I think the origin of the problem in the fact that SVN patch doesn't keep
a) "Property changes on: dir" and "Property changes on: file" lines;
allowing to distinguish between files and directories.
I don't know whether it's a known issue or not but I think it would be nice to
Property changes on: dir
Property changes on: file
The reproducing script:
#1. Create an empty SVN repository.
svnadmin create "$REPOSITORY_PATH"
# 2. Add a file with properties and a directory with properties to the
$SVN co $REPOSITORY_URL $WC_PATH
$SVN add $WC_PATH/file
$SVN propset propName propValue $WC_PATH/file
# 3. Create diff between repository HEAD and working copy:
$SVN diff --git $REPOSITORY_URL $WC_PATH > $PATCH_FILE
# 4. Cleanup the working copy
$SVN revert $WC_PATH/file
# 5. Apply the patch back:
$SVN patch $PATCH_FILE $WC_PATH
# 6. Make sure that the file is file and that dir is directory
FILE_TYPE=`stat -c "%F" $WC_PATH/file`
if [ "$FILE_TYPE" != "regular empty file" ] ; then
if [ "$DIRECTORY_TYPE" != "directory" ] ; then
-- Dmitry Pavlenko, TMate Software, http://subgit.com/ - git-svn bridgeReceived on 2018-07-16 17:00:30 CEST
This is an archived mail posted to the Subversion Dev mailing list.