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

Re: Hook to check for a presence of file before committing

From: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Date: Mon, 30 Aug 2010 19:37:45 -0500

You should use Reply All so your replies go to the mailing list too, not just to me.

On Aug 30, 2010, at 19:32, Tech Geek wrote:

> Ryan,
>> Subversion hook scripts run on the server, not the client, so they have no knowledge of the user's working copy. So there's no way to do what you want using Subversion's server-side hook scripts.
> I see. How about this - I check for that particular file in post-commit hook and then if the file is missing then I can send an email. I think this will be a reasonably acceptable solution for my requirement.
> So how do I check for a file after commit using svnlook?

In hook scripts, people commonly use "svnlook changed", but that only tells you what files changed in a revision, or in a transaction. It does not tell you what is in the HEAD of the repository, and it does not tell you what is in the user's working copy. So unless your requirement is that the user modify your project.xml file with every commit, this will not help you.

Perhaps if you explain why you want to check for the existence of this file in the working copy we can help you find a different way of going about it.
Received on 2010-08-31 02:38:45 CEST

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.