You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Robert Wenner <ro...@atsec.com> on 2005/09/15 23:03:14 UTC
Pre-commit hook gets wrong file names after svn mv
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