RTC SCM aliasId - String or Int?
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
Comments
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.
1000-9999 - then what?
The value 0023 was seen in the wild, using 4.0.2.
And you did not answer the fundamental question, is it a string or an int?
The scm associate was used, and it needed "0023" and not "23" - which was not recognised as a valid value. So I'm thinking internally it is a string, or there is a bug in the way that the values are parsed.
Ideally, I'm trying to preserve backwards compatibility with V3 (and I'm not sure if -u was available then).
Here is the (edited to protect the names of the guilty) actual output of a scm status command:
Chris,
We just got the results back. It rolled over to 0000. That's not good.
I'd have guessed that your treating it as a string due to the "0023" != "23" comparison failure.
I'll put some logic in for some leading zero work.
-Chris