commit python-bugzilla for openSUSE:Factory
Hello community, here is the log from the commit of package python-bugzilla for openSUSE:Factory checked in at Fri Jul 29 11:53:49 CEST 2011. -------- --- python-bugzilla/python-bugzilla.changes 2011-05-23 16:04:59.000000000 +0200 +++ /mounts/work_src_done/STABLE/python-bugzilla/python-bugzilla.changes 2011-07-29 11:06:20.000000000 +0200 @@ -1,0 +2,12 @@ +Fri Jul 29 09:04:07 UTC 2011 - mvyskocil@suse.cz + +- update to 0.6.2, rebased all patches + * backport --outputformat feature from git + +------------------------------------------------------------------- +Fri Jul 29 08:50:47 UTC 2011 - mvyskocil@suse.cz + +- add 0005-Add-Bugzilla34._query.patch fixing query command +- add 0020-allow-various-bnc-instances-in-NovellBugzilla.patch + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- 0012-Fix-for-httplib-xmlrpclib-changes-in-py2.7.patch 0016-obfuscated-password-support-in-oscrc.patch 0017-fix-typo-in-url-argument.patch 0018-novell-bugzilla-support-in-getBugzillaClassForURL.patch 0019-novell-bugzilla-run-on-3.4.patch python-bugzilla-0.6.1.tar.bz2 New: ---- 0006-cli-speedup-request-outputformat-fields-when-doing-q.patch 0007-fixup-for-cli-speedup-with-query-outputformat.patch 0013-obfuscated-password-support-in-oscrc.patch 0014-fix-typo-in-url-argument.patch 0015-novell-bugzilla-support-in-getBugzillaClassForURL.patch 0016-novell-bugzilla-run-on-3.4.patch 0017-allow-various-bnc-instances-in-NovellBugzilla.patch python-bugzilla-0.6.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-bugzilla.spec ++++++ --- /var/tmp/diff_new_pack.aoeWa7/_old 2011-07-29 11:53:00.000000000 +0200 +++ /var/tmp/diff_new_pack.aoeWa7/_new 2011-07-29 11:53:00.000000000 +0200 @@ -19,7 +19,7 @@ Name: python-bugzilla -Version: 0.6.1 +Version: 0.6.2 Release: 1 Summary: Python library for bugzilla Group: Development/Libraries/Python @@ -28,12 +28,14 @@ Source: https://fedorahosted.org/releases/p/y/python-bugzilla/%{name}-%{version}.tar.bz2 # generated from python-bugzilla/suse # https://gitorious.org/opensuse/python-bugzilla/commits/suse -# cherry-picked patches from git format-patch suse...0.6.1 -Patch0: 0012-Fix-for-httplib-xmlrpclib-changes-in-py2.7.patch -Patch1: 0016-obfuscated-password-support-in-oscrc.patch -Patch2: 0017-fix-typo-in-url-argument.patch -Patch3: 0018-novell-bugzilla-support-in-getBugzillaClassForURL.patch -Patch4: 0019-novell-bugzilla-run-on-3.4.patch +# cherry-picked patches from git format-patch 0.6.2...suse +Patch0: 0006-cli-speedup-request-outputformat-fields-when-doing-q.patch +Patch1: 0007-fixup-for-cli-speedup-with-query-outputformat.patch +Patch2: 0013-obfuscated-password-support-in-oscrc.patch +Patch3: 0014-fix-typo-in-url-argument.patch +Patch4: 0015-novell-bugzilla-support-in-getBugzillaClassForURL.patch +Patch5: 0016-novell-bugzilla-run-on-3.4.patch +Patch6: 0017-allow-various-bnc-instances-in-NovellBugzilla.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel BuildArch: noarch @@ -57,6 +59,8 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 %build export CFLAGS="%{optflags}" ++++++ 0006-cli-speedup-request-outputformat-fields-when-doing-q.patch ++++++
From 94338c8d931cae0d40a0343ec85018b36f7c8695 Mon Sep 17 00:00:00 2001 From: Will Woods
Date: Mon, 13 Jun 2011 13:15:06 -0400 Subject: [PATCH 06/17] cli speedup: request --outputformat fields when doing query
Add the fields listed in --outputformat to the query's 'column_list' argument. This should give us all the data we want to display right in the query result, which should greatly speed up query --outputformat. --- bin/bugzilla | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/bugzilla b/bin/bugzilla index e0810eb..833c5a2 100755 --- a/bin/bugzilla +++ b/bin/bugzilla @@ -41,6 +41,8 @@ def to_encoding(ustring): return ustring return u'' +format_field_re = re.compile("%{([a-z0-9_]+)(?::([^}]*))?}") + def setup_parser(): u = "%prog [global options] COMMAND [command-options]" u += "\nCommands: %s" % ', '.join(cmdlist) @@ -551,6 +553,14 @@ def main(): if opt.output == 'oneline': q['column_list'] = [ 'bug_id', 'bug_status', 'assigned_to', 'component', 'target_milestone', 'short_desc', 'flags', 'keywords', 'blockedby' ] + if opt.outputformat: + aliases = dict(bz.field_aliases) + for fieldname, sub in format_field_re.findall(opt.outputformat): + fields.append(fieldname) + if fieldname in aliases: + fields.append(aliases.get(fieldname)) + q['column_list'] = fields + log.debug("bz.query: %s", q) if not q: parser.error("'query' command requires additional arguments") @@ -692,14 +702,12 @@ def main(): # If we're doing new/query/modify, output our results if action in ['new','query']: if opt.outputformat: - format_field_re = re.compile("%{([a-z0-9_]+)(?::([^}]*))?}") special_fields = { 'flag': lambda b,f: b.get_flag_status(f), 'whiteboard': lambda b,wb: b.getwhiteboard(wb), } def bug_field(matchobj): - fieldname = matchobj.group(1) - rest = matchobj.group(2) + (fieldname, rest) = matchobj.groups() if special_fields.has_key(fieldname): val = special_fields[fieldname](b, rest) -- 1.7.6 ++++++ 0007-fixup-for-cli-speedup-with-query-outputformat.patch ++++++
From 1a37173fc0e63f116878d6e99718ae12708a3174 Mon Sep 17 00:00:00 2001 From: Will Woods
Date: Mon, 13 Jun 2011 18:02:27 -0400 Subject: [PATCH 07/17] fixup for cli speedup with query --outputformat
Forgot to initialize a variable. whoops.
---
bin/bugzilla | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/bin/bugzilla b/bin/bugzilla
index 833c5a2..b0eeeaa 100755
--- a/bin/bugzilla
+++ b/bin/bugzilla
@@ -555,11 +555,12 @@ def main():
'target_milestone', 'short_desc', 'flags', 'keywords', 'blockedby' ]
if opt.outputformat:
aliases = dict(bz.field_aliases)
+ req_fields = []
for fieldname, sub in format_field_re.findall(opt.outputformat):
- fields.append(fieldname)
+ req_fields.append(fieldname)
if fieldname in aliases:
- fields.append(aliases.get(fieldname))
- q['column_list'] = fields
+ req_fields.append(aliases.get(fieldname))
+ q['column_list'] = req_fields
log.debug("bz.query: %s", q)
if not q:
--
1.7.6
++++++ 0016-obfuscated-password-support-in-oscrc.patch -> 0013-obfuscated-password-support-in-oscrc.patch ++++++
--- python-bugzilla/0016-obfuscated-password-support-in-oscrc.patch 2011-05-23 16:04:58.000000000 +0200
+++ /mounts/work_src_done/STABLE/python-bugzilla/0013-obfuscated-password-support-in-oscrc.patch 2011-07-29 11:06:18.000000000 +0200
@@ -1,7 +1,7 @@
-From b8de888a2b4aad939ff4373893210334e581f270 Mon Sep 17 00:00:00 2001
+From 89ca368861e9570639e6873c1c51fb3936dd77d9 Mon Sep 17 00:00:00 2001
From: Michal Vyskocil
From 25f24e68d5005b500dd000f90ae5ebec8a2ba70d Mon Sep 17 00:00:00 2001 From: Michal Vyskocil
Date: Thu, 26 May 2011 11:00:33 +0200 Subject: [PATCH 17/17] allow various bnc instances in NovellBugzilla
The older NovellBugzilla implementation was limited to bugzilla.novell.com, so using of internal testing instace was not possible. So code in NovellBugzilla.__init__ and getBugzillaClassForURL search for 'novell.com' string only. In adition NovellBugzilla.__init__ add a url= argument to kwargs if not exists or if it does not contain novell.com, so this class can be simple instantiated without arguments in some cases. --- bugzilla/__init__.py | 2 +- bugzilla/nvlbugzilla.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bugzilla/__init__.py b/bugzilla/__init__.py index a3a88d2..fcfffd6 100644 --- a/bugzilla/__init__.py +++ b/bugzilla/__init__.py @@ -23,7 +23,7 @@ classlist = ['Bugzilla3', 'Bugzilla32', 'Bugzilla34', 'Bugzilla36', def getBugzillaClassForURL(url): log.debug("Choosing subclass for %s" % url) - if url.startswith('https://bugzilla.novell.com'): + if 'novell.com' in url: return NovellBugzilla s = xmlrpclib.ServerProxy(url) diff --git a/bugzilla/nvlbugzilla.py b/bugzilla/nvlbugzilla.py index 62b75b7..15879f1 100644 --- a/bugzilla/nvlbugzilla.py +++ b/bugzilla/nvlbugzilla.py @@ -55,9 +55,11 @@ class NovellBugzilla(Bugzilla34): def __init__(self, expires=300, **kwargs): self._expires = expires + # allow proper usage of NovellBugzilla with a wrong url argument + # (without it or with an another location) + if not 'novell.com' in kwargs.get('url', ''): + kwargs['url'] = self.__class__.bugzilla_url super(NovellBugzilla, self).__init__(**kwargs) - # url argument exists only for backward compatibility, but is always set to same url - self.url = self.__class__.bugzilla_url def __get_expiration(self): return self._expires -- 1.7.6 ++++++ python-bugzilla-0.6.1.tar.bz2 -> python-bugzilla-0.6.2.tar.bz2 ++++++ ++++ 1750 lines of diff (skipped) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de