3

I have the requirement as i need to connect to the rtc and automatically checkout the files from the stream to the repository workspace. I am writing the following commands in the bat file.

lscm login -r https://rtc.usaa.com/ccm -u uname -P password -n nickname -c
scm create workspace (workspacename) -r nickname -s (streamname)
lscm load workspace name -r nickname -d directorypath(c:codebase/rtc)
lscm logout -r nickname

while i am executing the above batch file for the first time it is creating the workspace and loading the project into the workspace path. while i am executing the above batch file for the second time again it is creating the duplicate workspace with the same name and getting exception while loading. I want to override the already existing workspace every time while loading but I didn't find a command for that. can you please provide me any other way of doing it or any command that solves my problem

Machavity
  • 30,841
  • 27
  • 92
  • 100

3 Answers3

0

It will be good to delete existing local workspace sandbox before loading the new one. In my setup, we execute the following steps: 1. Delete local sandbox (if it makes sense delete existing repository workspace too) 2. Create new repository workspace 3. Load the new repository workspace to local sandbox

Baskar
  • 1
0

Either create a uniquely named workspace (perhaps by sticking a time stamp into the name?) and then delete it when you're done, or use the workspace's UUID from the creation step.

Erigami
  • 804
  • 1
  • 8
  • 20
0

Instead of deleting and again writing the files into workspace, you can try accept incoming changes before load and then using "--force" attribute you can overwrite only the changes made files.

Accept using - SCM accept --flow-components -r <> -u <> -p <> --target

Use force at the end of the load command which you using.

this should work fine.

user2561288
  • 51
  • 1
  • 6