Using the Mercurial hgsubversion extension with SVN Externals

拟墨画扇 提交于 2019-12-10 16:08:29

问题


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:


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.



来源:https://stackoverflow.com/questions/3522317/using-the-mercurial-hgsubversion-extension-with-svn-externals

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!