How can I move a snapshot without deleting the stream?
Accepted answer
To change the stream/workspace of the snapshot, in 4.0.5, you can use the:
scm set attributes --snapshot --ownedby <stream/workspace> ...
command.
In earlier RTC versions, you would use the:
scm snapshot promote <stream/workspace> ...
command.
Comments
The second method for my 4.0.3 version worked great. Thank you!
Hm - just an update to my understanding, you probably already realized this. Promote puts them in the destination stream/workspace but does not remove them from the source stream/workspace. I'm not sure this will solve my issue since the build snapshot will still "want" to be promoted like the rest of the code. Well, actually maybe now that it's in the other stream I can delete it. Sorry to be thinking out loud, in any case I didn't know about this functionality and somehow I think it will work.. :)
My understanding is that "promote" does "move" the snapshot from the original stream/workspace to the specified stream/workspace (it just modifies the "owner" property, and "owner" is a single valued property). And whether or not you can delete a snapshot depends on your permission in the team area that owns the stream that owns the snapshot.
Comments
Sonia Dimitrov
JAZZ DEVELOPER Feb 26 '14, 11:24 a.m.Hi Andy,
could you elaborate on "We used to just compare the snapshot to the stream but found that we need more data for downstream forensics so now we snapshot the flow target stream and compare the snapshots" - when is the snapshot on the stream created?
Sonia
Andy Jewell
Feb 26 '14, 11:53 a.m.Hi, Sonia. . . in general when i say "downstream forensics", I'm referring to build and process troubleshooting where we want to know why things happened like they did. What we find is that though we can look at a file history, that file history is the same in any stream (albeit with different subsets of the same history). In brief, it's hard to say exactly when and by whom something was delivered (besides the "hoover over changeset" approach). This information is not in "Stream events" (would be nice if it were!). Programmatically the only way to get at a changeset differential is to compare a stream to a stream or a snapshot to a snapshot, etc. Because it's not possible (that I'm aware of) to create a snapshot from a timestamp, if we want to know what was in the target stream at the time of delivery we need to snapshot the target stream. Otherwise, when our logs show "compare snapshot snap1 stream tgtstream" it doesn't tell us enough (because we don't know the state of the stream at that time). So we snapshot the target stream at build time.
Andy Jewell
Feb 26 '14, 11:53 a.m.General update on the question, since I can't find any way to move a snapshot and the question as written presumes a snapshot can be moved, I'll reword the question for that purpose. I had assumed it was somehow possible because it does it through the UI when you delete a stream ("select a new stream to store the snapshots").