views:

225

answers:

2

I'm using Eclipse with C++ plugins on my macbook, trying some practice projects to improve my skills. I'd also like to test out Mercurial and get a taste of DVCS. Unfortunately, Eclipse + Mercurial + OSX seems to be a rare enough combination that there isn't a lot of helpful documentation out there.

What I've done so far:

  • Installed Mercurial SCM
  • Installed the HgEclipse plugin
  • Installed GnuPG
  • Set path to GnuPG and hg executables in Eclipse preferences > Team > Mercurial

I know I can turn a directory into an hg repository by navigating to that directory in terminal and using

hg init

and then I can add files with

hg add
hg commit

This should give me an hg repo with my files in it. So far, so good...but now I begin to falter.

How do I get HgEclipse pointed to my repo? My synchronize view has a Mercurial option, but when I select it, the Next button is grayed out, and the Finish button doesn't do anything...

Ideally, I would like to set up two local repositories, one personal and one "team" repo, so I can really evaluate Hg as this seems to be the popular configuration. Does HgEclipse only support commits to a single repo, or can it commit to the local repo and push to the "team" repo?

Any other suggestions from DVCS vets on how best to set up my environment?

+1  A: 

To point eclipse at your local repo there are two main ways.

  • File -> Import -> Mercurial -> Clone (Starting a new Project from a repo)
  • (right click Project) -> Team -> Share Project -> Mercurial

(see How to turn on Mercurial in existing Eclipse project ?)

When you are up and running you can Push/Pull to another repository via the Team push/pull menu item.

  • (right click Project) -> Team -> Pull ...
  • (right click Project) -> Team -> Push ...
David Holbrook
A: 

Ran through the setup steps again, following this excellent guide and everything is now working. I had a little trouble getting my brain around the fact that the eclipse workspace is itself a repository. With that set up, I was able to commit changes and push to another repository very easily.

sjohnston