[prev in list] [next in list] [prev in thread] [next in thread]
List: subversion-cvs
Subject: svn commit: r35601 - in trunk: . build/generator build/win32
From: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA () GMail ! Com>
Date: 2009-01-30 20:47:47
Message-ID: 200901302047.n0UKlleA031156 () svn2 ! sjc ! collab ! net
[Download RAW message or body]
Author: arfrever
Date: Fri Jan 30 12:47:46 2009
New Revision: 35601
Log:
Use sorted() to simplify some code.
* build/generator/gen_base.py:
* build/generator/gen_make.py:
* build/generator/gen_vcnet_vcproj.py:
* build/win32/make_dist.py:
* doc/tools/bin/find-xsl.py:
* gen-make.py:
* subversion/bindings/swig/python/tests/mergeinfo.py:
* subversion/bindings/swig/python/tests/ra.py:
* subversion/tests/cmdline/changelist_tests.py:
* subversion/tests/cmdline/svnadmin_tests.py:
* subversion/tests/cmdline/svnlook_tests.py:
* subversion/tests/cmdline/svntest/actions.py:
* subversion/tests/cmdline/svntest/tree.py:
* tools/bdb/svn-bdb-view.py:
* tools/dev/contribulyze.py:
* tools/dev/gen-javahl-errors.py:
* tools/dev/normalize-dump.py:
* tools/dev/which-error.py:
* tools/examples/svnshell.py:
* tools/hook-scripts/mailer/mailer.py:
* tools/po/l10n-report.py: Use sorted() to simplify some code.
Modified:
trunk/build/generator/gen_base.py
trunk/build/generator/gen_make.py
trunk/build/generator/gen_vcnet_vcproj.py
trunk/build/win32/make_dist.py
trunk/doc/tools/bin/find-xsl.py
trunk/gen-make.py
trunk/subversion/bindings/swig/python/tests/mergeinfo.py
trunk/subversion/bindings/swig/python/tests/ra.py
trunk/subversion/tests/cmdline/changelist_tests.py
trunk/subversion/tests/cmdline/svnadmin_tests.py
trunk/subversion/tests/cmdline/svnlook_tests.py
trunk/subversion/tests/cmdline/svntest/actions.py
trunk/subversion/tests/cmdline/svntest/tree.py
trunk/tools/bdb/svn-bdb-view.py
trunk/tools/dev/contribulyze.py
trunk/tools/dev/gen-javahl-errors.py
trunk/tools/dev/normalize-dump.py
trunk/tools/dev/which-error.py
trunk/tools/examples/svnshell.py
trunk/tools/hook-scripts/mailer/mailer.py
trunk/tools/po/l10n-report.py
Modified: trunk/build/generator/gen_base.py
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/gen_base.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/build/generator/gen_base.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/build/generator/gen_base.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -101,9 +101,8 @@ class GeneratorBase:
self.target_dirs = [] # Directories in which files are built
self.manpages = [] # Manpages
- # Collect the build targets
- parser_sections = parser.sections()
- parser_sections.sort() # Have a reproducible ordering
+ # Collect the build targets and have a reproducible ordering
+ parser_sections = sorted(parser.sections())
for section_name in parser_sections:
if section_name in self.skip_sections:
continue
@@ -373,8 +372,7 @@ class TargetLinked(Target):
# the specified install area depends upon this target
self.gen_obj.graph.add(DT_INSTALL, self.install, self)
- sources = _collect_paths(self.sources or '*.c' or '*.cpp', self.path)
- sources.sort()
+ sources = sorted(_collect_paths(self.sources or '*.c' or '*.cpp', self.path))
for srcs, reldir in sources:
for src in srcs.split(" "):
@@ -494,8 +492,7 @@ class TargetI18N(Target):
def add_dependencies(self):
self.gen_obj.graph.add(DT_INSTALL, self.install, self)
- sources = _collect_paths(self.sources or '*.po', self.path)
- sources.sort()
+ sources = sorted(_collect_paths(self.sources or '*.po', self.path))
for src, reldir in sources:
if src[-3:] == '.po':
Modified: trunk/build/generator/gen_make.py
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/gen_make.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/build/generator/gen_make.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/build/generator/gen_make.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -155,8 +155,7 @@ class Generator(gen_base.GeneratorBase):
self.begin_section('SWIG autogen rules')
# write dependencies and build rules for generated .c files
- swig_c_deps = self.graph.get_deps(gen_base.DT_SWIG_C)
- swig_c_deps.sort(key = lambda t: t[0].filename)
+ swig_c_deps = sorted(self.graph.get_deps(gen_base.DT_SWIG_C), key = lambda t: \
t[0].filename)
swig_lang_deps = {}
for lang in self.swig.langs:
@@ -450,8 +449,7 @@ class Generator(gen_base.GeneratorBase):
# write dependencies and build rules (when not using suffix rules)
# for all other generated files which will not be installed
# (or will be installed, but not by the main generated build)
- obj_deps = self.graph.get_deps(gen_base.DT_OBJECT)
- obj_deps.sort(key = lambda t: t[0].filename)
+ obj_deps = sorted(self.graph.get_deps(gen_base.DT_OBJECT), key = lambda t: \
t[0].filename)
for objname, sources in obj_deps:
deps = ' '.join(map(str, sources))
Modified: trunk/build/generator/gen_vcnet_vcproj.py
URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/gen_vcnet_vcproj.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/build/generator/gen_vcnet_vcproj.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/build/generator/gen_vcnet_vcproj.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -234,8 +234,7 @@ class Generator(gen_win.WinGeneratorBase
configs.append(gen_win.ProjectItem(name=self.configs[i], index=i))
# sort the values for output stability.
- guidvals = list(guids.values())
- guidvals.sort()
+ guidvals = sorted(guids.values())
data = {
'version': self.vsnet_version,
Modified: trunk/build/win32/make_dist.py
URL: http://svn.collab.net/viewvc/svn/trunk/build/win32/make_dist.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/build/win32/make_dist.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/build/win32/make_dist.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -432,8 +432,7 @@ def _make_dist(cfg):
shutil.rmtree(distdir)
os.makedirs(distdir)
- dirlist = list(_disttree.keys())
- dirlist.sort()
+ dirlist = sorted(_disttree.keys())
for reldir in dirlist:
dir = os.path.join(distdir, reldir)
Modified: trunk/doc/tools/bin/find-xsl.py
URL: http://svn.collab.net/viewvc/svn/trunk/doc/tools/bin/find-xsl.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/doc/tools/bin/find-xsl.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/doc/tools/bin/find-xsl.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -30,9 +30,8 @@ if os.path.exists(xsl_dir):
sys.exit(0)
for i in candidate_xsldirs:
- globs = glob.glob(i)
# Crude method of preferring the highest version, when multiple exist
- globs.sort()
+ globs = sorted(glob.glob(i))
globs.reverse()
for j in globs:
if os.path.exists(os.path.join(j, 'html', 'docbook.xsl')):
Modified: trunk/gen-make.py
URL: http://svn.collab.net/viewvc/svn/trunk/gen-make.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/gen-make.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/gen-make.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -52,8 +52,7 @@ def main(fname, gentype, verfname=None,
for source in target_dict[target]:
print(" " + _objinfo(source))
print("=" * 72)
- gen_keys = list(generator.__dict__.keys())
- gen_keys.sort()
+ gen_keys = sorted(generator.__dict__.keys())
for name in gen_keys:
value = generator.__dict__[name]
if type(value) == type([]):
@@ -82,8 +81,7 @@ def _usage_exit():
print(" --reload reuse all options from the previous invocation")
print(" of the script, except -s, -t, --debug and --reload")
print(" -t TYPE use the TYPE generator; can be one of:")
- items = list(gen_modules.items())
- items.sort()
+ items = sorted(gen_modules.items())
for name, (module, desc) in items:
print(' %-12s %s' % (name, desc))
print("")
Modified: trunk/subversion/bindings/swig/python/tests/mergeinfo.py
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/swig/python/tests/mergeinfo.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/subversion/bindings/swig/python/tests/mergeinfo.py Fri Jan 30 12:43:02 \
2009 (r35600)
+++ trunk/subversion/bindings/swig/python/tests/mergeinfo.py Fri Jan 30 12:47:46 \
2009 (r35601) @@ -132,20 +132,16 @@ class SubversionMergeinfoTestCase(unitte
"Missing revision range 'non-inheritable' flag")
def compare_mergeinfo_catalogs(self, catalog1, catalog2):
- keys1 = list(catalog1.keys())
- keys1.sort()
- keys2 = list(catalog2.keys())
- keys2.sort()
+ keys1 = sorted(catalog1.keys())
+ keys2 = sorted(catalog2.keys())
self.assertEqual(keys1, keys2)
for k in catalog1.keys():
self.compare_mergeinfos(catalog1[k], catalog2[k])
def compare_mergeinfos(self, mergeinfo1, mergeinfo2):
- keys1 = list(mergeinfo1.keys())
- keys1.sort()
- keys2 = list(mergeinfo2.keys())
- keys2.sort()
+ keys1 = sorted(mergeinfo1.keys())
+ keys2 = sorted(mergeinfo2.keys())
self.assertEqual(keys1, keys2)
for k in mergeinfo1.keys():
Modified: trunk/subversion/bindings/swig/python/tests/ra.py
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/bindings/swig/python/tests/ra.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/subversion/bindings/swig/python/tests/ra.py Fri Jan 30 12:43:02 \
2009 (r35600)
+++ trunk/subversion/bindings/swig/python/tests/ra.py Fri Jan 30 12:47:46 \
2009 (r35601) @@ -305,8 +305,7 @@ class SubversionRepositoryAccessTestCase
elif len(log_revprops) == 0:
self.assert_(log_entry.revprops == None or len(log_entry.revprops) == 0)
else:
- revprop_names = list(log_entry.revprops.keys())
- revprop_names.sort()
+ revprop_names = sorted(log_entry.revprops.keys())
log_revprops.sort()
self.assertEqual(revprop_names, log_revprops)
for i in log_revprops:
Modified: trunk/subversion/tests/cmdline/changelist_tests.py
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/changelist_tests.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/subversion/tests/cmdline/changelist_tests.py Fri Jan 30 12:43:02 \
2009 (r35600)
+++ trunk/subversion/tests/cmdline/changelist_tests.py Fri Jan 30 12:47:46 \
2009 (r35601) @@ -6,7 +6,7 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Copyright (c) 2008 CollabNet. All rights reserved.
+# Copyright (c) 2008-2009 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -508,8 +508,7 @@ def info_with_changelists(sbox):
expected_paths.append('A/D/G/pi')
expected_paths.append('A/D/H/chi')
expected_paths.append('A/D/H/psi')
- expected_paths = [os.path.join(wc_dir, x.replace('/', os.sep)) for x in \
expected_paths]
- expected_paths.sort()
+ expected_paths = sorted([os.path.join(wc_dir, x.replace('/', os.sep)) for x in \
expected_paths])
# Build the command line.
args = ['info', wc_dir]
@@ -570,8 +569,7 @@ def diff_with_changelists(sbox):
expected_paths.append('A/D/G/pi')
expected_paths.append('A/D/H/chi')
expected_paths.append('A/D/H/psi')
- expected_paths = [os.path.join(wc_dir, x.replace('/', os.sep)) for x in \
expected_paths]
- expected_paths.sort()
+ expected_paths = sorted([os.path.join(wc_dir, x.replace('/', os.sep)) for x \
in expected_paths])
# Build the command line.
args = ['diff']
Modified: trunk/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svnadmin_tests.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/subversion/tests/cmdline/svnadmin_tests.py Fri Jan 30 12:43:02 \
2009 (r35600)
+++ trunk/subversion/tests/cmdline/svnadmin_tests.py Fri Jan 30 12:47:46 \
2009 (r35601) @@ -6,7 +6,7 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Copyright (c) 2000-2006, 2008 CollabNet. All rights reserved.
+# Copyright (c) 2000-2006, 2008-2009 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -72,10 +72,7 @@ def get_txns(repo_dir):
exit_code, output_lines, error_lines = svntest.main.run_svnadmin('lstxns',
repo_dir)
- txns = list(map(output_lines.strip, output_lines))
-
- # sort, just in case
- txns.sort()
+ txns = sorted([output_lines.strip(x) for x in output_lines])
return txns
Modified: trunk/subversion/tests/cmdline/svnlook_tests.py
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svnlook_tests.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/subversion/tests/cmdline/svnlook_tests.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/subversion/tests/cmdline/svnlook_tests.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -6,7 +6,7 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Copyright (c) 2000-2004, 2007-2008 CollabNet. All rights reserved.
+# Copyright (c) 2000-2004, 2007-2009 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -144,8 +144,7 @@ def test_misc(sbox):
proplist = run_svnlook('proplist', '--revprop', repo_dir)
- proplist = [prop.strip() for prop in proplist]
- proplist.sort()
+ proplist = sorted([prop.strip() for prop in proplist])
# We cannot rely on svn:author's presence. ra_svn doesn't set it.
if not (proplist == [ 'svn:author', 'svn:date', 'svn:log' ]
Modified: trunk/subversion/tests/cmdline/svntest/actions.py
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svntest/actions.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/subversion/tests/cmdline/svntest/actions.py Fri Jan 30 12:43:02 \
2009 (r35600)
+++ trunk/subversion/tests/cmdline/svntest/actions.py Fri Jan 30 12:47:46 \
2009 (r35601) @@ -967,8 +967,7 @@ def run_and_verify_mergeinfo(error_re_st
verify.verify_outputs(None, None, err, None, expected_err)
return
- out = [_f for _f in [int(x.rstrip()[1:]) for x in out] if _f]
- out.sort()
+ out = sorted([_f for _f in [int(x.rstrip()[1:]) for x in out] if _f])
expected_output.sort()
extra_out = []
Modified: trunk/subversion/tests/cmdline/svntest/tree.py
URL: http://svn.collab.net/viewvc/svn/trunk/subversion/tests/cmdline/svntest/tree.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/subversion/tests/cmdline/svntest/tree.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/subversion/tests/cmdline/svntest/tree.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -5,7 +5,7 @@
# See http://subversion.tigris.org for more information.
#
# ====================================================================
-# Copyright (c) 2001, 2006, 2008 CollabNet. All rights reserved.
+# Copyright (c) 2001, 2006, 2008-2009 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -638,8 +638,7 @@ def dump_tree(n,indent=""):
the SVNTreeNode N. Prefix each line with the string INDENT."""
# Code partially stolen from Dave Beazley
- tmp_children = n.children or []
- tmp_children.sort()
+ tmp_children = sorted(n.children or [])
if n.name == root_node_name:
print("%s%s" % (indent, "ROOT"))
Modified: trunk/tools/bdb/svn-bdb-view.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/bdb/svn-bdb-view.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/bdb/svn-bdb-view.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/bdb/svn-bdb-view.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -153,8 +153,7 @@ def am_nodes(ctx):
nid,cid,tid = rec[0].split(".")
data[tid.rjust(20)+nd.createpath] = (rec[0], nd)
rec = cur.next()
- k = list(data.keys())
- k.sort()
+ k = sorted(data.keys())
reptype = {"fulltext":"F", "delta":"D"}
for i in k:
nd = data[i][1]
Modified: trunk/tools/dev/contribulyze.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/dev/contribulyze.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/dev/contribulyze.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/dev/contribulyze.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -363,8 +363,7 @@ class Contributor:
self.big_name(html=True), True))
unique_logs = { }
- sorted_activities = list(self.activities.keys())
- sorted_activities.sort()
+ sorted_activities = sorted(self.activities.keys())
out.write('<div class="h2" id="activities" title="activities">\n\n')
out.write('<table border="1">\n')
@@ -657,8 +656,7 @@ def drop(revision_url_pattern):
# sort by number of contributions, so the most active people appear at
# the top -- that way we know whom to look at first for commit access
# proposals.
- sorted_contributors = list(Contributor.all_contributors.values())
- sorted_contributors.sort()
+ sorted_contributors = sorted(Contributor.all_contributors.values())
for c in sorted_contributors:
if c not in seen_contributors:
if c.score() > 0:
Modified: trunk/tools/dev/gen-javahl-errors.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/dev/gen-javahl-errors.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/dev/gen-javahl-errors.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/dev/gen-javahl-errors.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -4,7 +4,7 @@
# C error codes
#
# ====================================================================
-# Copyright (c) 2007-2008 CollabNet. All rights reserved.
+# Copyright (c) 2007-2009 CollabNet. All rights reserved.
#
# * This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -58,8 +58,7 @@ public class ErrorCodes
{
""")
- keys = list(error_codes.keys())
- keys.sort()
+ keys = sorted(error_codes.keys())
for key in keys:
# Format the code name to be more Java-esque
Modified: trunk/tools/dev/normalize-dump.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/dev/normalize-dump.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/dev/normalize-dump.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/dev/normalize-dump.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -12,8 +12,7 @@ class NodePath:
def dump(self):
print((' ' * 3) + self.path)
- headers = list(self.headers.keys())
- headers.sort()
+ headers = sorted(self.headers.keys())
for header in headers:
print((' ' * 6) + header + ': ' + self.headers[header])
@@ -21,8 +20,7 @@ class NodePath:
def dump_revision(rev, nodepaths):
sys.stderr.write('* Normalizing revision ' + rev + '...')
print('Revision ' + rev)
- paths = list(nodepaths.keys())
- paths.sort()
+ paths = sorted(nodepaths.keys())
for path in paths:
nodepath = nodepaths[path]
nodepath.dump()
Modified: trunk/tools/dev/which-error.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/dev/which-error.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/dev/which-error.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/dev/which-error.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -5,7 +5,7 @@
# their numeric error code values
#
# ====================================================================
-# Copyright (c) 2005, 2008 CollabNet. All rights reserved.
+# Copyright (c) 2005, 2008-2009 CollabNet. All rights reserved.
#
# * This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -89,8 +89,7 @@ if __name__ == "__main__":
if sys.argv[1] == 'list':
if len(sys.argv) > 2:
usage_and_exit()
- codes = list(__svn_error_codes.keys())
- codes.sort()
+ codes = sorted(__svn_error_codes.keys())
# Get a list of code by parsing stdin for apr_err=CODE instances
elif sys.argv[1] == 'parse':
Modified: trunk/tools/examples/svnshell.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/examples/svnshell.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/examples/svnshell.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/examples/svnshell.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -5,7 +5,7 @@
#
######################################################################
#
-# Copyright (c) 2000-2004, 2008 CollabNet. All rights reserved.
+# Copyright (c) 2000-2004, 2008-2009 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -117,8 +117,7 @@ class SVNShell(Cmd):
print("Path '%s' not found." % newpath)
return
- keys = list(entries.keys())
- keys.sort()
+ keys = sorted(entries.keys())
print(" REV AUTHOR NODE-REV-ID SIZE DATE NAME")
print("----------------------------------------------------------------------------")
@@ -150,8 +149,7 @@ class SVNShell(Cmd):
def do_lstxns(self, arg):
"""list the transactions available for browsing"""
- txns = fs.list_transactions(self.fs_ptr)
- txns.sort()
+ txns = sorted(fs.list_transactions(self.fs_ptr))
counter = 0
for txn in txns:
counter = counter + 1
Modified: trunk/tools/hook-scripts/mailer/mailer.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/hook-scripts/mailer/mailer.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/hook-scripts/mailer/mailer.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/hook-scripts/mailer/mailer.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -321,16 +321,14 @@ class Commit(Messenger):
e_ptr, e_baton = svn.delta.make_editor(editor, self.pool)
svn.repos.replay(repos.root_this, e_ptr, e_baton, self.pool)
- self.changelist = list(editor.get_changes().items())
- self.changelist.sort()
+ self.changelist = sorted(editor.get_changes().items())
# collect the set of groups and the unique sets of params for the options
self.groups = { }
for path, change in self.changelist:
for (group, params) in self.cfg.which_groups(path):
# turn the params into a hashable object and stash it away
- param_list = list(params.items())
- param_list.sort()
+ param_list = sorted(params.items())
# collect the set of paths belonging to this group
if (group, tuple(param_list)) in self.groups:
old_param, paths = self.groups[group, tuple(param_list)]
@@ -418,8 +416,7 @@ class PropChange(Messenger):
self.groups = { }
for (group, params) in self.cfg.which_groups(''):
# turn the params into a hashable object and stash it away
- param_list = list(params.items())
- param_list.sort()
+ param_list = sorted(params.items())
self.groups[group, tuple(param_list)] = params
self.output.subject = 'r%d - %s' % (repos.rev, propname)
@@ -509,8 +506,7 @@ class Lock(Messenger):
for path in self.dirlist:
for (group, params) in self.cfg.which_groups(path):
# turn the params into a hashable object and stash it away
- param_list = list(params.items())
- param_list.sort()
+ param_list = sorted(params.items())
# collect the set of paths belonging to this group
if (group, tuple(param_list)) in self.groups:
old_param, paths = self.groups[group, tuple(param_list)]
Modified: trunk/tools/po/l10n-report.py
URL: http://svn.collab.net/viewvc/svn/trunk/tools/po/l10n-report.py?pathrev=35601&r1=35600&r2=35601
==============================================================================
--- trunk/tools/po/l10n-report.py Fri Jan 30 12:43:02 2009 (r35600)
+++ trunk/tools/po/l10n-report.py Fri Jan 30 12:47:46 2009 (r35601)
@@ -140,8 +140,7 @@ def main():
(branch_name, wc_version)
os.chdir(po_dir)
- files = os.listdir('.')
- files.sort()
+ files = sorted(os.listdir('.'))
format_head = "%6s %7s %7s %7s %7s" % ("lang", "trans", "untrans",
"fuzzy", "obs")
format_line = "--------------------------------------"
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=495&dsMessageId=1076466
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic