[Webkit-unassigned] [Bug 29059] New: svn-apply doesn't handle changes to files copied to new directories properly
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 8 17:45:50 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=29059
Summary: svn-apply doesn't handle changes to files copied to
new directories properly
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
OS/Version: Mac OS X 10.5
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: cam at mcc.id.au
The output of svn-create-patch trips up svn-apply when a file has been copied
to a newly added directory and changes have been made to the copy. Compare
these two diffs:
$ cd WebKitTools
$ svn cp Makefile Scripts # Copy file into an existing directory.
A Scripts/Makefile
$ echo >>Makefile # Make a change to the copy.
$ svn-create-patch | egrep '^(--|\+\+)'
--- Scripts/Makefile (revision 48142) (from Makefile:48142)
+++ Scripts/Makefile (working copy)
--- Scripts/Makefile (revision 48142)
+++ Scripts/Makefile (working copy)
and:
$ cd WebKitTools
$ mkdir NewDirectory
$ svn add NewDirectory
A NewDirectory
$ svn cp Makefile NewDirectory # Copy file into a new directory.
A NewDirectory/Makefile
$ echo >>Makefile # Make a change to the copy.
$ svn-create-patch | egrep '^(--|\+\+)'
--- NewDirectory/Makefile (revision 48142) (from Makefile:48142)
+++ NewDirectory/Makefile (working copy)
--- NewDirectory/Makefile (revision 0)
+++ NewDirectory/Makefile (working copy)
So when the diff of the copied file in the new directory is created it says
"revision 0", making svn-apply think that it is a new file, whereas it has
already copied it in the first part of the patch. svn-apply moves the copied
file out of the way to Makefile.orig and then fails when attempting to apply
the second part of the patch (since NewDirectory/Makefile doesn't exist now).
I guess that the "revision 0" output comes from "svn diff" itself; you can see
that "svn info" gives different revision info for the two copies:
$ svn info Scripts/Makefile | grep ^Revision
Revision: 48142
$ svn info NewDirectory/Makefile | grep ^Revision
Revision: 0
So one way to fix this would be to change svn-apply to recognise this case and
not treat the second part of the patch there as a new file.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list