On Oct 17, 2007, at 08:23, Bicking, David (HHoldings, IT) wrote:
> Troy Curtis Jr wrote:
>
>> On 10/17/07, Luca Ferrari wrote:
>>
>>> On Wednesday 17 October 2007 Micah Elliott wrote:
>>>
>>>> On Oct 16, 2007, at 17:21, Christian Buhtz wrote:
>>>>
>>>>> I am in the root of the repository (ls:conf dav db format
>>>>> hooks locks).
>>>>>
>>>>> I forgot to create a trunk and branch directory.
>>>>>
>>>>> "svn mkdir trunk" say "svn: '.' is not a working copy".
>>>>> Of course it is not. It is the repository itself.
>>>>>
>>>>> How can I solve this?
>>>>
>>>> You need a "working copy". Check out one in a sandbox area and
>>>> then make the appropriate changes. E.g.,
>>>>
>>>> cd ~/sandbox
>>>> svn checkout file://path/to/repo tmpwc
>>>> cd tmpwc
>>>> svn mkdir trunk
>>>> for f in *; do svn mv $f trunk; done
>>>> svn mkdir branches tags
>>>> svn commit -m "Finally got organized!"
>>>
>>> Doing the above, is then necessary a checkout or just an
>>> update from other users?
>
> You don't have to checkout (as you already have it), but others do
> need
> to checkout.
>
>> I think that you should be able to "switch" your working copy:
>>
>> svn switch <old url> <new url>
>
> Based on the above technique, there's no reason to "switch" because
> you're whole project (branches and all) is in your local workspace.
>
> I guess because I use Tortoise so frequently, I actually forgot how it
> is done from the command line. Another approach, that I think has
> some
> advantages is to create the repository structure in a folder (project,
> trunk, branch, tags), put your mainline (initial) project code in the
> trunk folder, and do an svn import. Next, somewhere else on your HD,
> create "Projects/MyProject" and checkout the trunk there.
>
> I like this method because I prefer to grab "trunk" as my working
> copy,
> and "svn switch" as necessary into the workspace rather than mirror
> the
> repository locally, which is what happens with Micah's suggestion.
David,
Christian's question was, given that he already has his project in a
repository without the trunk and branches directories, how does he
now create them? Your import suggestion is useful for his next
project, but does not help him now. The way to fix his his problem
now is to do what Micah said: check out a temporary working copy
somewhere, make the trunk directory, move everything into it, make
the branches and tags directories, and commit. Micah didn't say, but
the implication is that now this temporary working copy will be
deleted since it is no longer needed.
Now, to Luca's question. What happens to existing working copies?
Yes, users could just update those working copies. All the files in
the working copy would be deleted (except for any the user had
modified), then the trunk, branches and tags would be pulled in.
That's not a great solution though because you seldom want to have
the trunk, all branches and all tags checked out, and also it makes
it hard for the user to commit any changes they still had in the
working copy. The better suggestion is Troy's, which is to switch the
working copy to the new trunk before updating, like:
svn switch url://to/repo/trunk /path/to/existingwc
Now the working copy is pointing to the same content as before (the
trunk) and work can continue as usual.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Oct 17 23:19:08 2007