Jump to content

What is the simplest way to replicate a workspace to other sites?


wilddingo2

Recommended Posts

Hi, I am evaluating Plastic SCM, so it is still relatively new to me...

 

We hope to create a development model where we have a centralized "central" site and several distributed "work at home" sites on developer laptops. The goal is to let the developers work remotely (i.e. disconnected) and then replicate changes with the "central" site as needed. I understand most of the concepts of this distributed or hybrid model, but am not sure how to quickly get it started. Today we have no source control system - the source code (and only code) is sitting in a directory tree on the company file server.

 

Here is how I went about setting up a base workspace of one of these developer sites.  It seems like maybe I made it more difficult than it should be?

 

  1. Getting the source code into PlasticSCM
    1. I created a new repository on the "central" plastic server (RepA)
    2. I created a workspace with the directory tree (M:\code\project1) and RepA as the repository
    3. I used 'Add directory tree to source control' to add the items to the repository
    4. I checked-in all items. (is this step necessary after adding an item to source control?)
  2. Establishing a repository and workspace on the "work at home" site
    1. Change the Plastic client configuration to point back at the local Plastic server.
    2. Create a new repository on the "work at home" site (RepB)
    3. Create a root directory on the "work at home" harddrive (C:\code\project1)
    4. Create a new workspace on the "work at home" site with that root directory and RepB as the repository
  3. Replicate the source code from the "central" site to the "work at home" site
    1. Go to the BranchExplorer on the "work at home" workspace, click the main branch, and choose "Replication...Pull this branch".
    2. Fill in the details of the "central" server and repository and click 'Replicate'
    3. In the BranchExplorer, click on the two-headed branch and choose 'Merge from this branch'
    4. Go to 'Pending Changes', enter a comment, and click 'CheckIn'

After these steps, my BranchExplorer looks like the below.  Was that the simplest way?

 

post-3753-0-50732200-1359088508_thumb.jpg

 

Thanks,
Glenn

Link to comment
Share on other sites

Hi,

 

Regarding point one, you have to commit added files to store them in the repository. If you only add the files, they would be only in your local machine. Once you commit, you will see a new changeset in branch explorer with the new files added.

 

Regarding point two I think is correct.

 

And regarding point three, It is perfectly correct, but maybe you can also take a look at "Sync replication" option in the GUI menu. The Sync replication view lets the user configure replication relationships between repositories so they can be easily synchronized with one click. Replication relationships automate branch replication operations so that entire repositories can be kept in sync with little effort. There is more information about Sync replication view in our documentation:  

 

http://www.plasticscm.com/releases/4.1/manuals-html/en/guiguide.htm#_Toc340551748

 

Best regards,

 

Carlos

Link to comment
Share on other sites

Thanks Carlos.  Sorry I didn't respond back earlier.  I did find that I can avoid one of the parts I found the most confusing.  In the 3rd point, once you have replicated the same branch from the remote site, you do not need to do a merge at all.  You simply can right-click the newest changeset (the one farthest right) and choose 'Switch workspace to this changeset'.  Doing this avoids the two-headed main branch, involves less steps and immediately asks if you are sure you want your workspace updated.  This method makes much more sense to me.

 

Regards,

Glenn

Link to comment
Share on other sites

Hi Glenn,

 

I´m glad to hear that your system is working fine! But one thing, if two developers are working in two different  repositories, and making changes at the same time on the same branch, you will have two heads and you may need to solve the conflicts with merges.

 

Best regards,

 

Carlos

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...