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

Re: Update/Commit ignoring lines

From: Tobias Schäfer <tobiasschaefer_at_gmx.de>
Date: 2005-12-23 14:30:01 CET

Hi,

> I have a foo.c and bar.c files that are (re)genarate by a script.
> I need that those files have the same hash version. Hash version in this
> case is a line with numbers and letters (something like md5 key).
> Everytime script needs to regenarate those files it make a new key and
> write in particular place of each file (foo.c and bar.c)
>
> The key must be the same in both files. But it's not important itself.
>
> Dev 1 - svn add foo.c bar.c
> Dev 1 - svn commit // foo.c and bar.c will be add to repository
> Dev 2 - svn co file://repository // will get foo.c and bar.c
> Dev 1 - uses a script and a new key will be genarate, but for Dev 2 it's
> not important to get it.
> Dev 1 - svn commit // *First problem* foo.c and bar.c will be commit
> only because the key.

If you really need to put the generated files under version control, you might
want to impliment a pre-commit hook.

You could create a pre-commit hook which checks if the change of the key is
the only diff in a file and then reject the commit.
It would also be nice to check if foo.c and bar.c are always commited together
to assure that the repository is always consistant, but I don't think that is
possible.

> Dev 2 - svn update // *Second problem* foo.c and bar.c will be update
> only because the key.

This problem does not exist, if the first problem is prevented.

Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Dec 25 02:43:02 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.