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

RE: Bug in svnlook 1.6.2 ?

From: Giulio Troccoli <giulio.troccoli_at_uk.linedata.com>
Date: Wed, 27 May 2009 02:19:38 -0700 (PDT)

> 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"
>

No-one has anything to say about this bug?

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2355693

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-27 11:20:49 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.