It's all about the answers!

Ask a question

How to add, modify and delete files using CLI


vinay kumar bondugula (7332972) | asked May 07 '20, 5:09 a.m.

 Hi All,


We are trying to configure a Jenkins job to check in modified, newly added and deleted files from sandbox to repository workspace. As part of that <o:p> </o:p>

<o:p>   </o:p>

  1. We have loaded code from stream to sandbox, through Jenkins <o:p> </o:p>
  2. Modified few files <o:p> </o:p>
  3. Added some new files <o:p> </o:p>
  4. Deleted some files <o:p> </o:p>
  5. We ran below check in command <o:p> </o:p>

lscm checkin "%destinationfolder%\%%a" -W 578472 <o:p> </o:p>

  1. It is able to take care of modified and deleted files. But, for newly added files it is throwing below error. Can you help. <o:p> </o:p>

14:17:03  "F:\Test_Jenkins214\workspace\Git_TO_RTC_Declarative\RTC\sta\DummyFile" is not shared. <o:p> </o:p>

14:17:03  The system cannot find the drive specified.


Please let us know in case we are missing option in the command to share the new files.


Thanks,

Vinay

One answer



permanent link
Shashikant Padur (4.3k27) | answered May 07 '20, 5:21 a.m.
JAZZ DEVELOPER
I believe your sandbox is F:\Test_Jenkins214\workspace\Git_TO_RTC_Declarative\RTC\sta
and DummyFile is in the root of the sandbox. For any file in the root of the sandbox, you need to use "scm share" command because it does not know which component the file is going to be added to. So first you need to share the file into the component.

Another option would have been to load the workspace into the sandbox so that there is a component folder created with the name of the component under the sandbox folder and all the files/folders of that component is loaded under the component folder. Now if you add any new files under that component folder, you can checkin the new files as it knows about the component.

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.