You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rush Manbert <ru...@manbert.com> on 2008/02/26 18:01:10 UTC

"Composing" a tag

A question has come up here that I would like to ask the group.

Assume that I create a working copy by checking out my head rev of 
trunk, then selectively using svn switch on certain WC subdirectories so 
that they get populated from some directory other than the original. The 
proposed use case is that we have created a branch from some 
subdirectory and use svn switch to substitute it for the original 
directory we got on the trunk checkout.

I test with my working copy, and am happy that it works as desired.

Now comes the question.

Can I somehow "compose" a tag directory in the repository that reflects 
the source code that was used to piece together my working copy? The 
proposal is that we would use svn copy within the repository, something 
like this:

svn cp trunk tags/release1_1/something
svn cp branches/projects/subdirProject/subdir
        tags/release1_1/something/path/to/subdir
etc.

In theory, we would walk the working copy tree, find every directory 
that was switched, see what it was switched to, then build up the series 
of svn copy commands.

My initial reaction was that I didn't think this was possible, but I 
would like to put the question to the experts. Is this possible?

- Rush

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "Composing" a tag

Posted by Mark Phippard <ma...@gmail.com>.
On Tue, Feb 26, 2008 at 11:53 PM, Mark Reibert <sv...@reibert.com> wrote:
> On Tue, 2008-02-26 at 13:08 -0500, Mark Phippard wrote:
>  > You can create the tag from your WC to get what you want.
>  >
>  > svn cp -m "Create complex tag"  .  url://server/repos/tags/r1.1
>
>  Does this preserve the history of the various (sub)trees?

Yes.  It is still a "copy", it just uses your WC as the driver for
what to copy.  It does not even send the WC contents to the server (if
files are unmodified) it just tells the server what you have so that
it can construct the correct copy.


> What about
>  locally modified files that get "uploaded" as part of the copy?

It depends on the revision argument passed to the command.  For
example -rBASE would copy the pristine version.  If you leave off the
revision arg, then I believe they are uploaded as part of the copy.
After the command completes, your WC will still have local
modifications because the WC is still pointed at the old location.

>  (I know I can just try it - and I will - but thought I would ask for
>  anyone else who is also curious.)

I'd suggest trying it to be sure on the local modification behavior.

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "Composing" a tag

Posted by Mark Reibert <sv...@reibert.com>.
On Tue, 2008-02-26 at 13:08 -0500, Mark Phippard wrote:
> You can create the tag from your WC to get what you want.
> 
> svn cp -m "Create complex tag"  .  url://server/repos/tags/r1.1

Does this preserve the history of the various (sub)trees? What about
locally modified files that get "uploaded" as part of the copy?

(I know I can just try it - and I will - but thought I would ask for
anyone else who is also curious.)

Thanks,
Mark

-- 
----------------------
Mark S. Reibert, Ph.D.
svn@reibert.com
----------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "Composing" a tag

Posted by Rush Manbert <ru...@manbert.com>.
Mark Phippard wrote:
<snip>
> This is covered in the book too:
> 
> http://svnbook.red-bean.com/en/1.4/svn.branchmerge.tags.html#svn.branchmerge.tags.mkcomplex
> 

Hi Mark,

Sorry to be such a loser. I'll RTFM more carefully next time. :-(

Thanks for the polite reply!

- Rush

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: "Composing" a tag

Posted by Mark Phippard <ma...@gmail.com>.
On Tue, Feb 26, 2008 at 1:01 PM, Rush Manbert <ru...@manbert.com> wrote:
> A question has come up here that I would like to ask the group.
>
>  Assume that I create a working copy by checking out my head rev of
>  trunk, then selectively using svn switch on certain WC subdirectories so
>  that they get populated from some directory other than the original. The
>  proposed use case is that we have created a branch from some
>  subdirectory and use svn switch to substitute it for the original
>  directory we got on the trunk checkout.
>
>  I test with my working copy, and am happy that it works as desired.
>
>  Now comes the question.
>
>  Can I somehow "compose" a tag directory in the repository that reflects
>  the source code that was used to piece together my working copy? The
>  proposal is that we would use svn copy within the repository, something
>  like this:
>
>  svn cp trunk tags/release1_1/something
>  svn cp branches/projects/subdirProject/subdir
>         tags/release1_1/something/path/to/subdir
>  etc.
>
>  In theory, we would walk the working copy tree, find every directory
>  that was switched, see what it was switched to, then build up the series
>  of svn copy commands.
>
>  My initial reaction was that I didn't think this was possible, but I
>  would like to put the question to the experts. Is this possible?

You can create the tag from your WC to get what you want.

svn cp -m "Create complex tag"  .  url://server/repos/tags/r1.1

This is covered in the book too:

http://svnbook.red-bean.com/en/1.4/svn.branchmerge.tags.html#svn.branchmerge.tags.mkcomplex

-- 
Thanks

Mark Phippard
http://markphip.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org