It's all about the answers!

Ask a question

scm cli how to re-sync a workspace?


Virginia Brown (9333941) | asked Jan 23 '13, 2:31 p.m.
edited Jan 23 '13, 2:40 p.m.

We are using the RTC CLI to load multiple versions of a component into RTC3.   
Step 1 - share new projects and deliver them to the stream.   
Step 2 - perform any updates on existing projects.   

We can’t seem to do both steps in the same pass – after adding the new projects, the workspace falls out of synch. As a workaround we remove then recreate/reload the workspace, which is reliable, but slow.

      
Any tips for performing an in-place synch?  


 


Comments
Tim Mok commented Jan 23 '13, 3:41 p.m.
JAZZ DEVELOPER

It would be interesting to know what is causing your workspace to become out of sync. It might be the way the projects are being shared. What CLI commands are being run?


Virginia Brown commented Jan 24 '13, 7:42 a.m.

Tim - 

We load the workspace and compare it against the new version, which has been exported to a file system,  to determine if there are any new projects.  The new projects are shared, checked-in, and delivered.  (It's useful to keep the delete/add/update operations atomic in case of failure.)


Tim Mok commented Jan 24 '13, 10:27 a.m.
JAZZ DEVELOPER

How are you sharing the new projects? If you are copying the new projects, there might have been an accidental copy of the metadata from the new version to where you've loaded your workspace. This could cause an out-of-sync situation.


Why do you have to check-in the new projects? The share should check the projects into a change set for you. Is it also possible to flow the changes where you can get the new projects? They're the same component so you can flow changes instead of resharing projects.

The most common cause of becoming out-of-sync is modifying your repository workspace in a way where the sandbox isn't updated as well. So I'm not sure how it's happening when you're sharing projects. It would help if you can list the exact CLI commands being used and any other operations on the repository workspace.

Accepted answer


permanent link
John Camelon (1.7k14) | answered Jan 28 '13, 7:15 a.m.
JAZZ DEVELOPER
Load has a switch for force (-f) which will ensure the latest copy is on disk no matter what is checked in.  If you are sure that the repository workspace has the best stuff (and not the sandbox), load -force will work.  

In terms of the discussion between Tim & Virginia ... if there is some strange behaviour there, we should create a work item to follow up on this.  

JohnC
SCM Lead
Virginia Brown selected this answer as the correct answer

Comments
Virginia Brown commented Feb 03 '13, 11:35 a.m.

Thanks John the --force option worked for us.  we create a workspace, delete any removed projects (via a prompt to the user), do a load --force, add any new projects, do a load --force, then finally perform updates

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.