Re: Problems in svn patch when adding a file and the parent dir is scheduled for deletion
On Mon, Jul 26, 2010 at 01:04:26PM +0200, Daniel Näslund wrote:
> Posting this one here so I don't forget about it.
> The patch code should not change the wc when run with the --dry-run
> option but it will if we're adding a file with a parent scheduled for
> The patch code will add a file with a parent scheduled for deletion to
> the filesystem but not fail when trying to add it to version control. It
> would be better if the parent_dir and path would not be created or
> atleast that 'svn patch new.diff' and 'svn patch new.diff --dry-run'
> caused the same output.
> Run these commands on a greek-tree wc:
> echo "This is the file 'new'." >> A/C/new
> $SVN add A/C/new
> $SVN di > new.diff
> $SVN revert A/C/new
> rm A/C/new
> $SVN rm A/C
> LC_ALL=C $SVN patch new.diff
> # Here we get a message about 'Can't add 'new' to a parent dir scheduled for deletion.
> # But 'svn patch' still creates A/C/new.
> # If I had used 'svn patch new.diff --dry-run' I would have gotten:
> # 'A A/C/new' and the missing parent would have been deleted.
Err, should be '... and the missing parent would have been created.'
> rm -r A/C
> #LC_ALL=C gdb $SVN patch new.diff
> # Here we get a message about 'Can't create temporary file from template A/C/svn-XXXX'
> # The patch code copies the tmp file to the parent dir of the target file before renaming it.
> # Another error message would probably be a good idea.
Received on 2010-07-26 13:09:53 CEST
This is an archived mail posted to the Subversion Dev