[prev in list] [next in list] [prev in thread] [next in thread] 

List:       subversion-issues
Subject:    [Issue 4525] New - patch fails for externals on add/delete
From:       gkm4d () tigris ! org
Date:       2014-11-04 16:55:43
Message-ID: iz4525 () subversion ! tigris ! org
[Download RAW message or body]

http://subversion.tigris.org/issues/show_bug.cgi?id=4525
                 Issue #|4525
                 Summary|patch fails for externals on add/delete
               Component|subversion
                 Version|---
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|cmdline client
             Assigned to|issues@subversion
             Reported by|gkm4d






------- Additional comments from gkm4d@tigris.org Tue Nov  4 08:55:43 -0800 2014 -------
Discussed at http://svn.haxx.se/users/archive-2014-11/0009.shtml and confirmed
as a bug by Stefan Sperling.


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/
    fileA.txt
    externals/
        test2/
            fileB.txt
 
[gmyers@pc test1]$ svn -v status
                 2        2 gmyers       .
                 2        2 gmyers       externals
X                                        externals/test2
                 2        1 gmyers       fileA.txt
 
Performing status on external item at 'externals/test2':
                 1        1 gmyers      
/home/gmyers/svnadmin_test/demo/test1/externals/test2
                 1        1 gmyers      
/home/gmyers/svnadmin_test/demo/test1/externals/test2/fileB.txt
 
 
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@pc test1]$ cat add.patch
Index: externals/test2/file2.dat
===================================================================
--- externals/test2/file2.dat   (revision 0)
+++ externals/test2/file2.dat   (working copy)
@@ -0,0 +1 @@
+This is file2.
 
[gmyers@pc test1]$ cat delete.patch
Index: externals/test2/fileB.txt
===================================================================
--- externals/test2/fileB.txt   (revision 1)
+++ externals/test2/fileB.txt   (working copy)
@@ -1 +0,0 @@
-This is fileB.txt
 
[gmyers@pc test1]$ cat modify.patch
Index: externals/test2/fileB.txt
===================================================================
--- externals/test2/fileB.txt   (revision 1)
+++ externals/test2/fileB.txt   (working copy)
@@ -1 +1,3 @@
This is fileB.txt
+
+Add some text.
 
 
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@pc test1]$ svn patch add.patch
svn: E155005: No write-lock in
'/home/gmyers/svnadmin_test/demo/test1/externals/test2'
 
The "delete" patch returns E155005 and does nothing:
 
[gmyers@pc test1]$ svn patch delete.patch
svn: E155005: No write-lock in
'/home/gmyers/svnadmin_test/demo/test1/externals/test2'
 
The "modify" patch succeeds as expected:
 
[gmyers@pc test1]$ svn patch modify.patch
U         externals/test2/fileB.txt

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=463&dsMessageId=3090814

To unsubscribe from this discussion, e-mail: [issues-unsubscribe@subversion.tigris.org].
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic