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

Re: svn diff - Is this behaviour expected?

From: Vincent Lefevre <vincent-svn_at_vinc17.net>
Date: Mon, 16 Aug 2010 17:17:39 +0200

On 2010-08-15 23:30:09 -0700, Bert Huijben wrote:
> > BTW, the local pristine version does correspond to some revision
> > in the repository. It shouldn't be mixed up with the working copy
> > version.
>
> What if the file is a copy?

In my example, it wasn't a copy. But...

> In that case BASE refers to the pristine version of the copy. So no: it
> doesn't refer to just a revision.

What I meant is that the pristine version refers to something that
exists in the repository at some revision.

For instance, if everything is at revision 17, and you do:

  svn cp foo bar

then the pristine version of both files corresponds to foo_at_17.

Then if you consider "svn diff bar", the Subversion book says:

  If TARGET is a working copy path, the default behavior (when no
  --revision option is provided) is to display the differences between
  the base and working copies of TARGET.

It is a bit ambiguous: by base, does it mean foo_at_17 or bar_at_17 ?
Intuitively, it should be foo_at_17. But it also says:

   If a --revision option is specified in this scenario, though, it
   means:

   --revision N:M

     The server compares TARGET_at_N and TARGET_at_M.

   --revision N

     The client compares TARGET_at_N against the working copy.

That would mean for "svn diff -r17 bar", TARGET being "bar", one would
have the difference between bar_at_17 and the working copy of bar. This
is IMHO incorrect and not the visible behavior.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Received on 2010-08-16 17:18:18 CEST

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.