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

`svn diff' progress

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2001-12-18 00:45:22 CET

philip@tigris.org writes:
> Log:
> Provides 'svn diff -r REV' functionality to compare the working copy
> against a given revision in the repository. The existing 'svn diff'
> behaviour is unchanged.

Whoo hoo!!! Bravo, Philip, this is great.

Diff is almost done now, though still some functionality needed:

   $ svn diff -r 659 subversion/clients/cmdline/main.c
   Index: subversion/clients/cmdline/main.c
   ===================================================================
   --- subversion/clients/cmdline/main.c
   +++ subversion/clients/cmdline/main.c Mon Dec 17 18:32:00 2001
   @@ -93,8 +93,9 @@
      { "rm", TRUE, NULL, NULL },
    
      { "diff", FALSE, svn_cl__diff,
   - "Display local file changes as contextual diffs.\n"
   - "usage: diff [TARGETS]\n" },
   + "Display local changes in the working copy, or changes between the\n"
   + "working copy and the repository if a revision is given.\n"
   + "usage: diff [-r REV] [TARGETS]\n" },
      { "di", TRUE, NULL, NULL },
    
      { "help", FALSE, svn_cl__help,

That worked. Diff with no args shows no differences, which is right
because I have an up-to-date working copy:

   $ svn diff subversion/clients/cmdline/main.c
   $

What about diffing current revision of a file against same path in a
revision where it doesn't exist:

   $ svn diff -r 659 subversion/libsvn_wc/diff.c
   apr_error: #20014, src_err 0 : <Error string not specified yet>
     The REPORT status was 500, but expected 200.
   $

Okay, that's probably related to issue #581, see
http://subversion.tigris.org/issues/show_bug.cgi?id=581 for details.

Let's try not specifying any target files:

   $ svn diff -r 659
   [out put looks great, except for...]

   Index: ./subversion/libsvn_wc/diff.c
   ===================================================================
   /usr/bin/diff: ./subversion/libsvn_wc/.svn/empty-file: No such file \
     or directory

   [the output for file that weren't just added is fine, though]

Looks like older working copies won't handle this robustly. Can you
put some run-time upgrade code in there... (Or better yet, find a way
to do it without using `empty-file'; Mike Pilato thinks there is a
way, maybe he can comment more...?)

Then I tried diffing two arbitrary revisions:

   $ svn diff -r 640:660 subversion/clients/cmdline/main.c
   svn_error: #21012 : <Trying to use an unsupported feature>
     diff only supports a single revision
   $

Ah,, okay, we don't support that yet. :-) (Is that next on your list,
Philip?) Same strategy, I guess: just download both files and diff
them client side, the downloads can be diffs against the working copy
revision, and/or one of the downloads can be a diff against the other
download, whatever works best...

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:53 2006

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.