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

Re: Pre-commit and post-chekout hooks on client side

From: Waldemar Augustyn <waldemar_at_nxp.com>
Date: 2004-09-07 22:01:37 CEST

OK, I won't insist on the method but find me a way to do it.

One of the requirements in my systems is to correctly set copyrights on
every file as soon as it makes it to the system. (Let's not go into why
this is so). The CVS way is to simply run a script that does the dirty
work on every check-in. This does not affect local clients. I am no
expert, but the local clients cannot assume they have a current version
becuase there could be other developers working on the same file. I
think your statement aobut cached .svn info refers to something else.
Anyway, in case of CVS, the local clients run update to find out they're
out of date. I suspect svn behavior is similar. I do not see any
problem with it. (BTW, this used to work on ClearCase for years without
a single glitch)

Now, with SVN, that is not possible. The hooks, that you are referring
to, do not allow updates to pending transactions, which I understand
prohibits any file modifications. I am no expert, but I thought I saw a
note to that effect. I think that would break the atomic nature of
transactions otherwise.

For the moment, I just want to move my scripts. But if I need to use
different mechanism that's OK as long as I know which way to go.

Thanks,
Waldemar

m christensen wrote:

> Waldemar Augustyn wrote:
>
>> Yeah, that's a no. But how about server side?
>>
>> I am interested in a similar functionality but on the server side.
>> That is, I want to run a script that modifies files just before they're
>> checked-in itno the repository. This is very simple with CVS and I am
>> looking for ways to transfer some of my CVS scripts to SVN. So far, it
>> appears, svn does not allow it. Does it?
>>
> Yes, it's very easy to do.
>
> Look at the hook functionality in chapter 5 of the manual.
>
> No, you should NEVER do what you suggest.
>
> The reasons have been beat to death regularly, but in short....
>
> The clients already think they know what's in the repository via the
> local info cached in the .svn
> directories.
>
> The fact is 'They" comitted something and "You" Changed it after the
> fact, now "They"
> think they have a current copy and don't.
> They will continue to think they are current 'til someone else changes
> the file and bumps the rev
> or you delete your refresh your ENTIRE working copy.
>
> What are you really trying to do?
> Is there a more appropriate way to do it?
>
> Marc
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 7 22:02:20 2004

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.