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

Re: Copying commited WC

From: Sean Laurent <sean_at_neuronfarm.com>
Date: 2005-01-04 23:09:36 CET

On Tuesday 04 January 2005 03:54 pm, Nick Patavalis wrote:
> On 2005-01-04, Tom Mornini <tmornini@infomania.com> wrote:
> I understand this, but the problem is that I *can't* issue an "svn
> update", at least not unconditionally. The situation is like this (if
> it was not made clear by the original posting):
> I have a working copy (WC). This WC is, as far as "svn status" can
> indicate, fully up to date. I want to copy this WC to the repo like
> this:
> cd /path/to/WC
> svn cp . svn://host/repo/proj1/tags/tag1
> Will this command succeed, or will it fail? What can I do to guarantee
> that it will succeed?
> I *cannot* do an "svn up", because this will bring to the WC changes
> made in the repository by other users, *after* the checkout of the WC,
> and *after* the last commit from it. These changes I *do not* want to
> copy.
> So I have a WC which is perfectly valid, and without local
> modifications, as far as the user can tell. The problem is I cannot
> copy it! Or to be more precise, I don't know if I can copy it or not
> without actually issuing the "svn cp" command.

Why not do a URL to URL copy and specify the revision?


$ svn info /path/to/WC
Path: /path/to/WC
URL: svn://host/repo/proj1/trunk
Repository UUID: 4a5ed695-87dc-0310-ba4e-81239b96de8e
Revision: 621
Node Kind: directory
Schedule: normal
Last Changed Author: sean
Last Changed Rev: 620
Last Changed Date: 2004-12-21 16:11:17 -0600 (Tue, 21 Dec 2004)
Properties Last Updated: 2004-12-07 15:36:23 -0600 (Tue, 07 Dec 2004)

Notice that the fourth row, "Revision", indicates the current revision of the
top level directory of your working copy. Of course, if you're using a mixed
revision working copy, this won't help much. In that case, figure out the
last commit you made to the repository that you want to pick up. In this
case, assume it's r621.

$ svn cp -r 621 svn://host/repo/proj1/trunk svn://host/repo/proj1/tags/tag1 -m
"Tagging proj1 as tag1 from r621."

Will that work for you?

Ehrman's Commentary:
        (1) Things will get worse before they get better.
        (2) Who said things would get better?

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jan 4 23:12:32 2005

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