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

bug in copy from repos to wc ?

From: Martin Furter <mf_at_rola.ch>
Date: 2004-11-29 19:54:20 CET

Hello

I think i found a bug in svn 1.0.9.

I copied a file from repos to wc and modified it.
After the commit the file in the wc has the new content but the one in the
repos has the old content.

My machine runs debian x86, the svn package is version 1.0.9-2.

> svn --version
svn, version 1.0.9 (r11378)
   compiled Oct 16 2004, 23:29:24

> svnadmin --version
svnadmin, version 1.0.9 (r11378)
   compiled Oct 16 2004, 23:29:24

Here's a script to reproduce the possible bug:

#!/bin/sh

# use absolute path for wc and repos
REPOS="$PWD/repos"
WC="$PWD/wc"

# prepare new repos and wc
rm -rf "$REPOS" "$WC"
svnadmin create "$REPOS"
svn co "file://$REPOS" wc

# add a file
echo "File Content for Revision 1" > "$WC/file1"
svn add "$WC/file1"
svn ci --username "r1" -m "add file1" "$WC"

# copy and modify file
svn cp "file://$REPOS/file1" "$WC/file2"
echo "File Content for Revision 2" > "$WC/file2"
svn ci --username "r2" -m "copy file1 to file2" "$WC"

# check the copied file
echo ""
echo "=== status of file2 ==="
svn st "$WC/file2"
echo "=== diff repos/wc of file2 ==="
svn cat "file://$REPOS/file2" | diff -u "$WC/file2" -
RC="$?"
echo "=== $RC ==="
if [ "$RC" -ne 0 ]; then
        echo "*** WTF??? we have a diff ??? ***"
        echo ""
fi

# things which work:

# copy (wc->wc) and modify file
svn cp "$WC/file1" "$WC/file3"
echo "File Content for Revision 3" > "$WC/file3"
svn ci -m "copy file1 to file3" "$WC"

# check the copied file
echo ""
echo "=== status of file3 ==="
svn st "$WC/file3"
echo "=== diff repos/wc of file3 ==="
svn cat "file://$REPOS/file3" | diff -u "$WC/file3" -
RC="$?"
echo "=== $RC ==="

# copy, update and modify file
svn cp "file://$REPOS/file1" "$WC/file4"
svn up "$WC/file4"
echo "File Content for Revision 4" > "$WC/file4"
svn ci -m "copy file1 to file4" "$WC"

# check the copied file
echo ""
echo "=== status of file4 ==="
svn st "$WC/file4"
echo "=== diff repos/wc of file4 ==="
svn cat "file://$REPOS/file4" | diff -u "$WC/file4" -
RC="$?"
echo "=== $RC ==="

Thanks
Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 29 19:56:14 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.