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

Re: Odd "diff" behavior

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 24 Mar 2008 01:12:36 +0100

On Sun, Mar 23, 2008 at 06:53:21PM -0500, Augie Fackler wrote:
> My personal interpretation of the diff command was
> always "what is different as compared to the last-updated-rev of the wc?"
> which isn't what it actually does - I'm raising a UI question, not actually
> saying it's wrong. Does anyone else see the expected behavior I do, or am I
> the odd case out?

I've seen this also before and found it quite irritating.

If you are used to how "diff/patch" works, then "svn diff"
is acting weird in this particular case.

To illustrate again what we are talking about:

  stsp_at_ted [wc] $ svn cp a b
  A b
  stsp_at_ted [wc] $ svn diff
  stsp_at_ted [wc] $ svn st
  A + b
  stsp_at_ted [wc] $ echo c > c
  stsp_at_ted [wc] $ svn add c
  A c
  stsp_at_ted [wc] $ svn diff
  Index: c
  ===================================================================
  --- c (revision 0)
  +++ c (revision 0)
  @@ -0,0 +1 @@
  +c
  stsp_at_ted [wc] $
  stsp_at_ted [wc] $ svn st
  A + b
  A c
  stsp_at_ted [wc] $

Why isn't the diff for b shown?
Was this a deliberate design decision?

-- 
Stefan Sperling <stsp_at_elego.de>                 Software Developer
elego Software Solutions GmbH                            HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12        Tel:  +49 30 23 45 86 96 
13355 Berlin                              Fax:  +49 30 23 45 86 95
http://www.elego.de                 Geschaeftsfuehrer: Olaf Wagner

  • application/pgp-signature attachment: stored
Received on 2008-03-24 01:12:54 CET

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.