tags:

views:

73

answers:

3

I want to do some analysis on some old code and need to be able to pop a stream as of a specific date. I don't want to create a snapshot or workspace, I just need all the source code as of six months ago. Is there an easy way to do it?

At this point in my research I'm thinking I might need to use the hist command to get the latest transaction as of a given date, create a reftree, then do an update to that transaction number. However, when I do that I get a "Given update transaction out of range" error on the update command.

+2  A: 

create a child stream with a time rule. Then pop from that. You can do it from the GUI. Here's the CLI.

$ mkdir code && cd code $ accurev mkstream -s <Child> -b <Parent> -t "<Time>" # format: YYYY/MM/DD HH:MM:SS $ accurev pop -R -v <Child> -L . .

If you name it generically, you can reparent/reuse elsewhere to do your time-based pops. So for the most poart, you only need one stream (e.g. you don't need a time stream for every hist based pop).

$ accurev chstream -s <Child> -b <NewParent> -t "<NewTime>"

HTH - dave

@davidpthomas: thanks, but I don't think that will work for me. I have 50+ depots I need to work with and don't want to have to create a new stream in every one of those depots.
Bryan Oakley
After lots of research I discovered this is the only way to do it, so I buckled down and created all those streams (or rather, have a script that creates them).
Bryan Oakley
+1  A: 

Similar to what Dave has described, AccuRev has a blog post that discusses this same topic a bit more in-depth:

http://www.accurev.com/blog/2007/10/24/accurev-timesafe-makes-retrieving-code-from-anywhen-easy/

Cheers, ~James

jtalbott
+2  A: 

Incidentally, AccuRev 4.9 adds the functionality to "pop -t" and specify a point-in-time to populate the code "as of". This should address what you're looking for going forward...

jtalbott
@jtalbott: Thanks, that's exactly what I needed. However, we're on 4.6.2 (migrating to 4.8.0 tonight) so I can't use it.
Bryan Oakley