It's all about the answers!

Ask a question

How to checkout (Load) files by date


Enrique Gaona (13462426) | asked Jan 05 '10, 10:05 p.m.
Hi,
Not sure if this has been asked before in this forum, but I wanted to find out if there's a way of checking out files from a particular stream by specifying a date. I need to checkout the files for all the components of a given project on November 30, 2009. Is this doable in RTC?

Thanks.

5 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Jan 06 '10, 10:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
This functionality is requested in work item 86931 (please feel free to
add your support/interest via a comment on that work item).

But you can come close with some amount of effort.

In particular, you would accept the stream into a workspace.
Then for each component in the workspace:
Show the component in the history view (which shows you a linear
sequence of change sets)
Multi-select all the change sets later than the date you want to see.
Apply the "discard" operation to that selection.

The reason I say "come close" is that the date displayed for the change
set is the date that change-set was created, not the date that change
set was added to the stream. But this lets you narrow down to a small
set of change sets, and then you can use the name/description of the
change-sets to decide which ones to discard.

Of course it would be a lot nicer to just be able to say "roll this
workspace back to the state it had on a given date".

Cheers,
Geoff



egaona wrote:
Hi,
Not sure if this has been asked before in this forum, but I wanted to
find out if there's a way of checking out files from a particular
stream by specifying a date. I need to checkout the files for all
the components of a given project on November 30, 2009. Is this
doable in RTC?

Thanks.

permanent link
Evan Hughes (2.4k1318) | answered Jan 07 '10, 9:47 a.m.
JAZZ DEVELOPER
I need to checkout the files for all the components of a given project on November 30, 2009. Is this doable in RTC?


What's your use case? What has prompted you to be interested in that date in particular?

On the RTC dev team, we make use of snapshots and baselines to identify interesting points in a stream's life. We have snapshots autogenerated by builds that we promote for releases, and baselines for our contributions to other streams.

If you're following a similar practice, I suggest that you find a snapshot or baseline in the stream that is close to November 30 and create a new workspace from that. Alternatively you could replace your components with each of those.

hth
e

permanent link
Enrique Gaona (13462426) | answered Jan 07 '10, 10:26 a.m.
This functionality is requested in work item 86931 (please feel free to
add your support/interest via a comment on that work item).

But you can come close with some amount of effort.

In particular, you would accept the stream into a workspace.
Then for each component in the workspace:
Show the component in the history view (which shows you a linear
sequence of change sets)
Multi-select all the change sets later than the date you want to see.
Apply the "discard" operation to that selection.

The reason I say "come close" is that the date displayed for the change
set is the date that change-set was created, not the date that change
set was added to the stream. But this lets you narrow down to a small
set of change sets, and then you can use the name/description of the
change-sets to decide which ones to discard.

Of course it would be a lot nicer to just be able to say "roll this
workspace back to the state it had on a given date".

Cheers,
Geoff



egaona wrote:
Hi,
Not sure if this has been asked before in this forum, but I wanted to
find out if there's a way of checking out files from a particular
stream by specifying a date. I need to checkout the files for all
the components of a given project on November 30, 2009. Is this
doable in RTC?

Thanks.

Geoff, thanks for the info, will try using the process you just mentioned.

@echughes: The Nov 30th is a sample date, it could be any date. I get a lot of requests from project managers and development leads to run kloc reports between 2 source trees. Where the first tree is from 2 - 3 months back and the second is the latest code.

You mentioned you have snapshots autogenerated by builds? We're using Maven for our builds. Is there a command line I can use to create snapshots? Something like cvs's rtag command. If I can do this in Maven, it'll solve my problem. Thanks in advance.

Enrique

permanent link
William Byrne (5545) | answered Feb 20 '10, 1:09 a.m.
Is there a command line I can use to create snapshots?



scm help create

permanent link
David Lafreniere (4.8k7) | answered Nov 24 '10, 12:08 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

You mentioned you have snapshots autogenerated by builds? We're using Maven for our builds. Is there a command line I can use to create snapshots? Something like cvs's rtag command. If I can do this in Maven, it'll solve my problem. Thanks in advance.
Enrique


You could use a command line command as suggested above to create a snapshot, or if you kick off a build from RTC and have it automatically generate a snapshot for you. It is also still possible to use Maven as well to build everything. Take a look through this article if you haven't already (http://jazz.net/wiki/bin/view/Main/MavenBuild). You can add the "Jazz Source Control" configuration element (tab) to a Maven Build definition, this will automate the accepting and loading of source from a build workspace or stream. This will automatically create a snapshot for you, for extra traceability. Once all the source is loaded you can use the "Maven" configuration element (tab) to run what ever maven goals/plugins you normally run. Plus in the article, we describe how you can publish all the build artifacts (junit results / compile logs / other logs / zips, etc) back to the build result so not only can you retrieve the 'snapshot' source, but see a wide range of rich build result information as well. This can by done by invoking specific pre-created Jazz Build Ant tasks from right inside of a Maven pom.xml.

Your answer


Register or to post 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.