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

Diff problems: repos->wc diffs over rename (Issue #1093)

From: Josh Pieper <jjp_at_pobox.com>
Date: 2004-05-09 15:49:27 CEST

Still working on Issue #1093, my big sticking point is getting the
diffs to work correctly when performed from a URL to a working copy
path, when the path was renamed sometime in between the URL's version
and the current working copy. As it stands now, the peg-revision
calculation works correctly, and the proper past URL is found, but the
code in diff_repos_wc uses the update editor to perform the diff,
which has no concept of copies.

This problem is present in the current HEAD if you present the right
diff request, I have attached a reproduction script. This diff
request is essentially what 'svn diff -r[old] wcpath' will produce
using the follow copy history code.

Due to the same limitation, the update editor, it is impossible to
request a diff of a directory if it has been renamed. The update
editor complains that it can't replace a directory from within itself.

Does anyone have ideas about how to teach the update editor or failing
that, the diff code, to handle copies gracefully?

-Josh

-------------------

#!/bin/sh

REPO=`pwd`/repo
ORIG=`pwd`/orig
WC=`pwd`/wc

rm -rf ${REPO} ${ORIG} ${WC}
mkdir ${REPO} ${ORIG} ${WC}

svnadmin create $REPO
mkdir ${ORIG}/foo
mkdir ${ORIG}/foo/foo2
mkdir ${ORIG}/bar
echo "test file" > ${ORIG}/foo/baz
echo "deep file" > ${ORIG}/foo/foo2/bonk

svn import --username "bob" ${ORIG} file:///${REPO} -m"initial import - rev 1"

cd ${WC}
svn co file:///${REPO} .

echo "janes line" >> foo/foo2/bonk
svn ci --username "jane" -m"jane adding a line - rev 2"

svn mv foo/foo2/bonk foo/bonk_new
svn ci --username "jane" -m"moved the file - rev 3"

echo "one more line" >> foo/bonk_new
svn ci --username "john" -m"john adding a line - rev 4"

echo "more more more" >> foo/bonk_new
cd foo

echo "Performing a diff of the previous URL to the new modified working copy"
svn diff --old file:///${REPO}/foo/foo2/bonk_at_2 --new bonk_new

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun May 9 15:49:42 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.