Skip to content

Source Branches and JDOM2

rolfl edited this page Sep 1, 2011 · 3 revisions

The migration from CVS to GitHub was done using a single 'master' branch. This branch represented the most current state of the CVS as at the end of the JDOM 1.1.1 code cycle.

The 'standard' development model for JDOM in GitHub will be to keep development on the master branch, and then create a version branch when needed.

Currently branches exist for JDOM 1.0, JDOM 1.1, and JDOM 1.1.1

If need be, these branches can be used for future releases on the pre-JDOM2.0 code. (perhaps a 1.1.2 release, or something). Also, they can be used to easily inspect the code state at those points in time.

The JDOM 1.1.1 branch was easy to create, but relies on it being the very first action after migrating from CVS:

git checkout -b jdom-1.1.1
git push origin jdom-1.1.1

for previous versions (1.1 and 1.0) the full history of JDOM was inspected and the build notes/dates of the releases correlated to the JDOM history. Then, it became:

git checkout -b jdom-1.1 d87a05437ce136214f9334c8312453593f7db8c3
git push origin jdom-1.1

and

git checkout -b jdom-1.0 7c3b7a90529c404121363ed47a1548274fcbc648
git push origin jdom-1.0

The JDOM2 development will be done on the master branch now.

UPDATE - Creating the JDOM-1.1.2 branch

The above process set up a branch for each o the released versions of JDOM. This is actually the wrong way to do things. I should have used tags to mark each release. Now, what we really want to do for JDOM-1.1.2 is to work on what is currently called the jdom-1.1.1 branch.

We need to conver the jdom-1.1.1 branch in to a jdom-1.1.1 tag (which should actually be at the previous commit because one small commit was made to JDOM after the 1.1.1 release was built), and create a new 1.1.2 branch (which will culminate in the 1.1.2 tag.

Because this process may repeat (i.e. there may be a JDOM-1.1.3) it makes sense to not call the branch 1.1.2, but to just call it jdom-1.x, which will have as many 1.x tags as needed.

So, procdure is:

  1. delete current 1.1.1 branch.
  2. create new branch jdom-1.x where jdom-1.1.1 used to be.
  3. create tag jdom-1.1.1 one version earlier than where the tag used to be.

Here are the steps:

 # remove current jdom-1.1.1 branch - push 'nothing' in to jdom-1.1.1 branch
 git push origin :jdom-1.1.1

 # create tag on previous version
 git tag -m "This is JDOM-1.1.1" jdom-1.1.1 4d5288443be604cb4d26
 git push --tags

 # create new jdom-1.x branch where jdom-1.1.1 used to be
 git checkout -b jdom-1.x ea30b1e2b614f4b7d49d
 git push origin jdom-1.x

 # Create a simple Readme file.
 vi README.txt
 git add README.txt
 git status
 git commit -m "Initial commit of simple README file on jdom-1.x branch" -v
 git push
Clone this wiki locally