Does anyone know how to promote (change the owner) a snapshot VIA comand line?
Accepted answer
In RTC 2.0 the only way to do this was to use the RTC Eclipse client. You use "Search" --> "Jazz Source Control" --> "Snapshots" then run a query to have the Search view populated with snapshots. Then you can right-click and use a "Promote" action. (Note: in a later RTC release this action was renamed to 'Set Owner...").
In RTC 3.0.1 the ability to change the snapshot owner was introduced.
scm snapshot promote <stream alias/name/uuid> <snapshot alias/name/uuid>
In a later release (RTC 4.0.5 I believe), the terminology of "snapshot promotion" was deprecated (since EE uses the term 'promotion'). Documentation, the CLI and Eclipse/VS actions now refer to this as setting the snapshot owner. Thus the following CLI command was made available to set the snapshot owner.
scm set attr -s <snapshot alias/name/uuid> --ownedby <stream alias/name/uuid>
One other answer
Hi, RTC 3.0.1 provides a snapshot promote command:
http://publib.boulder.ibm.com/infocenter/clmhelp/v3r0m1/topic/com.ibm.team.scm.doc/topics/r_scm_cli_snapshot_promote.html
I am not sure about previous versions.
Comments
Hi, RTC 2 doesn't have this. How can we do this in 2?
I think it is new in 3.0. If the 2.0 help does not have this command the only way to try would be to write something using the Plain Java Client Library.
In RTC 2.x if you find the Snapshots via search or view, right-click and I think there is a Promote option there.
-Sean
scm snapshot promote -r URI -u <username> -P <password> <stream> <snapshot name>