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

RE: Switch deleted my work directory

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Fri, 23 Jul 2010 17:35:33 -0400

> Let's clarify this.  I have a repo called "myProj" with a "trunk"
> and "branches" folder.  Under "trunk" is "sub1" and under "sub1" is
> "sub2".  I have the trunk checked out to "c:\myProj".  I go into
> repo browser and copy trunk\sub1\sub2 to branches\new-sub2. 

Ok... so far I'm with you.

> In Windows I right-click on c:\myProj\sub1\sub2 and do Switch to
> branches\new-sub2.  I would expect the dialog  to just say
> "updated" (after a delay) and not to change any files on disk.

Well... seeing as how you are switching to a copy of the folder that is in your working copy, this is basically what the result should be yes.

> Instead the dialog said "deleted c:\myProj\sub1\sub2" and deleted
> all the files in sub2, while leaving sub2 itself on the disk.  I

Well... wait... leaving sub2 where? Did you verify after the copy in the repo browser all your files where in branches\new-sub2? Can you also look in the log for \branches\new-sub2 and verify it shows it as a copy from \trunk\sub1\sub2 ??

> then right-click on "sub2" and do "update".  The dialog shows
> "updated" for each file and all the files come back on disk.  I
> then right-click on "sub2" and look at the Switch dialog.  I see
> that sub2 is now pointing to "trunk\sub1\sub2" (not the branch,
> even though I never switched it back to the trunk).

Sounds like your switch didn't work right. Are you sure you choose branches\new-sub2 when you switched?

Can you duplicate this by checked out \trunk\sub1 again to c:\MyProjTestSwitch then doing a switch of c:\MyProjTestSwitch\sub2 to \branches\new-sub2?

So, what files were deleted? They should all still be in your repo.

I've said this before and I'll say it again... I DON'T USE SWITCH and recommend devs here against it. Not because I don't trust it, but it is hard to remember what path your project is pointing to if you work with several projects. Just do a new checkout for the new branch... clearly naming it as a branch on your local file system. So, in your example if I had..

c:\MyProject -> \trunk\sub1

I would have done a new checkout to:

c:\MyProjectBranch-sub2 -> \branches\new-sub2

or something so it was clear locally which project path the working copy was pointing to... because that info is a bit hidden. I think even in git and hg people are starting to recommend doing a fork rather than a branch so you don't have to remember what current branch your working copy is using.

Hth,
BOb

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2637472

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-07-23 23:35:47 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.