开发者

Pulling changes from a bugfixing Maven project in Mercurial w/o pulling the pom.xml

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 ca开发者_运维百科n 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?


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:

... --- [1.0-SNAPSHOT] --- [1.0] --- [1.1-SNAPSHOT] ----- [M1] -- ... -- [M2]
                               \                         /              /
                                [bugfix 1] --- [bugfix 2] --- [bugfix 3]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜