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

Re: Processing a patch-file

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Tue, 9 Dec 2008 06:10:01 -0600

On Dec 9, 2008, at 05:51, Bernd Büttner wrote:

> Ryan Schmidt schrieb:
>> On Dec 8, 2008, at 03:51, Bernd Büttner wrote:
>>> I have a large (over 100000 files) repository under svn 1.4.2.
>>> Now I got a unified patch-file with a lot of changes to it.
>>> The changes include deletion and adding of files.
>>> How can I process these patches?
>>> Applying the patch to a working copy and committing doesn't do
>>> the job
>>> because deleting and adding files makes it inconsitent.
>> You will need to manually issue the "svn rm" and "svn add"
>> commands after applying the patch.
>
> This effects hundreds or may be thousands of files!

That's quite a patch!

I imagine you will be applying that patch to a working copy with no
other changes. In that case, any files that then are unversioned
after you apply the patch need to be added. You can use "svn st",
find all lines beginning with "?", and add them. That much can be
automated.

Identifying files that should be deleted is harder because doesn't
the diff just express that every line should be deleted? I don't
think the patch command translates that to deleting the file. Or if
it does, then you can use the above trick again, looking for status
lines beginning with "!" and then using "svn rm" to tell Subversion
they should be gone.

> I think updating a repository with an unified patch-file could be a
> nice feature in a new release.

There are open issues for this:

http://subversion.tigris.org/issues/show_bug.cgi?id=1056

http://subversion.tigris.org/issues/show_bug.cgi?id=511

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2008-12-09 13:10: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.