You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bernd Büttner <b....@mkc-gmbh.de> on 2008/12/08 09:51:16 UTC
Processing a patch-file
Hi,
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.
Can someone help me?
Bernd
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981530
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Processing a patch-file
Posted by Mark Eichin <ei...@gmail.com>.
> 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.
patch option " -E --remove-empty-files Remove output files that are
empty after patching" would take care of the deletion in that case,
but you'd still have to use svn status to figure out what svn removes
you need.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981932
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982469
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Processing a patch-file
Posted by Mark Eichin <ei...@gmail.com>.
> 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.
patch option " -E --remove-empty-files Remove output files that are
empty after patching" would take care of the deletion in that case,
but you'd still have to use svn status to figure out what svn removes
you need.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981932
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Processing a patch-file
Posted by Ryan Schmidt <su...@ryandesign.com>.
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@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982429
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Processing a patch-file
Posted by Ryan Schmidt <su...@ryandesign.com>.
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@subversion.tigris.org].
Re: Processing a patch-file
Posted by Bernd Büttner <b....@mkc-gmbh.de>.
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!
I think updating a repository with an unified patch-file could be a nice feature in a new release.
Bernd
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981615
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Processing a patch-file
Posted by Bernd Büttner <b....@mkc-gmbh.de>.
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!
I think updating a repository with an unified patch-file could be a nice feature in a new release.
Bernd
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981615
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982417
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Processing a patch-file
Posted by Ryan Schmidt <su...@ryandesign.com>.
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.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981604
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=982418
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Processing a patch-file
Posted by Ryan Schmidt <su...@ryandesign.com>.
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.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=981604
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].