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

Re: [PATCH v2] Make display_lines output a diff

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 26 Jul 2010 22:42:07 +0300

Stefan Sperling wrote on Mon, Jul 26, 2010 at 16:05:23 +0200:
> On Mon, Jul 26, 2010 at 07:07:12PM +0530, Ramkumar Ramachandra wrote:
> > [[[
> > * subversion/tests/cmdline/svntest/verify.py
> > (display_lines): Additionally print unified diff output using Python
> > difflib.unified_diff.
> > ]]]
>
> +1
>
> >
> > Index: subversion/tests/cmdline/svntest/verify.py
> > ===================================================================
> > --- subversion/tests/cmdline/svntest/verify.py (revision 979269)
> > +++ subversion/tests/cmdline/svntest/verify.py (working copy)
> > @@ -25,6 +25,7 @@
> > ######################################################################
> >
> > import re, sys
> > +from difflib import unified_diff
> >
> > import svntest
> >
> > @@ -292,6 +293,12 @@ def display_lines(message, label, expected, actual
> > for x in actual:
> > sys.stdout.write(x)
> >
> > + # Additionally print unified diff
> > + print('DIFF ' + ' '.join(output.split(' ')[1:]))
> > + for x in unified_diff(expected, actual,
> > + fromfile="EXPECTED", tofile="ACTUAL"):

I suggest

        fromfile="EXPECTED %s" % label,
        tofile="ACTUAL %s" % label,
Received on 2010-07-26 21:43:52 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.