codingatty
codingatty

Reputation: 2084

Starting using mercurial, want to track existing versions

I'm essentially a spare-time programmer. I wrote an Android math app for my kids that I developed under Eclipse, and up to now have two releases of it: the first working one (0.2), and a second (0.3) incorporating changes requested by Maddy, my 7-year-old customer and beta tester. And now Jenny, the five-year old, has her feature list.

Up to now, I've done version control by the simple expedient of copying the entire directory of the working 0.2 release and naming it with a suffix "-0.2"; and then going to work on the next one. But now I'd like to start using Mercurial to do source control. The thing is, I'd like to be able to start tracking, not starting at my current 0.3 level, but from my prior 0.2 level. (I didn't save the 0.1.)

My plan for this is to make a copy of the 0.2 directory, and then turn that into a Mercurial repository. Once 0.2 is committed, I'll replace the four or so text files I edit (one Java, a few XMLs) from the 0.3 directory, and then commit to the 0.3 level.

Then I can move that directory into my Eclipse workspace and edit as normal, committing when I get to the 0.4 release with Jenny's changes. I plan on initially doing all the Mercurial stuff outside of Eclipse, until I have my feet wet with it; then I'll look into the Eclipse Mercurial plugins and stuff.

Does this approach make sense, or am I setting myself up to shoot myself in the foot?

Upvotes: 1

Views: 96

Answers (1)

Franci Penov
Franci Penov

Reputation: 76001

That's pretty much the way to do it. Since you don't have saved state of the app before your 0.2 release, that's going to be your initial commit to the repo. Then you current working directory will be also a single commit on top of it. After that is just business as usual with the repo.

Don't forget to create tags for the releases, as you go. This would allow you to quickly identify later in the Mercurial history the important release checkpoints and be able to branch off them for hotfixes (if needed). Though I don't expect this to be really needed before you reach 0.9 and start getting ready for 1.0 release, while still moving forward with 2.0 features.

Upvotes: 2

Related Questions