9

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Barry
  • 606
  • 7
  • 13

5 Answers5

4

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

Ryan LaNeve
  • 1,214
  • 1
  • 10
  • 15
3

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

Community
  • 1
  • 1
parsley72
  • 8,449
  • 8
  • 65
  • 98
2

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.

jtalbott
  • 1,158
  • 6
  • 7
  • Unless one was already written for you. See [ac2git](https://github.com/orao/ac2git). I have spent the time to export AccuRev to Git because I want to get rid of it that much. Additionally, I do export the **full history** and even attempt to make it useful by mapping it to the git branching model as best as I can. It is still not perfect but it will be close enough for most people. – nonsensickle Sep 02 '15 at 00:45
1

Since the AccuRev paradigm is different from traditional branch-and-label tools, it would be a challenge to export a full history from an AccuRev depot into any other tool. The data is certainly accessible from AccuRev's side, but you'd have to write a comprehensive, logical extraction routine to pull it into another system. Anything that's been done by anyone else is probably very customized to their specific needs. A baseline export, using point-in-time configurations from AccuRev streams would be more feasible and straightforward.

May I ask what the end goal is? Would it be full migration away from AccuRev or are you just looking to be able to have users or teams make use of Git as a client instead of AccuRev? I bring this up because AccuRev just recently introduced a full Git integration platform called Kando. You can read about it yourself, but it might be what you're looking for.

Regards, ~James

jtalbott
  • 1,158
  • 6
  • 7
  • 5
    Given your post history, it would seem that you are affiliated with Accurev. Please make sure to disclose any affiliation with the product in question. – vcsjones Jun 11 '12 at 16:07
  • 1
    Agreed with @vcsjones - you seem to be an Accurev employee. – Barry Jun 11 '12 at 16:09
  • 1
    @jtalbott If kando allows me to clone an accurev depot as if it were a git repository, with full history, then this would be an accepted answer. If kando merely provides the reverse, i.e. allowing acgui.exe and the CLI to run on top of a git repository, then this isn't a solution. And in answer to your question the idea is to use other third party tools that do not work on top of accurev. – Barry Jun 11 '12 at 16:10
  • I am affiliated with AccuRev. I don't feel the need to disclose that on every post since I do not link or advertise, I merely answer relevant questions. Kando will Not export full history from AccuRev, the Git history would start at the point from which you clone the repo. However, the end result is that the end users get to use Git and Git only as their client. I'll let you take a look at Kando yourself to see if it's appropriate... – jtalbott Jun 11 '12 at 16:17
  • 1
    @jtalbott Thanks for confirming. Then kando isn't a solution for us as we need full history (`git annotate`, `git log`, etc.). – Barry Jun 11 '12 at 16:30
  • 1
    @Barry No problem. 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. – jtalbott Jun 11 '12 at 16:34
  • @jtalbott if you put your above comment as an answer, I'll accept that. Thanks. – Barry Jun 13 '12 at 08:02
  • 5
    @jtalbott I disagree. I would recommend from now on including your affiliation with certain products. You made a product recommendation, Kando, which you are clearly biased towards because of your affiliation. – vcsjones Jun 13 '12 at 14:18
  • @jtalbott Your comment _"a full Git integration platform called Kando"_ is incorrect. It is **not** a **full** git integration if it doesn't have the full history. Until this is either rectified or your affiliation noted in your answer -1. In the interest of not being a hypocrite I'm the author of [ac2git](https://github.com/orao/ac2git). – nonsensickle Sep 02 '15 at 00:35
-1

AC2GIT conversion is one of the best conversion tool i have seen when it comes to accurev to git migration. very stable https://github.com/orao/ac2git