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

Re: Making a branch

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-12-19 20:30:55 CET

On Dec 19, 2006, at 08:38, Steve Nelson wrote:

> I have a repo set up as follows:
> /devrep/trunk - contains several hundred individual programs
> /devrep/branches - contains directories for trouble tickets requesting
> changes to trunk, which are merged back into trunk when finished
> It isn't convenient/possible to have subdirectories per program in
> trunk, or even functional groupings, so when a ticket is raised
> requesting changes to be made to, eg, half a dozen programs in trunk,
> the process is to create a branch with the name of the ticket, and
> copy
> the programs over.
> What's the best way to do this? I don't want every developer to
> have to
> have a complete copy of the whole repo, but it seems I can't do a
> remote
> creation of a branch without a working copy.
> What would the procedure be to create the subdirectory and move the
> files over?

True, having a complete working copy of the entire repository would
not be recommended. However, what about a complete working copy of
the trunk? Is that reasonable? If so, then simply make the branch of
the trunk:

$ svn cp $URL/devrep/trunk $URL/devrep/branches/issue123 \
-m "making issue123 branch"

Then the developer gets a working copy of the issue123 branch,
resolves issue 123, and maybe later it gets merged back to trunk. If
fixing the issue does not require having all the programs in the
trunk, then that's fine; then he simply won't change those programs.
But the fact that they're present in the branch shouldn't be a
problem; they're there because they're part of the project as a whole.

Now, if this is inconvenient or impossible because the entire trunk
is so huge that it would take forever to check out or because it uses
inordinate amounts of disk space on the client, then you'll have to
work around that organizational problem by creating a branch that
only contains what you want to work on. For example...

$ svn info $URL
# see what the HEAD revision of the repository is -- let's say it's 456

$ svn mkdir $URL/devrep/branches/issue123 \
-m "making empty issue123 branch"

$ svn cp -r456 $URL/devrep/trunk/foo $URL/devrep/branches/issue123 \
-m "copying foo from trunk r456 to issue123 branch"

$ svn cp -r456 $URL/devrep/trunk/bar $URL/devrep/branches/issue123 \
-m "copying bar from trunk r456 to issue123 branch"

$ svn cp -r456 $URL/devrep/trunk/baz $URL/devrep/branches/issue123 \
-m "copying baz from trunk r456 to issue123 branch"

Yes, this is more work, and you end up with several revisions being
required to accomplish what is logically a single task (that of
creating the branch). But that's not such a big deal.

To reply to the mailing list, please use your mailer's Reply To All  
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Dec 19 20:31:37 2006

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.