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

Re: suspected bug report or feature request - tagging a sparse directory

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 8 Jan 2010 14:26:33 +0100

On Fri, Jan 8, 2010 at 1:31 AM, Stas Cherkassky <scherkas_at_gmail.com> wrote:
> Julian,
>
> I don't want to remove parts of the tree from the repository.
> What I want is, effectively, a way to independently mark separate
> parts of the tree with the same tag.
> (I tried to explain it in my example). I don't see how your method
> (using svn rm) does it.
>
> If a tag is a property of a file (like in CVS), it's natural operation :
> cvs tag -R dirA -t relX    # tags whatever files and versions I have in WC
> and then
> cvs tag -R dirB -t relX
> In the end I have both dirA and dirB tagged with same tag relX.
>
> If a tag is an object (like in Perforce), and it's property is a list
> of files/versions it applies to, it's also easily achievable in very
> similar manner - 2nd p4 tag call would just add more files to that
> property of the tag object.
>
> With SVN's implementation of tags (logical directory in repo), it
> would also be possible, had 'svn copy' behave like I suggested.
> IMHO, this way is more intuitive - that's what unix copy command would do.

You could also try to accomplish such a "sparse tag" by doing a pure
server-side copy, using multiple source targets (and with the
--parents option to automatically create the tag directory itself and
any other subdirs needed). Like:

% svn copy --parents $SVNROOT/myproj/dirA $SVNROOT/tags/rel_X/myproj
-m “tagging part A of myproj for the next integration”

Or if you want to tag only dirA, dirC and dirF, ignoring other dirXXX subdirs:

% svn copy --parents $SVNROOT/myproj/dirA $SVNROOT/myproj/dirC
$SVNROOT/myproj/dirF $SVNROOT/tags/rel_X/myproj -m “tagging part A, C
and F of myproj for the next integration”
(all the above on one line)

This makes use of the feature of svn copy that it can take multiple
source arguments:
    usage: copy SRC[@REV]... DST

and the --parents option:
    --parents : make intermediate directories

Ok, it might not be as convenient for you as creating the tag directly
out of your WC that you've already set up the correct way, but still
... it works.

HTH
Regards,
Johan
Received on 2010-01-08 14:27:08 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.