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

Re: svn commit: r1291520 - /subversion/trunk/subversion/tests/cmdline/svntest/actions.py

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Tue, 21 Feb 2012 04:58:26 +0200

philip_at_apache.org wrote on Mon, Feb 20, 2012 at 23:37:52 -0000:
> + # The different orders of the real and dry-run merges may cause
> + # the "Merging rX through rY into" lines to be duplicated a
> + # different number of times in the two outputs. The list-set-list
> + # conversion removes duplicates so these differences are ignored.
> + # It also removes "U some/path" duplicate lines. Perhaps we
> + # should avoid that?
> + out_copy = list(set(out_copy))
> + out_dry_copy = list(set(out_dry_copy))
> +
> if out_copy != out_dry_copy:

You're converting sets->lists and then comparing them. Shouldn't you
either sort the new lists before comparing them, or just avoid the list
step altogether?

  sorted(list(set(x))) == sorted(list(set(y)))
  set(x) == set(y)

> print("=============================================================")
> print("Merge outputs differ")
>
>
Received on 2012-02-21 03:59:13 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.