RTC SCM aliasId - String or Int?
When you use the SCM command line tool, to run "scm status" or similar, the output (non UUID or JASON) includes an aliasId.
Up until yesterday, I'd only ever seen numbers >1000. When I parse the output, I treat it as an int. Yesterday, I came across a case where the id was "0023". I treat it as an INT, so I used "23". And quickly discovered that as far as asliasId's are concerned "23" != "0023". So, is the aliasId an int or a String? |
Accepted answer
Chris,
You shouldn't use aliases when using the scm tool from a script as aliases are temporary and it could be reused, may roll over. The aliases start from 1000 and go up to 9999. I am not sure how you got 0023.
Use uuid's in your script. You can get the uuid of an item as follows: scm -u y <command> <command_args>
David Lafreniere selected this answer as the correct answer
Comments
Chris Graham
commented Dec 05 '15, 5:12 a.m.
I'm well aware of that. I'm simply using the output of the scm commands, from the same workspace (so the aliases will not change), and they are not persisted or stored, they are simply used to allow SCM commands to be issued by the maven jazz scm provider.
Chris Graham
commented Dec 05 '15, 5:19 a.m.
Here is the (edited to protect the names of the guilty) actual output of a scm status command:
Workspace: (0017) "ReleaseWorkspace" <-> (9893) "MyStream"
Component: (9894) "AComponent"
Baseline: (0024) 561 "ABaseline..."
My guess is that it wraps over to 0000. It's an int, and you pretty print the values to supply leading zeroes.
Chris,
As I understand after the value 9999 it should roll over and start from 1000 reusing aliases that were not used/accessed recently.
Alias is returned as a string value after supplying with leading zeroes.
Chris Graham
commented Dec 06 '15, 11:51 p.m.
We just got the results back. It rolled over to 0000. That's not good.
Chris Graham
commented Dec 16 '15, 10:53 p.m.
|
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.