0

I need to migrate git repo to AccuRev and I never used AccuRev before no idea how to do it. I searched in AccuRev and didn't find any documents as such. I do see posts on migrating from other SVN to Git but not from git to AccuRev. Please let me know is there any documentation available for this. Thanks.

user1653027
  • 789
  • 1
  • 16
  • 38
  • Firstly I would ask why, and are you really, really, really sure? There are very few tools that integrate with AccuRev and no conversion tools that I know of (other than [ac2git](https://github.com/orao/ac2git) which I wrote). If you still want to do it can you tell us if your git repo is simple with few branches or more complex with merged branches? Accurev streams don't map directly to branches and you might have to roll your own tool, which is not ideal. – nonsensickle Aug 16 '15 at 11:17
  • Why on gods green earth would you want to do this? Did you lose a bet or something? – n4rzul Aug 25 '20 at 13:12

1 Answers1

3

There are two approaches. One would be to continue to use git and tie it together with GitCentric an AccuRev product.

The other approach is to pull out of git the oldest content you want and the import it into AccuRev. Repeat for the next oldest content until you have everything you need. Details below.

  1. Make a workspace off of the stream you are importing to
  2. FIRST BASELINE
  3. Extract Baseline1 from the git and copy into workspace
  4. accurev add -x
  5. accurev promote -d
  6. Make the Baseline1 snapshot
  7. ALL SUBSEQUENT BASELINES
  8. Delete the contents of the workspace
  9. Extract Baseline2 from git and copy into workspace
  10. accurev add -x (adds any new files added between Baseline1 and Baseline2)
  11. accurev stat -m -O -fl > /tmp/modified.txt (this will find all modified files and look for ones with older timestamps as well)
  12. accurev keep -c "" -l /tmp/modified.txt
  13. accurev stat -M -fl > /tmp/missing.txt (this will find all missing files...removed between baselines)
  14. accurev defunct -l /tmp/missing.txt
  15. accurev promote –d
  16. accurev update
  17. Make the Baseline2 snapshot
  18. Rinse-lather-repeat for ALL SUBSEQUENT BASELINES

Dave

David Howland
  • 402
  • 2
  • 3
  • This is really helpful, please let me know how to do the same in console not the command tool, sorry I am using this AccuRev very first time and what I have is the AccuRev UI not the command tool... thanks in advance – user1653027 May 13 '15 at 15:58