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

Pre-commit hook gets wrong file names after svn mv

From: Robert Wenner <robert.wenner_at_atsec.com>
Date: 2005-09-16 01:03:14 CEST

Hi,

I got a problem with a pre-commit hook script.
The hook checks each changed or deleted file and rejects the commit if the
chaned file has a readonly attribute. This usually works, unless I delete
a file in a directory and rename that directory and then commit both
changes.

Without the hook:

robert@sauerbraten:~/test> svn status
robert@sauerbraten:~/test> mkdir -p old/foo
robert@sauerbraten:~/test> svn add old
A old
A old/foo
robert@sauerbraten:~/test> svn ci -m initial
Adding old
Adding old/foo

Committed revision 9.
robert@sauerbraten:~/test> svn rm old/foo
D old/foo
robert@sauerbraten:~/test> svn mv old new
A new
D old/foo
D old
robert@sauerbraten:~/test> svn ci -m deleted
Adding new
Deleting new/foo
Deleting old

Committed revision 10.
robert@sauerbraten:~/test>

Here you already see the difference: the output from svn mv uses the old
names, and the commit output uses the new ones. The hook sees (with
svnlook) the new names:

A new/
D new/foo/
D old/

and asking svn propget about these fails, because they don't exist yet.

svn: File not found: revision 11, path '/new/foo'

What am I missing here?
I did not find a relevant entry in the issue tracker.
Any ideas on how to work around this?

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 16 13:04:07 2005

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.