tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: [OT] Difficulty creating working patch - renamed file.
Date Tue, 28 Sep 2010 16:39:20 GMT
2010/9/28 Wesley Acheson <>:
> HI All,
> I'm not actually sure how OT this is or if the question belongs here.
> This is semi duplicating some comments seen in a bug. However I think
> its useful for anyone trying to create future patches who is
> inexperienced like me, so I'm sort of double posting.
> I'm trying to create a patch. However part of that patch is renaming a
> file then modifying its contents. However when a .patch is created in
> eclipse it appears to record the delete then record the changes to the
> new filename. However as It hasn't got the new filename in SVN when
> that patch is applied it breaks.
> I've no idea how to record this properly as It appears that the
> patches are always made against SVN directly. So I can't provide a
> patch to rename the file then another patch to modify its contents.
> Finally the question. How to create a patch that involves moving or
> renaming a file and changing its contents.

1) It is not possible to represent svn move operation in an unified
diff format. Adds are represented (as a new file with content vs. old
file of zero length), but there is no information about where the file
was copied from.

2) Patches are applied by an external program. Implementations do differ.

As someone noticed, there is an ambiguity, whether the file was
deleted or whether its content was removed (setting its length to 0).

Also patch carries no explicit information about creating intermediate
directories if those are needed.

3) In complex cases I used to provide/propose not only a patch file,
but also a series of commands that are to be executed before applying

The Subversion 1.7 (that is currently being developed) is expected to
solve 1) and 2) by providing enhancements to the diff format generated
by subversion (I am looking forward to "svn diff --git" option) and
new "svn patch" command.

Regarding BZ 50001, note that *.launch files have already been moved
and renamed in the current /trunk.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message