mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-16 01:21:07 +00:00
wrap-and-sort: Remove duplicate items from sorted lists.
This commit is contained in:
parent
b6582c2c6e
commit
ba64f36109
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,5 +1,6 @@
|
|||||||
ubuntu-dev-tools (0.107) UNRELEASED; urgency=low
|
ubuntu-dev-tools (0.107) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
[ Stefano Rivera ]
|
||||||
* edit-patch: Detect quilt patch-system in 3.0 (quilt) packages without any
|
* edit-patch: Detect quilt patch-system in 3.0 (quilt) packages without any
|
||||||
patches yet.
|
patches yet.
|
||||||
* wrap-and-sort:
|
* wrap-and-sort:
|
||||||
@ -11,7 +12,10 @@ ubuntu-dev-tools (0.107) UNRELEASED; urgency=low
|
|||||||
when unpacking source packages. 3.0 (quilt) has optional per-vendor patch
|
when unpacking source packages. 3.0 (quilt) has optional per-vendor patch
|
||||||
series.
|
series.
|
||||||
|
|
||||||
-- Stefano Rivera <stefanor@ubuntu.com> Wed, 24 Nov 2010 21:31:51 +0200
|
[ Benjamin Drung ]
|
||||||
|
* wrap-and-sort: Remove duplicate items from sorted lists.
|
||||||
|
|
||||||
|
-- Benjamin Drung <bdrung@ubuntu.com> Wed, 24 Nov 2010 21:00:40 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.106) experimental; urgency=low
|
ubuntu-dev-tools (0.106) experimental; urgency=low
|
||||||
|
|
||||||
|
@ -66,10 +66,12 @@ class Control(object):
|
|||||||
def _wrap_field(self, control, entry, wrap_always, short_indent, sort=True):
|
def _wrap_field(self, control, entry, wrap_always, short_indent, sort=True):
|
||||||
packages = map(lambda x: x.strip(), control[entry].split(","))
|
packages = map(lambda x: x.strip(), control[entry].split(","))
|
||||||
if sort:
|
if sort:
|
||||||
packages = sort_list(packages)
|
# Remove duplicate entries
|
||||||
|
packages = set(packages)
|
||||||
# Not explicitly disallowed by Policy but known to break QA tools:
|
# Not explicitly disallowed by Policy but known to break QA tools:
|
||||||
if "" in packages:
|
if "" in packages:
|
||||||
packages.remove("")
|
packages.remove("")
|
||||||
|
packages = sort_list(packages)
|
||||||
|
|
||||||
length = len(entry) + 2 * len(packages) + sum(map(len, packages))
|
length = len(entry) + 2 * len(packages) + sum(map(len, packages))
|
||||||
if wrap_always or length > 80:
|
if wrap_always or length > 80:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user