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

Re: Maintain Directory Structure When Tagging Files

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-07-27 22:57:11 CEST

On Jul 27, 2006, at 20:09, Rob Wilkerson wrote:

> I have a project for which I often need to release hotfixes which
> include some, but not *all* files in the project. The files typically
> live in different directories scattered throughout the product code
> base. Is there anyway to tag either:
>
> 1. The entire product root, but only so that the changed files are
> placed in the tags directory
> 2. Only the files required for that hotfix in such a way that the
> parent structure (up to the root) is maintained
>
> What I want to be able to do is simply export the tag contents and
> have the requisite directory strucuture created in my build
> environement.

It sounds like you're coming from the CVS world, where one tags
individual files. Tags are handled entirely differently in
Subversion. In Subversion a tag is just a directory in the repository
to which things can be copied. Files are therefore members of a tag
in Subversion; a tag is not a property of a file as it was in CVS.

By convention, a tag in Subversion is a snapshot. It should never
change after it's made. You're talking about applying hotfixes.
Sounds like you're talking about a branch then, not a tag.

The recommendation would be to have a trunk, where all your
development occurs, and a branch where just the most essential
hotfixes can be made. Once you make a change to the trunk that you
want to have applied to the hotfix branch, you merge that revision to
the hotfix branch. If you like, you can make tags of the hotfix
branch at any time.

Have you read about Subversion's branch / tag / merge strategy? It's
described extensively in the book. You should read the entirety of
chapter 4:

http://svnbook.red-bean.com/en/1.2/svn.branchmerge.html

The other thing you seem to be asking is how to get just the files
that changed between point A and point B. This request comes up on
the list every couple weeks. A script could probably be written to do
this. But there's also a question of why you want this: If you have a
prior version of the project somewhere and want to update it to the
current version, then it's very easy to do with "svn up" provided
what you have is a working copy. If you don't have a working copy,
then rsync works great for synchronizing two directories with one
another.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 27 22:58:57 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.