[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: Renaud Waldura <renaud+subversion_at_waldura.com>
Date: 2006-01-13 21:47:35 CET

My confusion. This makes perfect sense!
Thanks.

----- Original Message -----
From: "Paul Koning" <pkoning@equallogic.com>
To: <renaud+subversion@waldura.com>
Cc: <users@subversion.tigris.org>
Sent: Friday, January 13, 2006 12:40 PM
Subject: Re: svnlook at deleted file in pre-commit returns nothing

>>>>>> "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
> is.
>
> paul
>
>

---------------------------------------------------------------------
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:26:53 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.