You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "BRUGGEMAN Jens (JBRG)" <Je...@seco-m.be> on 2004/11/04 12:51:55 UTC

svnlook changed

Hi,
 
I wanted some information about the svnlook changed output.
I use the 'svnlook changed' command in a pre-commit hook. Therefore it is
important I fully understand the output of the command.
 
Can anyone verify this overview of the output:
 
When only textual changes:
-------------------------------
A Testfile.txt -> Adding new file
U TestFile.txt -> Updating new file 
D TestFile.txt -> Delete existing file
 
When only property changes:
--------------------------
If the file 'TestFile.txt' is already a SVN file but has a property change
(adding of property) then you get the following:
UU TestFile.txt -> Property change of file 
 
But when you have the following situation:
You create a new file MyTestfile.txt and add it in SVN (without commit) +
change property svn:eol-style=native. Then you try to commit the file.
I displayed the 'svnlook changed' information and it shows only the
following line:
A MyTestfile.txt
 
I would have thought there would be the following:
A MyTestfile.txt
UU MyTestfile.txt 
 
Why do I ask this?
I want to implement in the pre-commit an extra check to make sure every file
has the property svn:eol-style=native. If not, the transaction is aborted
and the user will be prompted with reason.
But I have no idea how to check the property because the 'svnlook changed'
does not show a property change. If you allow the commit, the property of
that new file is added in SVN though.
 
Anyone any thoughts about implementing this?
 
Greetings,
Jens

Re: svnlook changed

Posted by "C. Michael Pilato" <cm...@collab.net>.
"BRUGGEMAN Jens (JBRG)" <Je...@seco-m.be> writes:

> Hi,
>  
> I wanted some information about the svnlook changed output.
> I use the 'svnlook changed' command in a pre-commit hook. Therefore it is
> important I fully understand the output of the command.

If the file or directory is new, you get an 'A' in the first column.

If the file or directory was deleted, you a 'D' in the first column.

If the file or directory already existed, you get a 'U' in the first
column the file's text changed, and 'U' in the second column if the
file or directory's properties changed.

> But when you have the following situation:
> You create a new file MyTestfile.txt and add it in SVN (without commit) +
> change property svn:eol-style=native. Then you try to commit the file.
> I displayed the 'svnlook changed' information and it shows only the
> following line:
> A MyTestfile.txt
>  
> I would have thought there would be the following:
> A MyTestfile.txt
> UU MyTestfile.txt 

We don't repeat paths.  One line per path, that's it.  So, if we were
to make changes like this, you would probably see something like:

   AU MyTestfile.txt

> I want to implement in the pre-commit an extra check to make sure
> every file has the property svn:eol-style=native. If not, the
> transaction is aborted and the user will be prompted with reason.
> But I have no idea how to check the property because the 'svnlook
> changed' does not show a property change. If you allow the commit,
> the property of that new file is added in SVN though.
>  
> Anyone any thoughts about implementing this?

Friend, step over here with me and allow me introduce you to the
Python bindings...

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

Re: svnlook changed

Posted by Stefan Haller <ha...@ableton.com>.
C. Michael Pilato <cm...@collab.net> wrote:

> haller@ableton.com (Stefan Haller) writes:
> 
> > Why not simply check the property for every file that has A or U in the
> > first column, and completely ignore the second column.  It doesn't
> > really matter if the property has changed with this commit.
> 
> By that reasoning, they should a) fix the files currently the
> repository, and then b) only need to check the ones with 'A' in the
> first column, right?

Yes, they should fix a).  In our case, we did that right after
converting our repository from CVS.

But then you still need to check A and U files, to catch the case where
someone changes or deletes the property.  (Maybe accidentally.)


-- 
Stefan Haller
Ableton
http://www.ableton.com/

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

Re: svnlook changed

Posted by "C. Michael Pilato" <cm...@collab.net>.
haller@ableton.com (Stefan Haller) writes:

> Why not simply check the property for every file that has A or U in the
> first column, and completely ignore the second column.  It doesn't
> really matter if the property has changed with this commit.

By that reasoning, they should a) fix the files currently the
repository, and then b) only need to check the ones with 'A' in the
first column, right?

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

Re: svnlook changed

Posted by Stefan Haller <ha...@ableton.com>.
BRUGGEMAN Jens (JBRG) <Je...@seco-m.be> wrote:

> I want to implement in the pre-commit an extra check to make sure every file
> has the property svn:eol-style=native. If not, the transaction is aborted
> and the user will be prompted with reason.
> But I have no idea how to check the property because the 'svnlook changed'
> does not show a property change.

Why not simply check the property for every file that has A or U in the
first column, and completely ignore the second column.  It doesn't
really matter if the property has changed with this commit.

We have a similar pre-commit hook, and it appears to work well this way.


-- 
Stefan Haller
Ableton
http://www.ableton.com/

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