开发者

Can I get a Mercurial with Subversion subrepository to automatically check out?

I've set up a Mercurial repository that has a subversion subrepository. I've configured an .hgsub file so that Mercurial is aware of that repository. However, I was expecting that Merc开发者_高级运维urial could trigger an svn update automatically whenever I did a pull on the repository.

Is this possible with Mercurial subversion repositories? If not, what's the advantage of having the .hgsub file at all as opposed to placing that subdirectory in .hgignore?


Mercurial does not automatically pull/update subrepos. From hg help subrepos:

Subrepos do not automatically track the latest changeset of their sources. Instead, they are updated to the changeset that corresponds with the changeset checked out in the top-level changeset. This is so developers always get a consistent set of compatible code and libraries when they update.

Thus, updating subrepos is a manual process. Simply check out target subrepo at the desired revision, test in the top-level repo, then commit in the parent repository to record the new combination.

Placing the repo in .hgignore would not allow you to track which version of the subrepo is compatible/tested with each version of the parent.

In SVN terms, this is similar to create an svn:external link which is bound to a specific SVN revision.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜