2011-09-09 10:00:00
Support for git's fast-import format in Veracity
Version 1.1 (coming sometime in the next few weeks) of Veracity will have support for import and export using the fast-import format popularized by git. (If you are interested in trying this feature before the 1.1 release, grab a recent nightly build.)
I was initially a bit resistant to having this feature. Getting people to switch from git to Veracity isn't really a big focus for us, so I didn't think we needed it.
But it seems like the fast-import format is becoming a de facto standard for interchange of version control data. In addition to git itself, it is now possible to export in this format from Mercurial, Bazaar, Subversion and Perforce. By supporting fast-import, we make it possible for a wide range of users to import their data and give Veracity a test drive.
Veracity can export into this format as well. Some people will try Veracity and decide it is not for them. They can export their Veracity repository into a fast-import file and take it to git or Mercurial or wherever they want. Hopefully that makes it a little less scary to give young Veracity a closer look.
Using fast-import with Veracity
To import into Veracity, first you need to get your repo into a fast-import file. The steps to do this will vary depending on what VCS you are using now. For example, from git, it looks something like this:
git fast-export --all --signed-tags=strip > ~/my_repository.fi
Then create a new Veracity repo using that import file:
vv fast-import ~/my_repository.fi name_of_new_repo
To go in the other direction:
vv fast-export name_of_repo ~/my_repository.fi
Which should produce a fast-import file that can be imported into whatever participating VCS you choose. For example, importing into git would look like this:
mkdir new_git_repo cd new_git_repo git init git fast-import < ~/my_repository.fi
Current state of the feature
This feature is new and is currently being tested. I won't be surprised if there are some wrinkles that need to be ironed out. But we've successfully handled some significant test cases.
- We have exported the Perl repository (with 24 years of history) from git and then imported it into Veracity.
- We have exported the Mercurial repo from hg (using hg-fast-export) and then imported it into Veracity.
- We have exported the Veracity repo from Veracity and then imported it into git.
- We have not yet tested interoperability with other tools like Subversion or Bazaar.
- Currently, incremental import and export are not supported.
Any questions about this feature should go to our Q&A area on the Veracity website.
Enjoy!