handle OS specific .classpath file in a hg repo

I have a Java project in Eclipse and version-control is a mercurial repo. From several environments (Linux/Windows/MacOSX) I'm working with this same repo.

Problem is that in the .classpath file I've one line which is specific for the MacOSX environment and differs for the other environments. Still I don't want to put .classpath the ignore flag in version control.

I'm thinking of e.g. a mercurial extension on my MacOSX environment to tell mercurial to ignore this one specific line in .classpath but still sync everything else.

For all other environments (Linux/Windows) it's important that no changes are needed here.

Answers


One workflow-changing approach would be to switch your project to use something like Maven to manage your classpath and dependencies. Then you can use m2eclipse to automatically import it into Eclipse on each machine and automatically generate the appropriate project settings and classpath.


Need Your Help

C++ Initialization of static variables (Once again)

c++ variables static initialization

If I have two static variables in different compilation units, then their initialization order is not defined. This lesson is well learned.

Is there a Dojo list container that sorts child widgets automatically?

list containers dojo sorted

I'd like a graphical container that I can add and remove my custom widgets to where I can set a sort function that is automatically applied when these operations take place.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.