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

Re: Diffing a moved file can fail

From: Dave Lawrence <dlawrence_at_ad-holdings.co.uk>
Date: Tue, 21 Oct 2008 09:56:55 +0100

Dave Lawrence wrote:
> Please see the attached script for a demo of how diffing a moved file
> can fail. It creates two files, file1.c file2.c and moves them into
> subdirectories dir1 and dir2 respectively.
> The diff of file1.c fails, the diff of file2.c succeeds, seemingly it's
> dependent on whether the copy-from revision predates the revision of the
> copy-to directory.
> Tested on WinXP SP3. SVN 1.5.0 - symptoms also observed on latest TSVN
> which uses SVN 1.5.3.

Slightly improved script attached.

REM My CWD is C:\SVN\tests
set REPO=file:///c:/SVN/tests/test_repo

svnadmin create test_repo
svn co %REPO% test_wc

cd test_wc

REM Create file first, then directory
echo "Some text" > file1.c
svn add file1.c
svn ci . -m"Create a file"
svn mkdir dir1
svn ci . -m"Create a directory"

REM Create directory first, then file
svn mkdir dir2
svn ci . -m"Create a directory"
echo "Some text" > file2.c
svn add file2.c
svn ci . -m"Create a file"
echo "More text" >> file1.c
echo "More text" >> file2.c

svn mv file1.c dir1
svn mv file2.c dir2

svn ci . -m"Files moved and modififed - modification isn't important but makes for a better demo"

svn diff dir1/file1.c -r PREV
svn diff dir2/file2.c -r PREV

To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-21 10:57:35 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.