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

Re: svnlook at deleted file in pre-commit returns nothing

From: Paul Koning <pkoning_at_equallogic.com>
Date: 2006-01-13 21:40:28 CET

>>>>> "Renaud" == Renaud Waldura <renaud+subversion@waldura.com> writes:

 Renaud> I wrote a pre-commit hook to validate XML files. It uses
 Renaud> "svnlook changed" to look at the transaction, and cats the
 Renaud> file(s) into an XML validator. Files that are about to be
 Renaud> deleted seem to be empty; "svnlook cat" returns nothing. Is
 Renaud> this a bug? I thought the pre-commit phase would not have
 Renaud> altered the file yet.

You mean you use svnlook -t to look at the pending transaction?

The committed data in the repository still has the file, but the
transaction shows you what the pending revision does. So if a file is
being changed, svnlook -t will give you the new content. If a file is
being deleted, svnlook -t will reflect that. So that's correct.

If you need to distinguish an empty file from a being-deleted file,
the status code in the "svnlook changed" output will tell you which it


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 13 22:03:06 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.