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,

Reply via email to