[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion and Delphi

From: Jeremy Pereira <jeremyp_at_jeremyp.net>
Date: 2007-10-05 12:09:45 CEST

On 1 Oct 2007, at 19:24, Steve_Whitehead@jbhunt.com wrote:

>
> Does Subversion has any option that we can set so that it will us
> the time stamp of the file instead of the time stamp when the file
> was checked out.
>
> Here is the reason why I am asking this question,
>
> I have added Delphi project to SVN repository.All the files in
> this project were modified some time in April 2007 or before . But
> when I checked out this files from SVN the time stamp on all this
> files is showing as current time stamp.
>
> This might cause a problem while we build Delphi packages. Normally
> during our Delphi build process, we will compile all the source
> code and get dcu's(Delphi compiled units .. just like class files
> in java), Delphi will give you the dcu's for the files that have
> changed, based on this DCU's we will be able to decide which
> packages to build for the changes made and promote only those
> packages.
>
> But if the time stamp on the source file is changed Delphi will try
> to compile all the DCU's and we will have to build all the Delphi
> packages every time .

Actually, it won't. When you first check out the project, there are
no DCU's so it really doesn't matter what the time stamps on the
source files are - everything is going to get compiled. on
subsequent updates, only the source files that get updated from the
repository will have changed time stamps, but that is exactly what
you want. Suppose person A and person B both check out a source code
file.

Person A modifies the file compiles it and commits it.

Then person B compiles the file.

Person B updates the working copy bringing person A's changes in.

Under the current scheme if person B does a compilation now, the
newer time stamp from the update will be noticed and the source file
compiled. If the source file date is set to the time when person A
changed it, or even committed it, nothing will happen when person B
compiles it. Even worse, on a large project with many source files,
person B may not notice that the updated file has been skipped.

If you've put the DCU's into Subversion, I strongly recommend you
take them out again. It's possible that they would change every time
you do a compile (if they contain a time stamp, for instance) even if
you don't change the source which generates unnecessary revisions.
Furthermore, you'd have to enforce a strict "make sure you compile
just before you commit" rule on your developers in order to make sure
that the compiled code was generated from the source code in the same
revision.

All the above is not to say that there aren't situations where
preserving the modification time of a file is not a useful thing to
have (just check back through the archives of the list, the feature
has been discussed at length many times), but managing source code
that will be compiled is not one of them.

>
>
>
> Steve Whitehead
> ________________________
> Steve_Whitehead@jbhunt.com
> 479 - 820 - 8859 (office)
> 479 - 820 - 3418 (fax)
>
> Some people wear Superman pajamas.
> Superman wears Chuck Norris pajamas
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Oct 5 12:11:02 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.