I think I have found a bug in svnlook. I have already sent an email to users_at_subversion.tigris.org but nobody replied at all. Please CC me as I am not subscribed to the dev list.
I'm testing Subversion 1.6.2 with Apache 2.2.11 on RHEL4. I have written a script that reproduces the bug.
In short terms, 'svn status' before the commit shows
A + 2.0/a/aa
A + 2.0/a/aa/foo
A + 2.0/a/ab
A + 2.0/a/ab/foo
But 'svnlook changed' inside the pre-commit hooks shows
A 2.0/a/aa
D 2.0/a/aa/foo
A 2.0/a/aa/foo
A 2.0/a/ab
D 2.0/a/ab/foo
A 2.0/a/ab/foo
Where do the extra deletions come from?
Because I've been having problems attaching the script I'm including it here.
Thanks
Giulio
#!/bin/ksh
REPO_NAME=svn-test
access_type=file
if [ "$access_type" = "http" ]; then
REPO_URL=http://localhost/$REPO_NAME
REPO_PATH=/data/Repositories/$REPO_NAME
else # Anything else, use the file: method
REPO_URL=file:///home/svn/repos/$REPO_NAME
REPO_PATH=/home/svn/repos/$REPO_NAME
fi
WC_PATH=/home/svn/wc/$REPO_NAME
PRE_COMMIT_HOOK=$REPO_PATH/hooks/pre-commit
PATH="/usr/local/bin;/usr/bin/;$PATH"; export PATH
# Clear old repository and WC
rm -rf $REPO_PATH
rm -rf $WC_PATH
# Create the repository
svnadmin create $REPO_PATH
# Checkout the WC
svn co $REPO_URL $WC_PATH
# Populate the repository
cd $WC_PATH
mkdir 1.0
mkdir 2.0
svn add 1.0 2.0
svn ci -m"Initial structure"
svn up .
mkdir 1.0/a
echo test > 1.0/a/foo
svn add 1.0/a
svn ci -m"Adding a in 1.0"
svn up .
svn merge -c2 --accept postpone --ignore-ancestry $REPO_URL/1.0 2.0
svn ci -m"Merged revision 2 to 2.0"
svn up .
sed '
1i\
1\
2\
3\
4
$a\
a\
b\
c\
d' 2.0/a/foo > foo.tmp
mv foo.tmp 2.0/a/foo
svn ci -m"Modified foo for 2.0"
svn up .
sed '
1i\
1\
2
$a\
a\
b' 1.0/a/foo > foo.tmp
mv foo.tmp 1.0/a/foo
mkdir 1.0/a/aa
echo test > 1.0/a/aa/foo
mkdir 1.0/a/ab
echo test > 1.0/a/ab/foo
svn add 1.0/a/aa
svn add 1.0/a/ab
svn ci -m"Modified foo and created aa and ab in 1.0"
# Change the pre-commit hook to output the transtaction and exit with 1
echo "#!/bin/ksh" > $PRE_COMMIT_HOOK
echo "/usr/local/bin/svnlook changed -t \$2 \$1 > /dev/stderr" >> $PRE_COMMIT_HOOK
echo "exit 1" >> $PRE_COMMIT_HOOK
chmod 777 $PRE_COMMIT_HOOK
# Merge revision 5
svn up .
svn merge -c5 --accept postpone --ignore-ancestry $REPO_URL/1.0 2.0
# Resolve the conflict
cp 2.0/a/foo.working 2.0/a/foo
svn resolve --accept working --depth infinity .
# Get the status
svn st
# Commit and get the transtaction
svn ci -m"useless message"
Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2358706
Received on 2009-06-02 17:07:05 CEST