Reputation: 6326
Can someone point me to a recipe for creating a Mercurial repos from a Subversion checkout
by recursively adding all files except those in .svn directories?
I imagine it looks something like hg add --exclude PATTERN
for some pattern like .svn
.
Does a Subversion checkout have any "special" files besides those in the .svn directories? If so, I'll need the recipe to to exclude those too. Thanks.
Upvotes: 1
Views: 91
Reputation: 26759
It sounds like you're trying to export a Subversion repository to Mercurial. Try Mercurial's convert extension. It ships with Mercurial. We've used it to convert between Mercurial repositories. It will pick up where the last convert left off. I.e., when you re-run it against an already converted repository, it will only convert commits that haven't been converted.
Upvotes: 0
Reputation: 3276
If you want to use mercurial locally, but interact with a remote SVN repository, you can use the hgsvn or hgsubversion extensions to push/pull changesets between the two.
Upvotes: 1
Reputation: 72890
Easiest way is to do a Subversion export rather than a checkout, then you just get the directory structure you want, without the .svn folders.
If you have to use a checkout, then add this to a file in the root called .hgignore
before you add to Mercurial:
syntax: glob
.svn
This file identifies files and directories that Mercurial should not attempt to put under version control, in this case all the .svn directories.
Upvotes: 3