从 Mercurial 中的错误修复 Maven 项目中提取更改,而不提取 pom.xml
我维护一个使用 Mercurial 进行版本控制并使用 Maven 进行管理的项目。
当我们发布 1.0 版本时,我们克隆了一个发布存储库,其中包含错误修复并在主存储库上继续开发。发布存储库的 POM 为 1.0 版本,而开发存储库的 POM 为 1.1-SNAPSHOT 版本。
现在,如何将错误修复从发布存储库拉到开发存储库,而不影响开发版本 POM 中的版本号?
I maintain a project that is versioned with Mercurial and managed with Maven.
When we released version 1.0, we cloned a release repository that would contain bugfixes and continued development on the main repository. The release repo had version 1.0 in the POM while the development repo had version 1.1-SNAPSHOT.
Now, how can I pull bug fixes from the release repository into the development repository without also affecting the version number in the POM of the development version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您将更改拉入开发存储库时,您必须进行合并。如果你更改了两个存储库中的 POM,那么你必须在第一次合并时解决合并冲突 - 解决它以让 1.1-SNAPSHOT 获胜,稍后再拉取并合并时就可以了。
顺便说一句,我实际上希望您首先将 POM 更改为版本 1.0,然后分支发布存储库,然后将其从 1.0 更改为 1.1-SNAPSHOT。这样,当您将错误修复拉入开发存储库时,就不会出现任何冲突。
历史看起来像这样:
When you pull changes into the development repository you have to do a merge. If you have changed the POM in both repositories, then you have to resolve the merge conflict the first time you merge -- resolve it to let the 1.1-SNAPSHOT win, and you will be fine when you pull and merge again at a later time.
By the way, I would actually expect you to change the POM to version 1.0 first, then branch off the release repository, and then change it from 1.0 to 1.1-SNAPSHOT. That way you wont have any conflict at all when you pull bugfixes into the development repository.
The history would look like this: