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

Re: Triming file content before it get commited?

From: Talden <talden_at_gmail.com>
Date: 2007-08-25 14:17:50 CEST

There is no provided client-side pre-commit hook facility (though the
idea poses interesting possibilities). As far as I am aware there are
no support tools that provide this either.

You could write client-side scripts to do this yourself - any number
of scripting languages or shell-script languages will provide the
means to do so - you need to invoke them yourself prior to committing
though.

As far as enforcing a repository policy goes though, you have much
better support - the pre-commit server-side hook would allow you to
peek at the transaction content and validate it's compliance to your
policy. You can then reject non-complying commits, you cannot correct
them server-side however.

--
Talden
On 8/22/07, Pierre Lemay <lemayp@videotron.ca> wrote:
> Hello everyone,
>
>  We are facing a little environment problem, which is not due to SVN,
> but I was wandering if SVN could be used to resolve the problem we are
> facing.  Basically, we have some kind of source files that some editors
> used by developpers will automatically pad each lines to 80 characters
> (blank), while other developpers use some editors that will not do such
> padding.   This lead to a situation where if a source code is created by
> someone using a non-padding editor and save the file to SVN, and then
> someone using the other kind of editor attempts to modify a single line
> of the same file and submit the change to SVN, each single line of the
> file will show up as modified, i.e. all lines will be padded with blank
> characters....
>
>   Anyone knows if a hook could be used to "trim" files with a
> pre-determined file extension before they are actually committed in
> SVN?  Any suggestion on how we could configure the SVN server to help
> resolve the situation?  The SVN server is running on unix, while the
> clients environment could be either Unix or windows.
>
>   Looking at the SVN documentation about hook, I doubt this could be
> what hooks are intended for, but in case I might be missing something,
> I would like the feed back of  more experienced SVN users.
>
>  Thanks,
>
> Pierre
>
> ---------------------------------------------------------------------
> 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 Sat Aug 25 14:15:23 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.