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

Re: filter files before commit

From: Dirk Hoffmann <dh.discuss_at_web.de>
Date: 2005-10-27 10:23:54 CEST

See the second warning in

http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks

Another approach could be to have two separate repositories (not just
different directories within the same directory). You could then let the
pre-commit hook of the first repository run the html-tidy program and
check in the new files into the second repository.

Of course you would then have two repositories with nearly the same
content. The first with "raw" files and the second with "tidy" files.
Unfortunately the raw and tidy files will also live in different working
copies. The user would have to manually copy files from the tidy over to
the raw working copy.

I never tried this but it should work.

You could also write a script that periodically tidies your files.

Regards,
Dirk

Dirk Hoffmann wrote:
> Hi Marcus,
>
> you may be thinking of writing a hook script to do the job but that
> won't work because then the working copy would no longer be in sync with
> the repo (Hope I remember this correctly).
>
> Better write a hook script which validates that your html is tidy and
> denies the commit if not.
>
> Regards,
> Dirk
>
> marcus314 wrote:
>
>> Hi group,
>>
>> I would like to always run a script on special types
>> of files before committing them to the repository,
>> e.g. "tidy" on all .html-files.
>>
>> Is there a way to do this automatically, i.e., so that
>> I would just have to "svn commit foo.html"?
>>
>> Best regards,
>> Marcus
>>
>>
>>
>>
>>
>> __________________________________
>> Yahoo! Mail - PC Magazine Editors' Choice 2005
>> http://mail.yahoo.com
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Oct 27 10:28:04 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.