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

Re: Can Subversion tweak files during a commit?

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-11-30 00:13:08 CET

On Nov 29, 2005, at 20:50, x nooby wrote:

> a datafile. Our current Version control system allows
> a directive to be inserted in to the header file that
> will cause a timestamp to be updated whenever the
> header is committed.

> Does Subversion have a way to insert something using a
> directive, similar to the one above?

Try the Date keyword:

http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.4

If that's not the format you want, write C code into your project
that transforms it into the format you want.

> I'm thinking I could use a "pre-commit hook-script",
> but would the person committing the file get the one
> with the timestamp inserted?

Don't try to modify a file's data in a pre-commit hook. While your
modified file will end up in the repository, the user's working copy
will retain the unmodified file, but will think it has the same
version as the repository. This will break subsequent diffs.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Nov 30 00:17:58 2005

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.