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

Re: Multi-folder tagging with a single commit?

From: Ryan Schmidt <subversion-2009b_at_ryandesign.com>
Date: Thu, 16 Jul 2009 23:50:13 -0500

On Jul 16, 2009, at 17:49, Michael Cowperthwaite wrote:

> I'm working on a project which has four main directories. Currently,
> only two of the directories are pertinent and those are what I'd
> like to
> tag. I would like to be able to copy both of those folders in their
> entirety to a new subfolder of 'tags' in a single commit, similar
> to the
> single commit I can perform by copying from the trunk root to the new
> subfolder. In essence, I want this:
>
> svn copy svn://trunk/f1 svn://trunk/f2 svn://tags/NewTag
>
> (with the resulting NewTags containing both folders, f1 and f2, fully
> populated) without having to create /tags/NewTag first. But svn just
> throws up its hands because NewTag doesn't exist. The command works
> just fine if the folder exists, but creating that folder in the
> repository requires an additional commit.
>
> This seems inconsistent with
>
> svn copy svn://trunk svn://tags/NewTag
>
> which *does* create the NewTag folder, but of course it copies the
> contents of trunk, rather than creating a 'trunk' subfolder of NewTag.
> I would not want the two-source-folder version to mingle all the
> contents into a single folder.
>
> I know, from a recent thread, that svn copy is intended to emulate
> Unix
> cp, altho playing around with this in a CygWin window, I'm not readily
> discovering any form (single or multi-folder source) with which cp
> creates the folder. I don't think Windows' command-line COPY command
> creates a folder either.
>
> Maybe I've just got a foggy model in my head, but automatically
> creating
> the new folder doesn't seem like it should be a big deal; I don't know
> how else you'd interpret that first copy command up there.

The way "svn cp" functions is the same as the way UNIX "cp" functions
in this regard.

To get what you want, look into svnmucc, which is part of the
Subversion distribution and can do multiple svn operations in a
single command. In this case, you would be doing the three operations
"make the tag directory", "copy f1 to the new tag directory" and
"copy f2 to the new tag directory" in the same commit.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-07-17 06:51:50 CEST

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.