How to change the creation date of an existing snapshot?
Is ti possible to change the creation date of an existing snapshot?
ITeamRepository repo = ...
IBaselineSet snapshot = ...
BaselineSet workingCopy = (BaselineSet) snapshot.getWorkingCopy();
workingCopy.setCreationDate(timestamp);
IScmClient scmClient = (IScmClient) repo.getClientLibrary(IScmClient.class); // Anything like this?
scmClient.save(workingCopy, null);
Once the working copy has been updated, how can we save the item? We can't find any SCM client library...
We are going to create a lot of snapshot programmatically (from a software migration), but we need to maintain an original date, not the baselineset creation timestamp...
Thanks in advance.
Accepted answer
There is nothing on the client side which will allow you to save modifications to items like this.
Generally speaking, only server side code in the SCM component will be able to modify SCM items. There is no API to modify the creation date of a snapshot.
Sorry I don't have any suggestions for you.
Generally speaking, only server side code in the SCM component will be able to modify SCM items. There is no API to modify the creation date of a snapshot.
Sorry I don't have any suggestions for you.
Comments
1 vote