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

Modifications lost when file is moved

From: Tim Blackman <Tim.Blackman_at_sun.com>
Date: 2005-06-08 21:38:32 CEST

I've run into a case where file modifications are not merged correctly
when there is parallel development and a file is moved.

Here's the case:

   Developer 1: Move file, modify file, commit
   Developer 2: Modify file, update

When developer 2 updates their working copy, their modifications to the
file don't seem to be included in the merged copy. Instead, 'svn
status' shows their copy of the file, under the old name, marked with a
'?', and the copy with the new name only reflects changes from developer
1.

Is this known [mis]behavior? Am I misunderstanding something?

Here's my environment:

   OS: Mac OS X 10.3.9
   Subversion: 1.2
   Statically linked build of Subversion downloaded from:
     http://homepage.mac.com/martinott/Subversion-1.2.0.pkg.zip
   No local mods
   Repository type: FSFS

I've included a bash script to reproduce the problem below.

- Tim

----------------------------------------------------------------------
#! /bin/bash

# The directories containing the repository and two working directories.
# These directories should not exist, but their parent directory should.
repos=/tmp/repos
wc1=/tmp/wc1
wc2=/tmp/wc2

# Create the repository and working directories
svnadmin create --fs-type fsfs $repos &&
mkdir $wc1 &&
svn checkout file://$repos $wc1 &&
mkdir $wc2 &&
svn checkout file://$repos $wc2 &&

# Create file1 in WC1
echo AAA > $wc1/file1 &&
svn add $wc1/file1 &&
svn commit $wc1 -m '' &&

# Update WC2
svn update $wc2

# Move file1 to file2, and prepend to it, in WC1
svn mv $wc1/file1 $wc1/file2 &&
echo 111 > $wc1/file2 &&
echo AAA >> $wc1/file2 &&
svn commit $wc1 -m '' &&

# Append to file1 in WC2
echo 222 >> $wc2/file1 &&

# Update WC2
svn update $wc2 &&

# Compare file2 to expected contents:
diff -c - $wc2/file2 <<EOF
111
AAA
222
EOF

# Check results
if [ $? != 0 ]; then echo Test failed; exit 1;
else echo Test passed; exit 0;
fi
----------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 8 21:42:02 2005

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