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

Re: checking certain files before commit with an external utiltiy (newbie)

From: Chris Chiasson <chris_at_chiasson.name>
Date: 2006-08-06 14:59:52 CEST


Thank you for this advice. My Subversion situation changed when I
moved to Eclipse with the Mathematica plugin; I am now able to keep
many more source files as plaintext, so I haven't tried out your
suggestion yet. I will likely try it in the future, but I need to
thank you now because I am unsubscribing from the mailing list.

Thank you.

On 7/27/06, Ryan Schmidt <subversion-2006c@ryandesign.com> wrote:
> On Jul 27, 2006, at 06:35, Chris Chiasson wrote:
> > Is there something for Subversion that can check all files of a
> > particular type by calling an executable on them before allowing the
> > commit?
> Yes, you can do it in a pre-commit hook.
> > Background:
> >
> > Mathematica notebooks have cached data that drastically changes even
> > if the actual edits to the code are small. A utility exists to strip
> > this cache. Another utility exists to detect the presence of cached
> > data in a notebook:
> >
> > http://www.itwm.fhg.de/as/asemployees/wichmann/rmnbcache.html
> > http://www.itwm.fhg.de/as/asemployees/wichmann/testnbcache.html
> >
> > I have searched your mailing list read and about half of the book
> > _Version Control with Subversion_ to determine if there is an easy way
> > to use this testnbcache utility to deny then commit if any of the
> > notebooks have cache data. The mailing list search was ineffective,
> > probably because the keywords I tried are common on this list in
> > contexts other than the one I need.
> >
> > From the book: Hooks do not appear to directly pass the names of the
> > committed files as arguments to the hook scripts, so I would need
> > another way to get the (space separated) list of committed files.
> You're right, the hook isn't told the names of the files, because
> it's a bit more involved than that. Some files or directories could
> have gotten added, modified, deleted, moved -- a bit much to
> represent on the command line. Instead, the hook is given the
> transaction number, with which you can run svnlook to get whatever
> information you wanted.
> Someone recently posted a bash script used to do syntax or stylistic
> checks on committed Java files. Perhaps you can use that as a basis
> for building in your checks on your Mathematica files.
> http://svn.haxx.se/users/archive-2006-06/0853.shtml
> Just remember that you must not attempt to modify the data in the
> incoming transaction or the world will end.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Aug 6 15:01:05 2006

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.