Feanor
Feanor

Reputation: 2725

How to ignore the .classpath for Eclipse projects using Mercurial?

I'm trying to share a repository between my Mac (laptop) and PC (desktop). There are some external dependencies for the project that are stored on different places on each machine, and noted in the .classpath file in the Eclipse project. When the project changes are shared, the dependencies break. I'm trying to figure out how to keep this from happening.

I've tried using .hgignore with the following settings, among others, without success:

syntax: glob
*.classpath

Based on this question, it appears that the .hgignore file will not allow Mercurial to ignore files that are also committed to the repository. Is there another way around this? Other ways to configure the project to make it work?

Upvotes: 4

Views: 4635

Answers (1)

VonC
VonC

Reputation: 1326792

The file must not be already commited to be ignored (as you noted in your question), other wise a 'hg remove -Af .classpath' is required to remove it from the repo without removing it from your local working tree.

And:

syntax: glob
.classpath

should be enough (no '*' needed)

Upvotes: 6

Related Questions