[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Question about creating patch

From: Andrey Repin <anrdaemon_at_freemail.ru>
Date: Sat, 28 Nov 2009 06:46:02 +0300

Greetings, Neo Anderson!

> I participate in a project which uses svn as its repository and I do not
> have previlege to commit source back to the svn. And I encounter a problem.

> Previously I alway use command `svn diff > /tmp/jira_number.patch` to create
> patch. There is no problem if I just modify existing source code. Now due to
> I create several java source files which previously did not exist in the svn
> repository, using `svn diff > /tmp/jira_number.patch` won't create patch
> that contains newly created source files. For instance, in svn there
> contained files

> messaging
> + messagedriven + a.java/ b.java

> Now I add new files

> messaging
> + messagdriven + a.java/ b.java/ c.java
> + d.java
> + e.java

> Files like d.java, e.java and c.java won't be included in the
> jira_number.patch file if executing `svn diff > /tmp/jira_number.patch`. And
> I can't commit source so I can't do e.g. `svn add` to add source back to the
> repository.

> What is the better way (best practice) to create patch so the developers would be easier to apply or test patch?

Make an export of revision you're making patch for.
Make an export of your working copy with patch.
Use normal diff to produce patch.
It can assume non-existing files as ones having zero length.

--
WBR,
 Andrey Repin (anrdaemon_at_freemail.ru) 28.11.2009, <6:44>
Sorry for my terrible english...
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2425021
Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-11-28 04:50:57 CET

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.