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

Re: [PATCH] issue #3292: fix for 'svnlook diff' regression: doesn't print added dirs

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 10 Jun 2010 10:33:01 +0200

On Wed, Jun 09, 2010 at 06:10:29PM -0700, Lamar Goddard wrote:
> Oh, I don't think my reply on the other thread made it to the dev
> list, hopefully this one will.
>
> On Wed, Jun 9, 2010 at 1:11 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> > On Fri, Jun 04, 2010 at 06:02:52PM -0700, Lamar Goddard wrote:
> >> [[[
> >> Fixes issue #3292: Output svnlook diff content for copied/moved directories
> >>
> >> * subversion/svnlook/main.c
> >>   (print_diff_tree): If diff isn't outputted but header has content,
> >> output the header.
> >> ]]]
> >
> > Hi Lamar,
> >
> > thanks for the patch. It is perferectly fine technically,
> > but I'm unsure about how we (Subversion developers) want 'svnlook diff'
> > to behave.
> >
> > svnlook diff in 1.4 behaves differently than svn diff does in trunk.
> > svn diff never shows anything for directories (copied or not), it only shows
> > diffs for files. Do we want svn diff and svnlook diff behave the same way?
> > If so, maybe the 1.5/1.6 behaviour is correct and the 1.4 behaviour was wrong?
>
>
> My 2¢:
>
> I'm not sure svnlook diff should match svn diff's behavior.
>
> From what I understand there's no equivalent svnlook command to svn
> log -v or svn info so there's currently no way for a well behaved hook
> script to determine where a directory copy originated. svn log -v
> provides that information for revisions in the repository and svn info
> does the same for working copy changes.

I'm not sure the output of svnlook diff is supposed to be machine
parsable. "svnlook help diff" says "Print GNU-style diffs of changed
files and properties." Note that this does not talk about directories,
nor about parsing.

Michael Diers has mentioned to me that hook scripts such as enforcer
have trouble parsing the svnlook diff output reliably. It seems like
a much better idea to add a --xml switch to svnlook diff, which should
then be used by hooks which want to parse diff information. The XML
would contain the same of even more information than the human readable
output. Anything hook scripts out there want to know about changes made
in a transaction should be represented in the XML.

> I don't think there's a need for an Added or Deleted header because
> those are isolated actions that are self contained in the one path.
> Copied is different because it relates to more than one path. Knowing
> the destination only gives you a piece of the puzzle.

Well, you may not need information about added or deleted directories.
But I think this depends on what you want to know.
svnlook diff should be able to provide sufficient information for
any hook script out there.

Stefan
Received on 2010-06-10 10:33:44 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.