Copying a project (folder)

If you are having a problem using SourceOffSite, post a message here.

Moderator: SourceGear

Post Reply
viper
Posts: 2
Joined: Mon Apr 27, 2009 9:15 am

Copying a project (folder)

Post by viper » Mon Apr 27, 2009 9:22 am

Hi. I'm using SourceOffSite (ver. 4.1.2) and I'm trying to "copy" a project (folder) - i.e.
having Project A, which also has subprojects A1, A2, A3 - I would like to copy it as Project B, having subprojects A1, A2, A3 without loosing the information for the shared files within the project.
In other words - I need to use the "move" functionality, but keeping the original (source) project as well.
Thanks in advance.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Copying a project (folder)

Post by lbauer » Mon Apr 27, 2009 10:30 am

You can do this with a Share/Branch operation.

In the SOS Client, right-click on the folder where you want the new project -- if you want it on the same level as Project A, right click on the parent folder, one level up. Select the Share command. In the Share with dialog, select Project A, then check the boxes on the right for "Branch after Share" and "Recursive." Click "ok". In the next dialog, which is Share Project, type the name for the new project -- Project B, in this case. Refresh the project tree after this.

Note: I tried this with my own SOS installation, and found that sometimes this worked fine, sometimes I got unexpected results, like only one of the subfolders being shared. I'm not sure if this is a bug in the VSS automation component or a problem with my database. If it doesn't work like you'd expect, let us know. A workaround is to do this with a VSS client. The menus are slightly different, but the outcome will be what you want.
Linda Bauer
SourceGear
Technical Support Manager

viper
Posts: 2
Joined: Mon Apr 27, 2009 9:15 am

Re: Copying a project (folder)

Post by viper » Mon Apr 27, 2009 1:49 pm

I tried the suggested solution,
but I get "An unknown error occured while accessing C:\SS\....." message.

Will try to give more details:

Project A
-File F1
-File F2
-File F3
-Sub Project A1
--File F1 (shared with Project A)
--File F12 (local to that subproject)
--File F13 (shared between projects A,B)
-Sub Project A2
--File F2 (shared with Project A)
-Sub Project A3
--File F3 (shared with Project A)
Project B
-Sub Project B1
--File F13 (shared between projects A,B)

What we need to achieve as a result is to execute "copy" in order to keep all the existing sharing and keep all "local" files not shared:
(Copying Proejct A as Project XX)

Project XX
-File XXF1
-File XXF2
-File XXF3
-Sub Project XX1
--File XXF1 (shared with Project XX)
--File XXF12 (local to that subproject)
--File F13 (shared between projects A,B,XX)
-Sub Project XX2
--File XXF2 (shared with Project XX)
-Sub Project XX3
--File XXF3 (shared with Project XX)

Hope that gives a better idea of the issue.
We've also tried to do the same through VSS, but it shares all files regardless if they were "local" or not,
e.g.
File XXF12 (Project XX) - the file is the same as F12 (Project A) but copied - not shared.
File F13 should remain shared between all projects

Will appreciate any ideas

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Copying a project (folder)

Post by lbauer » Mon Apr 27, 2009 3:41 pm

SOS is remote access to VSS, so the source control operations will work (or not work) exactly the same as in VSS.

I don't think VSS can handle this "copy" scenario. As I described earlier, to copy in VSS, you have to share, then branch the shared item. You can do it in one operation or two.

To accomplish what you want, you may need to share everything and selectively branch, or delete some items and re-share them after the branch. Another idea is to manually create the FolderXX and share/branch or share individual items. This is time consuming, but hopefully you only have to do it once.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply