You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Aaron Zeckoski <az...@vt.edu> on 2009/05/25 17:08:11 UTC

Managing a small number of changes for foreign code?

I want to manage a small number of changes to a large chunk of code (PHP) from an external project such that when I commit I am only committing the stuff I added or changed and not the rest of the code. The original code is not located in an SVN repository and license stuff means I cannot really put it in into my repository either. Is there any way to manage this? (if this is documented somewhere then please just send along the link)
Thanks!
-AZ

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

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

Re: Managing a small number of changes for foreign code?

Posted by Stefan Sperling <st...@elego.de>.
On Mon, May 25, 2009 at 02:07:01PM -0400, Scott Gifford wrote:
> Aaron Zeckoski <az...@vt.edu> writes:
> 
> > I want to manage a small number of changes to a large chunk of code
> > (PHP) from an external project such that when I commit I am only
> > committing the stuff I added or changed and not the rest of the
> > code. The original code is not located in an SVN repository and
> > license stuff means I cannot really put it in into my repository
> > either. Is there any way to manage this? (if this is documented
> > somewhere then please just send along the link)
> 
> I managed this for awhile by keeping a "patches" directory in SVN.
> Whenever I changed something in the original, I would generate a patch
> with diff, then update that diff in SVN.
> That worked OK, but quickly got very tedious and error-prone.

Subversion cannot do this well.
Mercurial patch queues have been designed for this use case,
however, and it's really nice to use:
http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html

I'd say for people who want to contribute patches to an upstream
project without loosing track of what they're doing, Mercurial
patch queues is the way to go.

For people who want to manage a variant of an externally maintained
code base over a longer period of time, and don't necessarily aim
to contribute back, vendor branching is much better.

Either approach can be bent to serve the use case of the other
but the result of doing that is never really nice.

Stefan

Re: Managing a small number of changes for foreign code?

Posted by Scott Gifford <sg...@suspectclass.com>.
Aaron Zeckoski <az...@vt.edu> writes:

> I want to manage a small number of changes to a large chunk of code
> (PHP) from an external project such that when I commit I am only
> committing the stuff I added or changed and not the rest of the
> code. The original code is not located in an SVN repository and
> license stuff means I cannot really put it in into my repository
> either. Is there any way to manage this? (if this is documented
> somewhere then please just send along the link)

I managed this for awhile by keeping a "patches" directory in SVN.
Whenever I changed something in the original, I would generate a patch
with diff, then update that diff in SVN.

That worked OK, but quickly got very tedious and error-prone.  I
switched to the vendor branch approach, and it worked much better.
You might want to look closely at your license agreement and see if
this is truly prohibited; it seems strange that a license that allows
you to use and modify the code would prevent you from managing it in a
version control system.  Even if it does, the licensing problem may
prove easier to solve than the technical one.

Good luck!

-----Scott.

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

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

Re: Managing a small number of changes for foreign code?

Posted by Aaron Zeckoski <az...@vt.edu>.
I can make up a repo on my local machine I guess. The key is that it
needs to end up committing into a public repository. I am using SVN
1.5.5 client so I think this will probably work fine (cross
repositories). I will give this a try.
Thanks
-AZ

On Mon, May 25, 2009 at 6:53 PM, Stefan Sperling <st...@elego.de> wrote:
> On Mon, May 25, 2009 at 06:39:08PM +0100, Aaron Zeckoski wrote:
>> I am probably missing something so I apologize for being dense. I
>> found this page before but the solution appears to be to upload the
>> source of the thing I am extending. I cannot really do this because of
>> licensing limitations. I suspect that the answer here is that this is
>> just not possible but I hope that is not the case.
>> Thanks!
>
> A subversion repository is not automatically public.
> You can put the code into a newly created repository that you keep
> private (e.g. on your machine).
>
> Stefan
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

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

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

Re: Managing a small number of changes for foreign code?

Posted by Stefan Sperling <st...@elego.de>.
On Mon, May 25, 2009 at 06:39:08PM +0100, Aaron Zeckoski wrote:
> I am probably missing something so I apologize for being dense. I
> found this page before but the solution appears to be to upload the
> source of the thing I am extending. I cannot really do this because of
> licensing limitations. I suspect that the answer here is that this is
> just not possible but I hope that is not the case.
> Thanks!

A subversion repository is not automatically public.
You can put the code into a newly created repository that you keep
private (e.g. on your machine).

Stefan

Re: Managing a small number of changes for foreign code?

Posted by Olivier Sannier <ob...@free.fr>.
Yes, that could be a solution.
And put the "patches" files in the public repository.

Cheers
Olivier

PS: Please reply to the list as well and try to avoid top posting.

Aaron Zeckoski wrote:
> It's a public repository. I suppose you're suggesting I could run an
> svn server on my local machine?
> -AZ
>
>
> On Mon, May 25, 2009 at 6:47 PM, Olivier Sannier <ob...@free.fr> wrote:
>   
>> Aaron Zeckoski wrote:
>>     
>>> I am probably missing something so I apologize for being dense. I
>>> found this page before but the solution appears to be to upload the
>>> source of the thing I am extending. I cannot really do this because of
>>> licensing limitations. I suspect that the answer here is that this is
>>> just not possible but I hope that is not the case.
>>> Thanks!
>>>       
>> What licensing problems?
>> I mean, it's a private repository, right? No public access whatsoever?
>> If that's the case, I can't see how a licensing issue can come in here...
>> I mean, in all cases, you MUST store the sources somewhere, and be it a
>> folder or a SVN repository, it's still storage. I can't see how a license
>> could prevent you from storing the sources...
>>
>>     
>
>
>
>

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

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

Re: Managing a small number of changes for foreign code?

Posted by Aaron Zeckoski <az...@vt.edu>.
I am probably missing something so I apologize for being dense. I
found this page before but the solution appears to be to upload the
source of the thing I am extending. I cannot really do this because of
licensing limitations. I suspect that the answer here is that this is
just not possible but I hope that is not the case.
Thanks!
-AZ

On Mon, May 25, 2009 at 6:29 PM, Stefan Sperling <st...@elego.de> wrote:
> On Mon, May 25, 2009 at 06:28:21PM +0100, Stefan Sperling wrote:
>> On Mon, May 25, 2009 at 10:08:11AM -0700, Aaron Zeckoski wrote:
>> > I want to manage a small number of changes to a large chunk of code
>> > (PHP) from an external project such that when I commit I am only
>> > committing the stuff I added or changed and not the rest of the code.
>> > The original code is not located in an SVN repository and license
>> > stuff means I cannot really put it in into my repository either. Is
>> > there any way to manage this? (if this is documented somewhere then
>> > please just send along the link)
>>
>> See this thread from a week ago:
>> http://svn.haxx.se/users/archive-2009-05/0582.shtml
>
> Actually that thread has lots of links but misses this very
> important one:
> http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html
>
> Stefan
>



-- 
Aaron Zeckoski (aaronz@vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

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

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

Re: Managing a small number of changes for foreign code?

Posted by Stefan Sperling <st...@elego.de>.
On Mon, May 25, 2009 at 06:28:21PM +0100, Stefan Sperling wrote:
> On Mon, May 25, 2009 at 10:08:11AM -0700, Aaron Zeckoski wrote:
> > I want to manage a small number of changes to a large chunk of code
> > (PHP) from an external project such that when I commit I am only
> > committing the stuff I added or changed and not the rest of the code.
> > The original code is not located in an SVN repository and license
> > stuff means I cannot really put it in into my repository either. Is
> > there any way to manage this? (if this is documented somewhere then
> > please just send along the link)
> 
> See this thread from a week ago:
> http://svn.haxx.se/users/archive-2009-05/0582.shtml

Actually that thread has lots of links but misses this very
important one:
http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html

Stefan

Re: Managing a small number of changes for foreign code?

Posted by Stefan Sperling <st...@elego.de>.
On Mon, May 25, 2009 at 10:08:11AM -0700, Aaron Zeckoski wrote:
> I want to manage a small number of changes to a large chunk of code
> (PHP) from an external project such that when I commit I am only
> committing the stuff I added or changed and not the rest of the code.
> The original code is not located in an SVN repository and license
> stuff means I cannot really put it in into my repository either. Is
> there any way to manage this? (if this is documented somewhere then
> please just send along the link)

See this thread from a week ago:
http://svn.haxx.se/users/archive-2009-05/0582.shtml

Stefan