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

[RFE] Re: rename and diff

From: Vincent Lefevre <vincent+svn_at_vinc17.org>
Date: 2007-02-12 15:46:36 CET

On 2007-02-12 13:58:27 +0100, Ulrich Eckhardt wrote:
> On Monday 12 February 2007 06:01, Dave Grundgeiger wrote:
> > Hi. I'm familiar with Subversion but not an expert. I want to
> > rename a file in a working copy and then produce a patch
> > representing the rename. I'm doing the following:
> >
> > svn rename oldname.txt newname.txt
> > svn diff
> >
> > The resulting diff contains the deletion of oldname.txt, but not
> > the addition of newname.txt. Is this the intended behavior?
>
> diff files can't represent moved/renamed files, the format simply
> doesn't allow it. Same problem applies to directories (only
> implicitly by creating files therein), deleting files (only via
> making them empty) or adding files (only via giving them content).

I don't think you really answer the question. When there is an
addition, svn does show the addition. Now, the rename is just a
copy + a delete. The delete is shown as expected. When there is a
copy, svn shows the diff against the old version; when there are
no diffs (i.e. one just has a copy, not a copy + modifications),
svn doesn't show anything. I wonder if svn shouldn't output:

Index: newname.txt (copied)
===================================================================

like it does for deleted files, or even:

Index: newname.txt (copied from oldname.txt)
===================================================================

-- 
Vincent Lefèvre <vincent_at_vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 12 15:47:22 2007

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.