Eclipse and Mercurial with existing checkout

Posted in:

One very nice thing about Emacs – that you don't appreciate until you try alternatives – is that it is very unobtrusive. It doesn't try to take control of any of your projects. It takes your code as it finds it, and works from there.

I'm trying to get MercurialEclipse or HgEclipse to work with my existing project. In switching to Eclipse, it was actually relatively easy to persuade it that my code can stay where it is on my disk, and doesn't need to live inside the 'workspace' folder – you can use symlinks or the builtin 'linked resources' feature.

But now I want to persuade it to recognise one of these source folders as a Mercurial checkout. It seems the only way to do this is to use the "import" feature, or "share" the project - both of which do the wrong thing.

My setup is that inside a workspace folder (call it workspace1), I have a project defined (e.g. 'Django'). This project has a .project file with a 'linkedResources' to include the actual source, which is elsewhere:

devel/
 django/
   hg/
     trunk/
 workspaces/
   workspace1/
     Django/
       src/ (defined in .project as a link to devel/django/hg/trunk)
     python2.5

I simply want the Mercurial plugin to recognise that 'src' folder as a Mercurial checkout, which it is already.

All attempts at reverse engineering settings files etc. have failed. Has anyone achieved this?

It would certainly make IDEs much more attractive if they didn't insist on trying to manage everything for you. I'm a big boy, I don't want them to hold my hand as if this was the first time I had used Mercurial or worked on a project. And I'm certainly not going to move my code about on the disk to satisfy some IDE - I might change my mind and use something else next month, or I might want to use more than one IDE on the same project. IDE metadata needs to be completely separate from my source code.

Comments §

Comments should load when you scroll to here...