Recommended way to coordinate versions of multiple dependent mercurial repositories?

喜你入骨 提交于 2019-12-22 07:01:31

问题


Well, after many hours of reading and trial and error, it has finally hit me. Mercurial doesn't really want to do SubRepos...at least not with TortoiseHg and Bitbucket. If I am mistaken, and you don't want a down vote for a rude response similar to "of course it works, didn't you read the official docs", then please provide a simple example of how to do so via TortoiseHg latest that will successfully push to Bitbucket. Maybe a open source project that utilizes mercurial and bitbucket and subrepos?

All that said, if we keep our class libraries in seperate repos, and the recommended approach is to not use subrepos ("as a last resort"), what is the recommended way to capture a version for all dependent mercurial repos whereby i can quickly jump all dependency repos to the correct version for bug fixes and the like.

I suspect I would use Tags to tag a version. So, is the recommended way to manually go to all libraries and tag each repo with the common version tag and then revert back to that tag for all assemblies, manually?

Please refrain from all the of the technical jargon about the complexities of workflow management. There is a ton of great reading regarding this on SO. I am hoping for a simple single main exe project with a few DLL class libraries.


回答1:


Thanks to @SteveKaye, I have a working solution. When using TortoiseHg to "Add a subrepository", TortoiseHg was formatting the .hgsub file like this

subrepo = subrepo

instead of like his example

subrepo = ../subrepo

If someone would like to comment why the relative "../" is required, that would be great. My directory structure is the following:

MainRepo/
         .hgsub
         SubRepo/
         SubRepo2/

if "../SubRepo" is relative to .hgsub, wouldn't the ../ go up one directory and then look for the folder called SubRepo? Oh well, I can conform :) or be corrected if ../

Having Steve's example helped me to see what was off.



来源:https://stackoverflow.com/questions/13934437/recommended-way-to-coordinate-versions-of-multiple-dependent-mercurial-repositor

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