Mercurial Check In Process With Maven

Many projects I have been on have used Mercurial for repository control, so checking in is a two stage process: 1) commit to your local copy of the repository and 2) push to the central repository. Following the check in procedure before pushing code can help ensure the build does not break.

Prerequisite

All of the code runs and passes a user smoke test, and all of the tests run in the IDE.

Check In Procedure

  1. Do an hg pull –u (or IDE pull/merge).
  2. If you have any merges/conflicts fix them, smoke test and then hg pull –u (or IDE pull/merge) again, repeating process until you have a clean & quick pull and update so you don’t have to test – other people may be checking in etc.
  3. Commit your changes hg commit –m “<checkin message>” (or IDE commit).
  4. Run the FULL maven build: mvn –e clean install site
  5. If the build succeeds, hg push (check in) the code to the central repository.

As usual . . . EVERYONE on the team has to follow a process like this; it keeps the timing down so there aren’t any checkins while you’re running the build.

Comments are closed.