tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: [OT] Difficulty creating working patch - renamed file.
Date Tue, 28 Sep 2010 16:36:43 GMT

On Sep 28, 2010, at 7:23 AM, Wesley Acheson wrote:

> 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.

From what I hear the best advice is "use git, not svn".  However that's usually difficult
at apache.

It's really unfortunate that svn can't generate usable patches if you've svn mv'ed any files.
 What I try to do in this situation is to supply a script with the svn mv commands along with
the patch from svn diff.  Part of the patch won't apply (the part that empties the moved files)
but the part that shows the modifications of the moved files should.

Supplying an svn script for the file move rather than a patch means that svn history will
be preserved.  A patch just from svn mv won't result in proper svn history (and I think also
won't actually add the content to the files at the new location)

david jencks

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

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

View raw message