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

RE: svn copy question

From: Yanghui Bian <ybi_at_vitesse.com>
Date: 2003-05-22 11:07:34 CEST

Thanks. Let me clarify it below:
D:\test is a normal directory, which is empty. I checked out the westlake from the repository.
Thus now I have something in D:\test. It is westlake: D:\test\westlake. So D:\test is not revisioned but D:\test\westlake
is revisioned.
I did something modification in my working copy. But I don't want to commit it to the trunk as it
needs to be verified by my colleague.

I try to use SVN COPY's WC->URL as stated in the manual
WC -> WC Copy and schedule an item for addition (with history).
WC -> URL Immediately commit a copy of WC to URL.
URL -> WC Check out URL into WC, and schedule it for addition.
URL -> URL Complete server-side copy. This is usually used to branch and tag.

Under directory D:\test
$ svn copy westlake http://p1/repos/tags/westlake_111
But failed.

I did another try:
checkout http://p1/repos/trunk
goes to project westlake, do local changes
Under directory trunk:
$ svn copy westlake http://p1/repos/tags/westlake_111
It works.

I have no idea why it doesn't work in the first case. Does it due to that SVN is a tree revisioned tool?
To checkout the whole trunk is not a good idea as I have a lot of other projects. I don't want it to clutter my disk.
To have a branch as a local copy before modification is not always feasible. Sometime people are just working
with the local copy from the trunk and interruptted by others to fix a minor bug.

Regards,
Yanghui Bian

-----Original Message-----
From: Sander Striker [mailto:striker@apache.org]
Sent: Thursday, May 22, 2003 10:21
To: Yanghui Bian; dev@subversion.tigris.org
Subject: RE: svn copy question

> From: Yanghui Bian [mailto:ybi@vitesse.com]
> Sent: Thursday, May 22, 2003 9:56 AM

> I have the layout below:
> repos/tags
> repos/trunk/westlake
> I checked out westlake in windows D:\test
> $ svn checkout http://p1/repos/trunk/westlake
> Then I did some modification in my local copy D:\test\westlake
> Now I want to copy my local modified copy to the repository.

You can't do that. It sounds to me that you wanted to do this:

$ svn co http://p1/repos/trunk/westlake

...do mods to westlake...

$ svn ci

$ svn cp http://p1/repos/trunk/westlake http://p1/repos/tags/westlake_111

Or, if you want to only have the local mods on the tag (which effectively
would make it a branch):

$ svn cp http://p1/repos/trunk/westlake http://p1/repos/tags/westlake_111
$ svn co http://p1/repos/tags/westlake_111

...do mods to westlake...

$ svn ci

Note that if you already had trunk/westlake checked out, you could switch
it to tags/westlake:

$ svn switch http://p1/repos/tags/westlake_111

> In directory D:\test (it is not revisioned)

What does this mean? That you have an unversioned version of 'westlake'
somewhere else (in D:\test)? You can't copy from an unversioned source.
The only way to get unversioned sources in the repository is through
import (or add on a working copy ofcourse).

> $ svn copy westlake http://p1/repos/tags/westlake_111
> But with the following error:
> svn: Path is not a working copy directory
> svn: 'd:\test' is not a working copy

Probably not what you want, but (and this is not something I would recommend
given the naming of your layout):

$ svn import http://p1/repos/tags westlake westlake_111
 
> I know that if I checkout the whole trunk then I can run the copy command
> under D:\test\trunk and put the westlake to the tags in repository.

Why aren't you using the 'svn copy URL URL' syntax?
 
> But the problem is that I have too many other projects under trunk directory.
> It's terrible to checkout them all out. Are there any other way?

I strongly urge you to read the Subversion book: http://svnbook.red-bean.com/.

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 22 11:08:37 2003

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.