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

2010-08-31 Thread Tech Geek
Ryan - Thanks for the sample script. As mentioned before the SVN server is on a Windows server. I will convert it to a Windows environment and give it a shot.

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

2010-08-31 Thread Ryan Schmidt
On Aug 31, 2010, at 12:59, Tech Geek wrote: > Let's say if somehow we do manage to implement this hook before the > development/project begins then after the first revision/commit the > project.xml file will also be committed (because we reject any commit if that > file is not there). Now let'

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

2010-08-31 Thread Ryan Schmidt
On Aug 31, 2010, at 07:06, Nico Kadel-Garcia wrote: > On Tue, Aug 31, 2010 at 7:11 AM, Ryan Schmidt wrote: >> > >> It sounds like you are saying the following: >> >> * There is a file project.xml that developers should have in their working >> copy. >> * This file does not exist in the repos

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

2010-08-31 Thread REEDICK, ANDREW (ATTSI)
contain a changed project.xml file. From: Tech Geek [mailto:techgeek12...@gmail.com] Sent: Tuesday, August 31, 2010 1:59 PM To: Les Mikesell Cc: users@subversion.apache.org Subject: Re: Hook to check for a presence of file before committing >Is it a requirement that the file be chan

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

2010-08-31 Thread Les Mikesell
On 8/31/2010 12:59 PM, Tech Geek wrote: >Is it a requirement that the file be changed each time (and thus part of a commit), or just that it exists somewhere on the client side >(versioned or unversioned)? The server will only know about it when it changes since the svn client is smart enough

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

2010-08-31 Thread Tech Geek
>Is it a requirement that the file be changed each time (and thus part of a commit), or just that it exists somewhere on the client side >(versioned or unversioned)? The server will only know about it when it changes since the svn client is smart enough to only send >differences. Great question. L

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

2010-08-31 Thread Les Mikesell
On 8/31/2010 11:22 AM, Tech Geek wrote: >You want to enforce that the developer cannot commit unless they have this project.xml in >their working copy, though it will never be sent to the repository. That's not true. The project.xml (or whatever file that particular file is) should also be a par

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

2010-08-31 Thread Jim Thompson
SVN has a pristine copy of the checked-out files along with the working copy. When you issue a commit, SVN compares the pristine and the local files and _only_ sends the diffs. So the presence of any file doesn't automatically mean that it will be visible in the commit _unless_ it changes ever

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

2010-08-31 Thread Tech Geek
>You want to enforce that the developer cannot commit unless they have this project.xml in >their working copy, though it will never be sent to the repository. That's not true. The project.xml (or whatever file that particular file is) should also be a part of commit. I will again repeat my questi

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

2010-08-31 Thread Nico Kadel-Garcia
On Tue, Aug 31, 2010 at 7:11 AM, Ryan Schmidt wrote: > > On Aug 30, 2010, at 19:46, Tech Geek wrote: > >> The code that we are trying to commit is generated by an IDE - a software >> development tool. The particular file (project.xml) is usually an optional >> file that is up to the developers/u

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

2010-08-31 Thread Ryan Schmidt
On Aug 30, 2010, at 19:46, Tech Geek wrote: > The code that we are trying to commit is generated by an IDE - a software > development tool. The particular file (project.xml) is usually an optional > file that is up to the developers/user to generate. However we would like to > enforce a policy

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

2010-08-31 Thread Cooke, Mark
> -Original Message- > From: Tech Geek [mailto:techgeek12...@gmail.com] > Sent: 31 August 2010 09:14 > To: David Weintraub > Cc: Ryan Schmidt; Subversion Users > Subject: Re: Hook to check for a presence of file before committing > > >It is possible to verify t

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

2010-08-31 Thread Tech Geek
>It is possible to verify that a project.xml is one of the files being >committed because you can use "svn changed" at the time of the >transaction to see what files are being added or modified. It would be >possible to fail the transaction if svnlook changed doesn't have a >project.xml file in the

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

2010-08-30 Thread David Weintraub
On Mon, Aug 30, 2010 at 8:46 PM, Tech Geek wrote: >>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. > OK. Let me try to explain this. > The code that we are trying to commit is generated by

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

2010-08-30 Thread Tech Geek
>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. OK. Let me try to explain this. The code that we are trying to commit is generated by an IDE - a software development tool. The particular file (

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

2010-08-30 Thread Ryan Schmidt
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 w

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

2010-08-30 Thread Ryan Schmidt
On Aug 30, 2010, at 12:50, Tech Geek wrote: > I am just getting started with SVN and I am running the latest version of > subversion on a Windows Server. I am looking for a pre-commit.bat hook that > will check for presence of a particular file (say project.xml) before > commiting to the reposi

Hook to check for a presence of file before committing

2010-08-30 Thread Tech Geek
Hi, I am just getting started with SVN and I am running the latest version of subversion on a Windows Server. I am looking for a pre-commit.bat hook that will check for presence of a particular file (say project.xml) before commiting to the repository. If the working copy that is about to be commi