Why does svn patch fail for externals on add/delete?
From: Griffin Myers <griffin.myers_at_baesystems.com>
Date: Tue, 4 Nov 2014 13:56:49 +0000
Please Cc responses as I am not subscribed to the list.
I'm primarily a Tortoise user under Windows, but have recently needed to start using the command line client more frequently. Our development environment heavily leverages externals and developers often distribute patches as a means for code review. With the command line client I've discovered that "svn patch" fails with an E155005: No write-lock error when applying a patch which adds or deletes files which span externals. I've observed this with both 1.7.7 and 1.8.10. I've had no problems when applying such patches with the Tortoise patch mechanism. A trivial example for clarity:
Assume the following wc structure:
test1/
[gmyers_at_pc test1]$ svn -v status
Performing status on external item at 'externals/test2':
Now assume I have three patch files which perform the following operations: 1) Add a file file2.dat to externals/test2/, 2)Delete externals/test2/fileB.txt, 3) Modify externals/test2/fileB.txt. The patches were all generated by performing the desired task and dumping the result from svn diff.
[gmyers_at_pc test1]$ cat add.patch
[gmyers_at_pc test1]$ cat delete.patch
[gmyers_at_pc test1]$ cat modify.patch
Now I'll attempt to apply the patches. The "add" patch returns E155005 and although it creates the new file2.dat file it fails to add it to svn:
[gmyers_at_pc test1]$ svn patch add.patch
The "delete" patch returns E155005 and does nothing:
[gmyers_at_pc test1]$ svn patch delete.patch
The "modify" patch succeeds as expected:
[gmyers_at_pc test1]$ svn patch modify.patch
I'm wondering if this is a bug or the intended behavior? If it is intended then what is the reasoning behind the apparent need for a lock only for adds/deletes to externals but not for modify operations? Is there any sort of recommended workaround for this issue?
Thanks,
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.