How to copy?

Posted by Thomas Mercer-Hursh on 13-Apr-2010 20:32

I have a workspace on my desktop under D:\work\performance which references a database under D:\data\10.2B.  I would like to periodically copy the workspace on the desktop to my laptop.  The database is not a problem since it is just a copy of sport2000 and I will be making fresh copies of it periodically anyway.  But, what is the best way to copy everything in the workspace from the desktop to the laptop.  Without preexisting projects on the laptop, Refresh doesn't work and it also doesn't want to do an import wih no projects.  But, I would like to copy all the projects from one to another.

Do I just create the projects on the destination, unzip a copy over the top, and the refresh?   (And, presumably, fix the DB connection to point to C (no D on the laptop)

All Replies

Posted by Peter Judge on 14-Apr-2010 08:16

You can import an existing project into a workspace (File>Import). There's furthermore a "Copy projects into workspace" option which sounds appropriate.

You'd still need to fix the DB.

-- peter

Posted by Matt Baker on 14-Apr-2010 08:26

Workspaces themselves are not really "copyable" (is that a word?).  The workspace.xml file has absolute paths to lots of things.  So if your drive letters or installation paths are different you don't want to try copying the whole workspace.  Projects can easily be copied by using file->export/file->import which pretty much just generates a zip file with everything in it.  Or simply a copy/paste from one directory to another and then do a refresh once you have imported it.  Copy/paste/refresh on the individual projects is probably the easiest.

If you setup your db connections in OEA (as opposed to using .pf files) then you shouldn't need to change any paths since the .dbconnection file in the project uses a unique name to select one from the workspace definitions.  You can import/export database connection definitions as well.  This works well if you have more than a couple of database connections.

Run configurations can be stored in the project as files.  As long as you don't put absolute paths in the run configs they should work when copied with the project.

Posted by Admin on 14-Apr-2010 09:21

Just copy the project contents over from the one machine to the other (everything including the .project file) and import it to another workspace.

File -> Import and in the dialogs tree General -> Import existing projects into workspace.

You should consider to export the DB connection profiles first:

Window -> Preferences and in the tree go to OpenEdge Architect -> Database connections. Use the Export and Import buttons to export those settings to an XML file.

SCM is my preferred solution for this.

Posted by Thomas Mercer-Hursh on 14-Apr-2010 18:16

SCM would, of course, be the sensible thing if this was an on-going issue, but all I am trying to do is to put some work on my laptop so that I can be productive while waiting to get my car fixed.  Roll on, roll off, might not do it again for months or a year.

Mission accomplished, but I can't say it was pleasant or obvious.  The DB connection was pretty clean since I  editted the xml file during the transfrer and changed D: to C: and it worked right away.  But, I first tried exporting two projects in one file, since there is a utility project on which the other one depends.  Then it didn't want to import because I didn't have any existing projects.  So, I created the projects and went back and did two separate exports so that I could direct them to the right target directory.  That got me a Utility directory underneath the Utility Project, so I had to move everything up one level.  But, that done, it all compiles.

This thread is closed