On Wed, Dec 23, 2009 at 10:21, Bob Archer <Bob.Archer_at_amsi.com> wrote:
>> 2009/12/23 Bob Archer <Bob.Archer_at_amsi.com>
>> > On Dec 23, 2009, at 00:45, Julian Mitchell wrote:
>> > > The project that I am working on utilises a code generation
>> > The header of every source file includes a comment with a
>> > stamp of when it was generated. The problem is that every time
>> > code is generated the svn change check algorithm marks all files
>> > having been changed even though only a handful have actually had
>> > actual code changes.
>> > >
>> > > Is there a way to tailor the change check algorithm with, say,
>> > regex, to ignore certain contents of a text file e.g. comment
>> > lines?
>> > To my knowledge, there is not. You could consider writing a
>> > side script that committers should run before checking in source,
>> > to normalize such comment lines e.g. to remove the date/time. You
>> > could also write a companion server-side hook script to reject
>> > commit where the only difference is such a comment line.
>> I think the current wisdom is, don't source control files that can
>> be generated. So, for the same reason you [usually] don't store
>> binaries that you build from your source don't store code files
>> that are generated. Make the generation part of the build so that
>> any dev running the build script gets the files generated for them.
>> Thanks for both your input.
>> Ryan - is there a convenient place to hook in to the client side? I
>> would like to catch this prior it to being displayed as a
>> Bob - you are correct and I agree with you however the generation
>> process takes a while (30s - 1minute) and the controlled package
>> files are ghastly to diff from a code readability perspective.
> Hmm... I see. Can you possibly put the results of the genned code onto a shared location so the devs can just pull the latest down rather than needing to take... wait 30 SECONDS?
30 seconds is nothing, really. My primary app takes 25 minutes to
deploy into Tomcat whenever I'm doing a code/test cycle on my laptop.
If an extra step added 30 seconds, it'd make no difference to me.
Received on 2009-12-23 16:38:30 CET