• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse CVS Synchronization

 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using Eclipse + CVS + XDoclet (code-gen) and this leads to tons of files being marked as modified after xdoclet runs, even though the files are in fact identical. Anyone know a good way to tell eclipse to ignore time stamps all together? I've all ready found the switch to compare contents although it hasn't helped.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is not a "problem" with Eclipse, but with CVS. And as far as I know, it can't be changed. (CVS will notice that there are no changes when you commit, though, and won't increase the revision number.)

The more general answer is that you shouldn't check generated code into source control. Ideally, generate the files into it's own directory and add that to .cvsignore.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I might add that it's good practice to always give generated code its own source directory subtree. Not only can you exclude it more easily from CVS, but also to do a totally clean install, you can simply delete everything in that directory and on down without nuking the non-generated code (since it would be elsewhere).

It's dangerous to delete a directory subtree in a CVS-managed project, since deleting the CVS management directories really annoys CVS. Ant has the ability to delete everything BUT the CVS (or svn) management directories, but a straight Windows File Manager delete (or equivalent) isn't that smart.

However, if you place a directory in the .cvsignore list, management directories won't get created, so you can delete with impunity.
 
Scott Selikoff
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ilja Preuss:
The more general answer is that you shouldn't check generated code into source control



I'm on the fence on this. In principle I agree, but when you're working with files like CMP beans that only get regenerated on a database change, it seems worthwhile (for tracking purposes) to keep them around.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scott,
I'm in the middle of the fence nicely balanced . For me, it depends where the code is generated from. I release CMPs and code generated from UML since I consider that first class code. I don't release ejb deployed code because that is the server's responsibility to deal with.

I've noticed the version of Eclipse I am using (don't have it on me to provide a version # with this comment), flags files as different that differ only by timestamp too. The interesting thing is that if I commit these changes, CVS or Eclipse is smart enough to ignore the update and doesn't increment the CVS version #.
 
I am displeased. You are no longer allowed to read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic