Clone wiki

hgsubversion / Caveats

Caveats & Limitations

Trying to wrap one large, complex piece of software (Subversion) behind another (Mercurial) is bound to expose some rough edges. Here are some you might want to know about.

Empty Subversion project

You can't push changesets from Mercurial to an empty Subversion directory. This means it's not possible to do something like this:

svn mkdir --parents -m "add newproject" svn+ssh://{trunk,branches,tags}
hg clone svn+ssh://

and then commit and push from the hgsubversion clone. It just doesn't work. The problem is that Mercurial doesn't track directories, so the Subversion revision that creates newproject does not exist in the Mercurial clone. But hgsubversion needs at least one Subversion-derived changeset to know where to create new revisions when you push. So when you push from an hgsubversion clone with no Subversion-derived changesets, hgsubversion doesn't know what to do.

The workaround: you need actual files in Subversion to get a Mercurial changeset in the clone. So create your Subversion project, commit a revision with at least one file in it, and then clone it with hgsubversion.