views:

26

answers:

1

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?

+1  A: 

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]
Martin Geisler
What happens if the bugfixes are released with updated version numbers in the POM? How can I prevent these version numbers from propagating to the development repository?
xmjx