开发者

how to pop accurev stream by date?

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 rang开发者_如何学编程e" error on the update command.


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


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜