You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Keith Moore <Ke...@securency.com.au> on 2008/04/15 04:12:45 UTC

svnlook changed output

Hello, I'm trying to write a pre-commit hook that catches changes or deletions on tags branches.  I've seen a very simple example using svnlook and grep to parse it's output.  Even though I'm running subversion on windows I believe this solution will work using svnlook and findstr (essentially the same thing).



The first question I have is on the output of the svnlook changed command.  Are the numbered statements below a correct description of the output of svnlook?

1. The first character specifies the type of change to the file or dir, add, delete or update.

2. The second character is the type of change to the file or dirs properties.

3. There are two spaces.

4. A variable left file or directory path.



The second question is what happens if the file or directory path has a space in it?  Do the spaces get escaped out or is the whole path surrounded with quotes?  Or do you just read to the end of the line?



Thanks.

_________________________________________________________________

Keith Moore




#####################################################################################
Attention:
The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain
confidential and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from any system and destroy any copies.
#####################################################################################

Re: svnlook changed output

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 14, 2008, at 11:12 PM, Keith Moore wrote:
> Hello, I’m trying to write a pre-commit hook that catches changes  
> or deletions on tags branches.  I’ve seen a very simple example  
> using svnlook and grep to parse it’s output.  Even though I’m  
> running subversion on windows I believe this solution will work  
> using svnlook and findstr (essentially the same thing).
>
>
> The first question I have is on the output of the svnlook changed  
> command.  Are the numbered statements below a correct description  
> of the output of svnlook?
>
> 1. The first character specifies the type of change to the file or  
> dir, add, delete or update.
>
> 2. The second character is the type of change to the file or dirs  
> properties.
>
> 3. There are two spaces.
>
> 4. A variable left file or directory path.
>

I believe that's correct.


> The second question is what happens if the file or directory path  
> has a space in it?  Do the spaces get escaped out or is the whole  
> path surrounded with quotes?  Or do you just read to the end of the  
> line?

I would suggest you try it and see, but I have never seen any quoting  
or escaping, so I believe the answer is to read to the end of the line.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org