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

Re: How to distinguish between a newly added file and a copied/moved file in the pre-commit hook?

From: Greg Thomas <thomasgd_at_omc.bt.co.uk>
Date: 2005-06-01 18:47:09 CEST

On Wed, 01 Jun 2005 13:13:49 +0100, Greg Thomas
<thomasgd@omc.bt.co.uk> wrote:

>On Wed, 01 Jun 2005 12:28:26 +0200, Ronny Schuetz
><usenet-01@groombridge34.de> wrote:
>
>>Is there any way to get this information from a pre-commit hook?
>
>svnlook changed will show D for deleted files, and A for added files.
>As a rename is a D followed by an A, you'll need to search all A files
>to see if there is a corresponding D file. If there is, you can skip
>the check.

Doh! On reflection, there's no easy way to tie the two together that I
can think of - you won't know if it's a rename or a genuine
delete/add.

>Or, just run the check, anyway, and don't worry about it.

Which definitely sounds like the best way forward!

Greg

-- 
This post represents the views of the author and does
not necessarily accurately represent the views of BT.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 1 18:54:21 2005

This is an archived mail posted to the Subversion Users mailing list.