You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Wagner <ca...@gmail.com> on 2009/03/06 00:30:19 UTC

Converting a revision to a patch

I've got a Subversion repository containing a set of changes I'm
interested in (specifically, revision 189) and a version of the source
code that isn't managed by Subversion.  How would I go about
converting r189 into a patch to apply to the non-managed code, or is
there a better way to do this?

Thanks,
Mark Wagner

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: Converting a revision to a patch

Posted by "Todd C. Gleason" <tg...@impac.com>.
> -----Original Message-----
> From: Mark Wagner [mailto:carnildo@gmail.com]
> Sent: Monday, March 09, 2009 2:02 PM
> To: Holger Stratmann
> Cc: users@subversion.tigris.org
> Subject: Re: Converting a revision to a patch
> 
> On Sun, Mar 8, 2009 at 16:09, Holger Stratmann <ti...@finch.de>
wrote:
> > No seriously: It's never too late to put source code under version
> control,
> > is it?
> > What are you doing with the unmanaged copy and why do you need to
apply
> > patches to it? Will you need any more patches in the future?
> 
> We started revision control for this product with version 8.  I've had
> a request to apply a bugfix from a recent version of the code to
> version 7.4 to create a "version 7.5" release.  Development is being
> done on Macintosh systems, and all versions of the source code before
> 8 have files with resource forks, which makes it a royal pain to use
> Subversion.

Minus the resource forks issue, we have a similar scenario.  Based on
what we're doing, I'd suggest this to you:

1.  Make a version 7 directory (depending on how you work, this might be
a new directory at or near the root, or a subdirectory of /branches).
2.  Copy your earliest version 8 directory into there.
3.  Check out your early version 8 code.
4.  Use a 2-way merge tool to basically replace the version 8 code with
version 7 code (specifically 7.4).
5.  Commit the 7.4 code.
6.  Make a 7.4 tag from your committed code.
7.  Copy your 7.4 tag somewhere for 7.5 development.
8.  Check out your 7.5 code.
9.  Merge your desired version 8 revision.
10.  Commit to 7.5 (or produce a patch file from your merge results if
that is what you really want).

The main trick is that in step 4 you're committing a revision that takes
you backwards from version 8 back to version 7.4.  From there you have
hopefully enough useful ancestry to merge your version 8 revision.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Converting a revision to a patch

Posted by Mark Wagner <ca...@gmail.com>.
On Sun, Mar 8, 2009 at 16:09, Holger Stratmann <ti...@finch.de> wrote:
> No seriously: It's never too late to put source code under version control,
> is it?
> What are you doing with the unmanaged copy and why do you need to apply
> patches to it? Will you need any more patches in the future?

We started revision control for this product with version 8.  I've had
a request to apply a bugfix from a recent version of the code to
version 7.4 to create a "version 7.5" release.  Development is being
done on Macintosh systems, and all versions of the source code before
8 have files with resource forks, which makes it a royal pain to use
Subversion.

-- 
Mark

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Converting a revision to a patch

Posted by Holger Stratmann <ti...@finch.de>.
Mark Wagner wrote:
>>> I've got a Subversion repository containing a set of changes I'm
>>> interested in (specifically, revision 189) and a version of the source
>>> code that isn't managed by Subversion.  How would I go about
>>> converting r189 into a patch to apply to the non-managed code, or is
>> svn diff -c 189 $pathToUrl
>>
>> then use that to patch.  at least i think that should do it..
>
> Thanks.
>
>>> there a better way to do this?
>> version everything.
>
> Got a time machine?
I think you can get one from Apple ;-) *scnr*

No seriously: It's never too late to put source code under version 
control, is it?
What are you doing with the unmanaged copy and why do you need to apply 
patches to it? Will you need any more patches in the future?

You could still create a branch - let's say it branches off at revision 
99 (take one that makes some sense - this might be revision 1 if the 
unmanaged code is older than your managed code) - and commit the 
(formerly) unmanaged version there. Voilà, now it's managed :-)
The advantage? You can now merge revision 189 from trunk (or is that in 
a branch as well?) to your new branch - you'll get some help with 
conflict resolution, if you're using Subversion 1.5 or better, you get 
merge tracking (just in case you need to merge more than this one 
revision in the future) and of course, you'll get a history of 
everything you're doing from now on... Unless revision 189 is trivial, 
it might be nice to see *exactly* what happened later on...

HTH,

Holger

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Converting a revision to a patch

Posted by Chuck Holzwarth <ch...@yahoo.com>.
How about creating a branch and checking the non subversion code in, check it out, merge the code you want to the branch and do the patch from there?

 Thank you,
Chuck Holzwarth




________________________________
From: Mark Wagner <ca...@gmail.com>
To: Nathan Nobbe <qu...@gmail.com>
Cc: users@subversion.tigris.org
Sent: Thursday, March 5, 2009 8:35:37 PM
Subject: Re: Converting a revision to a patch

On Thu, Mar 5, 2009 at 17:20, Nathan Nobbe <qu...@gmail.com> wrote:
>
> On Thu, Mar 5, 2009 at 5:30 PM, Mark Wagner <ca...@gmail.com> wrote:
>>
>> I've got a Subversion repository containing a set of changes I'm
>> interested in (specifically, revision 189) and a version of the source
>> code that isn't managed by Subversion.  How would I go about
>> converting r189 into a patch to apply to the non-managed code, or is
>
> svn diff -c 189 $pathToUrl
>
> then use that to patch.  at least i think that should do it..

Thanks.

>> there a better way to do this?
>
> version everything.

Got a time machine?

-- 
Mark Wagner

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Converting a revision to a patch

Posted by Mark Wagner <ca...@gmail.com>.
On Thu, Mar 5, 2009 at 17:20, Nathan Nobbe <qu...@gmail.com> wrote:
>
> On Thu, Mar 5, 2009 at 5:30 PM, Mark Wagner <ca...@gmail.com> wrote:
>>
>> I've got a Subversion repository containing a set of changes I'm
>> interested in (specifically, revision 189) and a version of the source
>> code that isn't managed by Subversion.  How would I go about
>> converting r189 into a patch to apply to the non-managed code, or is
>
> svn diff -c 189 $pathToUrl
>
> then use that to patch.  at least i think that should do it..

Thanks.

>> there a better way to do this?
>
> version everything.

Got a time machine?

-- 
Mark Wagner

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].


Re: Converting a revision to a patch

Posted by Nathan Nobbe <qu...@gmail.com>.
On Thu, Mar 5, 2009 at 5:30 PM, Mark Wagner <ca...@gmail.com> wrote:

> I've got a Subversion repository containing a set of changes I'm
> interested in (specifically, revision 189) and a version of the source
> code that isn't managed by Subversion.  How would I go about
> converting r189 into a patch to apply to the non-managed code, or is


svn diff -c 189 $pathToUrl

then use that to patch.  at least i think that should do it..

there a better way to do this?


version everything.

-nathan

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].