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

Bug in svnlook 1.6.2 ?

From: Giulio Troccoli <giulio.troccoli_at_uk.linedata.com>
Date: Fri, 22 May 2009 14:44:12 +0100

I think I have found a bug in svnlook.

I'm testing Subversion 1.6.2 with Apache 2.2.11 on RHEL4. I have written a script that reproduce 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

#/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"blah"

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=1065&dsMessageId=2352899

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-22 15:45:14 CEST

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.