Skip to content

Commit

Permalink
remove unnecessary whitespace and just print old version instead of r…
Browse files Browse the repository at this point in the history
…epeating name=version
  • Loading branch information
frisi committed Sep 18, 2013
1 parent fa0ed7b commit 0bad0b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/z3c/checkversions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def check(self, level=0):
By default, the highest version is found.
"""
versions = self.get_versions()

for name, version in sorted(versions.items()):
if self.incremental == 'stop':
# skip subsequent scans
Expand Down Expand Up @@ -119,7 +119,7 @@ def check(self, level=0):
if self.incremental == True:
self.incremental = 'stop'
if self.verbose:
print("%s=%s # was: %s=%s" % (name, new_dist.version, name, version))
print("%s=%s # was: %s" % (name, new_dist.version, version))
else:
print("%s=%s" % (name, new_dist.version))
elif self.verbose:
Expand Down
16 changes: 8 additions & 8 deletions src/z3c/checkversions/buildout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ using grep (``bin/checkversions -v | grep was``)
>>> checker = buildout.Checker(filename=buildout_path, verbose=True)
>>> checker.check(level=2)
# Checking buildout file ...
zope.component=3.0.3 # was: zope.component=3.0.0
zope.interface=3.4.1 # was: zope.interface=3.4.0
zope.component=3.0.3 # was: 3.0.0
zope.interface=3.4.1 # was: 3.4.0

The old comments are removed:

Expand All @@ -80,8 +80,8 @@ The old comments are removed:
>>> checker = buildout.Checker(filename=buildout_path, verbose=True)
>>> checker.check()
# Checking buildout file ...
zope.component=3.9.4 # was: zope.component=3.0.3
zope.interface=3.6.1 # was: zope.interface=3.4.1
zope.component=3.9.4 # was: 3.0.3
zope.interface=3.6.1 # was: 3.4.1

We can provide a blacklist file, containing versions to not suggest.
This file may come from a buildbot remembering failures.
Expand All @@ -95,8 +95,8 @@ This file may come from a buildbot remembering failures.
... blacklist=blacklist_path)
>>> checker.check()
# Checking buildout file ...
zope.component=3.9.2 # was: zope.component=3.0.3
zope.interface=3.6.1 # was: zope.interface=3.4.1
zope.component=3.9.2 # was: 3.0.3
zope.interface=3.6.1 # was: 3.4.1

We can let the checker to suggest only one new package. This should be used to
test a just single new package against a set of other packages.
Expand All @@ -107,7 +107,7 @@ test a just single new package against a set of other packages.
... blacklist=blacklist_path)
>>> checker.check()
# Checking buildout file ...
zope.component=3.9.2 # was: zope.component=3.0.3
zope.component=3.9.2 # was: 3.0.3
zope.interface=3.4.1

>>> os.remove(blacklist_path)
Expand Down Expand Up @@ -151,6 +151,6 @@ pinned.
# Checking buildout file ...
distribute=
zc.buildout=...
zope.component=3.9.4 # was: zope.component=3.0.0
zope.component=3.9.4 # was: 3.0.0

>>> os.remove(buildout_path)

0 comments on commit 0bad0b2

Please sign in to comment.