Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export Accurev to another VCS?

Does anyone know an easy way of exporting an Accurev 'depot' and its full history to, for example, git or mercurial? Or even via a 3rd party system? Unless I'm missing the obvious, I can't find anything via google.

If not, a bonus question, is it possible to build a git/mercurial repository based on patches with specific timestamps? In other words, just make accurev dump its history as a set of patches and import them into a repository.

like image 620
Barry Avatar asked Jun 11 '12 15:06

Barry


3 Answers

@jtalbott is definitely correct regarding the difficulty in fully converting the history of an AccuRev depot into another SCM, including git. However, if you're willing to live with converting a single stream (be it your depot's "root" stream or any other stream you decide to use as the conversion basis), have a look at https://github.com/rlaneve/accurev2git/. Note that is a very, very naive implementation, will take quite a bit of time for any sizable depot, and will thrash your hard drive excessively during the conversion. But, it does work, and I've used it to convert at least a couple of dozen AccuRev depots into git repositories.

Disclaimer: I wrote the tool a couple of years ago because I couldn't find an existing tool.

like image 77
Ryan LaNeve Avatar answered Nov 19 '22 12:11

Ryan LaNeve


Check out ac2git, a much more fully-featured Python conversion tool than ryan-laneve's accurev2git although we credit him with the original concept.

like image 25
parsley72 Avatar answered Nov 19 '22 12:11

parsley72


Your best bet in moving to another tool is going to be extracts from streams (or snapshots) and importing into the other tool. You won't have transactional annotate, log, etc, but you'll be able to build up history that way, and keep AccuRev around in case you need to go check something that wasn't specifically migrated.

AccuRev's Timesafe architecture guarantees that the requisite history is available to you, but much like migrating into AccuRev is traditionally done with baseline imports, I'd suspect that your cost/benefit ratio in doing the reverse wouldn't ever lead to full history as an option.

like image 2
jtalbott Avatar answered Nov 19 '22 12:11

jtalbott