Question

I am attempting to convert a rather large Subversion repository to Mercurial using hgsubversion. I almost have it working except that branches and tags are not being captured and the final Mercurial repository looks like this:

Repo
   > Trunk
       > Code
       > Database
       > Documentation

The command that I am running is:

hg clone --startrev 5802 --config hgsubversion.authormap=authors.txt --config hgsubversion.defaulthost=me.com file:///C:/Users/me/projects/MyProjectRepo MyProjectRepo-hgsvn5802

My Subversion repository is actually a mirrored and updated local mirror on the file system. This was done because running hgsubversion or convert was excruciatingly slow when accessing the URL directly. The repository is structured like so (note the uppercase first letters).

Repo
   > Branches
   > Tags
   > Trunk
       > Code
       > Database
       > Documentation

Any thoughts as to what I might be doing wrong? Are the Uppercase names causing the auto-branch detection to fail? Can I override where hgsubversion looks for Trunk, Tags, and Branches?

Was it helpful?

Solution

The uppercase letters are definitely the problem here. The easiest bet is probably to edit the hgsubversion source code so it looks for uppercased names, but I'd actually welcome a patch to make the trunk/tags/branches names configurable.

I could have sworn we had that feature, but I don't see it in the code so I'm probably just remembering a past proposal.

OTHER TIPS

I have not tried these myself, but the hgsubversion documentation describes a way to configure a custom Subversion structure.

hgsubversion.layout

Set the layout of the repository. standard assumes a normal trunk/branches/tags layout. single means that the entire repository is converted into a single branch. The default, auto, causes hgsubversion to assume a standard layout if any of trunk, branches, or tags exist within the specified directory on the server. custom causes hgsubversion to read the hgsubversionbranch config section to determine the repository layout.

Also check the hgsubversionbranch.*, hgsubversion.tagpaths, and hgsubversion.branchdir sections of the documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top