It's all about the answers!

Ask a question

suspected bug in lscm get file with snapshot option - seeking workaround


Richard Good (872259) | asked Jan 12 '16, 9:44 a.m.
edited Jan 12 '16, 10:19 a.m.

I am using RTC 5.0.2

I can extract files just fine when I don't specify a snapshot but always get a java.lang.NumberFormatException error complaining about the snapshot when I include it so: -

>lscm get file -w myWSpace -c MyComponent -f "\locationInComp" VerNum "ExtractionLoc" -r "MyCredentials"

Works fine, but

>lscm get file -w myWSpace -c MyComponent -s MySnapshot -f "\locationInComp" "ExtractionLoc" -r "MyCredentials"

gives me the mentioned error, what am I doing wrong?

Note this is a build workspace myWSpace and the snapshot and baseline have the same name so I have been fiddling with this and also tried

>lscm get file -w myWSpace -c MyComponent -b MySnapshotName -s MySnapshot -f "\locationInComp" "ExtractionLoc" -r "MyCredentials"

>lscm get file -w myWSpace -c MyComponent -b MySnapshot -f "\locationInComp" "ExtractionLoc" -r "MyCredentials"

Both give the same error, if I stick in a state of 1 which the command line seems to suggest it always wants but seems superfluous for a baseline extraction then I get a different less bogus looking error.

Thanks

Richard

Accepted answer


permanent link
Dinesh Kumar B (4.1k413) | answered Jan 12 '16, 2:07 p.m.
JAZZ DEVELOPER
edited Jan 12 '16, 2:30 p.m.
hi Richard,

When i attempt to use both workspace and snapshot together in the same command, i get the NumberFormatException like you describe...

however,

When I use EITHER snapshot OR workspace, the commands WORKS for me..

I tried with snapshot on the stream as well as the snapshots on my repository workspace, and in both the cases, the command succeeds...

do you have any specific need to use them both together?  I feel the file within a component/location can be identified unambiguously with just one of snapshot or workspace...

Regards,
Dinesh
Richard Good selected this answer as the correct answer

Comments
Richard Good commented Jan 12 '16, 2:20 p.m.

Hi Dinesh,

Thanks, but I still cant get it to work (same error) I ran it as follows: - 

lscm get file -c MyComponent -b MySnapshotName -s MySnapshot -f "\locationInComp" "ExtractionLoc" -r "MyCredentials"

Is that what you did or were things in a different order not sure it should matter


Dinesh Kumar B commented Jan 12 '16, 2:25 p.m. | edited Jan 12 '16, 2:25 p.m.
JAZZ DEVELOPER

here is the command line i used :

C:\IBM\CLM502\TeamConcertBuild\scmtools\eclipse>lscm get file -s "snapone" -c "JUnit" -f "/JUnit Examples/src/com/ibm/team/junit/examples/AllTests.java" 3 -r https://clm502.ibm.com
:9443/ccm -u clmadmin -P clmadmin c:\testwithoutws --overwrite
Successfully extracted file to "C:\testwithoutws".



Richard Good commented Jan 12 '16, 2:35 p.m.

but

>lscm get file -c MyComponent -b MySnapshotName -f "\locationInComp" 1 "ExtractionLoc" -r "MyCredentials"

does not exactly sure why this works and the other things don't (note you need the 1) thought you could only have one version of a file in a baseline! not totally convinced this is doing what I want - thanks anyway hopefully this will help someone else in the future! 


Shashikant Padur commented Jan 12 '16, 10:18 p.m.
JAZZ DEVELOPER

Richard,

-b/--baseline, -w/--workspace and -s/--snapshot are mutually exclusive options. So you need to only specify one of them. The command should have thrown an error informing that these options are mutually exclusive (which is a defect).

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.