Source/ported changesets and determining newest version of a file
Ernest Crvich (192●1●21●19)
| asked Dec 20 '17, 2:11 p.m.
retagged Dec 25 '17, 1:53 p.m. by Ulf Arne Bister (1.3k●4●13) We have source code that takes a collection of IChangeSet objects (obtained by comparing one stream or workspace with another, basically getting the outgoing list of changes...but not necessarily ALL outgoing changes, sometimes only a subset of them, e.g. ones that are linked to a particular work item or list of work items) and tries to determine which version of a part is the newest in that set. To date, we've always used the changeset last-modified timestamp to determine which change to a part is newest.
|
One answer
I'd like to start by pointing out one thing; when a change set was created due to 'gaps', or if it has 'source change sets' (per the API you mentioned), this is usually an indication of 'parallel streams' or 'branches' if you will. So the whole talk about which is the 'real' change set, or the 'latest' change set doesn't really make sense, as the answer might be relative to which stream you are talking about.
Comments
Ernest Crvich
commented Feb 12 '18, 8:53 p.m.
Well, bear in mind that the list of changesets that we gather is specific to a single workspace or stream. For example, we get the current outgoing history (relative to another given stream, e.g. a specific outgoing flow target) for that workspace/stream, and then filter the list of changesets down to just the ones that are linked to work item(s) which the user wants to build/compile. So one work item might have an older change to a given part, while another work item might have a newer change, and the user wishes to include both work items in the build...and so we must determine the newest change to that part. To date, we have always done that by using the changeset timestamp to make that determination, since the file's timestamp and version are both completely unreliable for that purpose.
Ernest Crvich
commented Feb 12 '18, 8:53 p.m.
Ernest Crvich
commented Feb 12 '18, 8:54 p.m.
Hence why I'm curious if this is the best approach given the use case described in the first paragraph. The concern would be in determining which changeset's timestamp a given file within it should be associated, and thus which one (the "actual" changeset or its linked Source) is correct.
In all honesty, I'm having a difficulty understanding the requirements. Hopefully someone else can chime in.
"Resolve With Mine" is actually the case that originally led us to using the changeset timestamp instead of the file timestamp to make "newest" determination, and that works fine. Because that results in an older file time/version, but a newer changeset time. So to date, the changeset timestamp has been very reliable, and was recommended by RTC SCM developers in the past. It's only this "sourced" use case (which I'd never seen/heard of before) that has led to an amendment of the logic.
|
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.
Comments
bump
Anyone on the RTC SCM dev team willing to comment?