Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to pop accurev stream by date?

Tags:

accurev

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.

like image 981
Bryan Oakley Avatar asked Aug 16 '10 18:08

Bryan Oakley


3 Answers

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...

like image 86
jtalbott Avatar answered Nov 02 '22 05:11

jtalbott


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

like image 8
user129236 Avatar answered Nov 02 '22 06:11

user129236


You can do this from the command line without having to create a stream as follows

accurev pop -R -v stream_name -L c:\MyDirectory -t "2012/11/01 00:00:00" \.\

This will retrieve all the files from the stream stream_name as they were on Nov 1st 2012 and place them into c:\MyDirectory

The -t parameter can also take a transaction number, so you could specify -t 12345. The final parameter \.\ means the root - you can specify any path in Accurev, such as \.\MyProject\src

like image 5
Stephen Nutt Avatar answered Nov 02 '22 06:11

Stephen Nutt