Using the Mercurial hgsubversion extension with SV

2019-06-28 01:07发布

I'm using Mercurial to talk to a Subversion repository, and the repository is currently using SVN externals to pull in another repository.

hgsubversion works really well for communicating with the repository, but it doesn't seem to work with SVN Externals. Is there a way to configure it to work with this?

EDIT: Partial Solution

SVN Externals can be pulled down just fine. In your repository, add a new file called .hgsvnexternals (if Windows is complaining about not having a file name when you create it, try running copy .hgignore .hgsvnexternals). It is finicky about whitespace, and should contain text like the following sample:

[.]
 MyExternalProject svn://some.url/svn/MyExternalProject/trunk

There's a space at the beginning of the line, and between the name and the URL. If the spacing isn't right, nothing works. After adding this to the file, go back to the command line and run:

hg svn updateexternals

It should then fetch the external from Subversion. The new problem is that hg status will now show all of the "new" files with ? in front of them.

Q: Do you hg add them to the repository, or add the external files to .hgignore?

Trying either option leads to the same problem. I can't hg push my changes to the clone's master.

1条回答
家丑人穷心不美
2楼-- · 2019-06-28 01:18

It works, but only with standard layout (that is, trunk/branches/tags) clones. We need to get some bugs fixed against standard layout before it'll work.

Look for some new docs in the next few days (or check the hgsubversion maillist archives for the patch threads) on externals.

查看更多
登录 后发表回答