views:

198

answers:

1

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?

+2  A: 

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)

VonC
VonC: Like I said, that was only one of the settings I tried; I thought the one you recommended would be enough as well, but tried others in hopes of finding a solution. Thanks for the info.
Feanor
Just tried this and it worked absolutely perfectly. Thanks so much for a great answer.
Feanor
you can also use hg forget to do hg remove -Af
jk