From c4fe20ef4fe29bf6d98ee5b2eee06d8f277c7b1b Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Mon, 6 Sep 2010 18:14:04 -0400 Subject: cfbe: API: implement search-by-target --- interfaces/web/web.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/interfaces/web/web.py b/interfaces/web/web.py index d910420..77c3c09 100644 --- a/interfaces/web/web.py +++ b/interfaces/web/web.py @@ -6,7 +6,8 @@ import cherrypy from libbe import storage from libbe import bugdir -from libbe.command.depend import get_blocks +from libbe.command.depend import get_blocked_by, get_blocks +from libbe.command.target import bug_from_target_summary, bug_target from libbe.command.util import bug_comment_from_user_id from libbe.storage.util import settings_object @@ -67,8 +68,16 @@ class WebInterface: if target != '': target = None if target == 'None' else target - bugs = [bug for bug in bugs if bug.target == target] - + if target == None: + # Return all bugs that don't block any targets. + return [bug for bug in bugs if not bug_target(self.bd, bug)] + else: + # Return all bugs that block the supplied target. + targetbug = bug_from_target_summary(self.bd, target) + if targetbug == None: + return [] + bugs = [bug for bug in get_blocked_by(self.bd, targetbug) if + bug.active] return bugs -- cgit From f1c6c6a0122c5bed01ab7a084da1f2a67e796f37 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Mon, 6 Sep 2010 18:26:59 -0400 Subject: cfbe: typo: Unschdeuled -> Unscheduled --- interfaces/web/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/web/web.py b/interfaces/web/web.py index 77c3c09..4d922e2 100644 --- a/interfaces/web/web.py +++ b/interfaces/web/web.py @@ -100,7 +100,7 @@ class WebInterface: label += ' Currently Unassigned' if assignee == 'None' \ else ' Assigned to %s' % (assignee,) if target != '': - label += ' Currently Unschdeuled' if target == 'None' \ + label += ' Currently Unscheduled' if target == 'None' \ else ' Scheduled for %s' % (target,) bugs = self.filter_bugs(status, assignee, target) -- cgit From 8d1acfb3314d9276f3c6d5fa9c64ac93c4052775 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Mon, 6 Sep 2010 18:35:19 -0400 Subject: cfbe: Fix assigned-to-None search --- interfaces/web/templates/base.html | 4 +++- interfaces/web/web.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/interfaces/web/templates/base.html b/interfaces/web/templates/base.html index 8f22d73..9666d3e 100644 --- a/interfaces/web/templates/base.html +++ b/interfaces/web/templates/base.html @@ -90,7 +90,9 @@ diff --git a/interfaces/web/web.py b/interfaces/web/web.py index 4d922e2..44bdef1 100644 --- a/interfaces/web/web.py +++ b/interfaces/web/web.py @@ -63,7 +63,7 @@ class WebInterface: bugs = [bug for bug in self.bd if bug.status in status] if assignee != '': - assignee = EMPTY if assignee == 'None' else assignee + assignee = None if assignee == 'None' else assignee bugs = [bug for bug in bugs if bug.assigned == assignee] if target != '': -- cgit From d542ab20d7fbb1c98d8fb7b03da37b6e211987d8 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Mon, 6 Sep 2010 18:39:35 -0400 Subject: cfbe: Remove "target" column from default bug list As discussed at: http://void.printf.net/pipermail/be-devel/2010-September/000626.html --- interfaces/web/templates/list.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/interfaces/web/templates/list.html b/interfaces/web/templates/list.html index 216b731..65e6fe2 100644 --- a/interfaces/web/templates/list.html +++ b/interfaces/web/templates/list.html @@ -10,7 +10,6 @@ ID Summary Status - Target Assigned To {% for bug in bugs %} @@ -19,7 +18,6 @@ {{ bug.summary|e|truncate(70) }} {{ bug.status }} - {{ bug.target }} {{ bug.assigned|striptags }} {% endfor %} -- cgit From fe99ef2f6148790ef792ecf47ca3629a4d367890 Mon Sep 17 00:00:00 2001 From: Chris Ball Date: Mon, 6 Sep 2010 19:04:19 -0400 Subject: cfbe: API: fix editing a bug's target --- interfaces/web/web.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/interfaces/web/web.py b/interfaces/web/web.py index 44bdef1..a99758c 100644 --- a/interfaces/web/web.py +++ b/interfaces/web/web.py @@ -7,6 +7,7 @@ import cherrypy from libbe import storage from libbe import bugdir from libbe.command.depend import get_blocked_by, get_blocks +from libbe.command.target import add_target, remove_target from libbe.command.target import bug_from_target_summary, bug_target from libbe.command.util import bug_comment_from_user_id from libbe.storage.util import settings_object @@ -180,10 +181,18 @@ class WebInterface: bug.summary = summary else: bug.status = status if status != 'None' else None - bug.target = target if target != 'None' else None bug.assigned = assignee if assignee != 'None' else None bug.severity = severity if severity != 'None' else None + if target: + current_target = bug_target(self.bd, bug) + if current_target: + remove_target(self.bd, bug) + if target != "None": + add_target(self.bd, bug, target) + else: + add_target(self.bd, bug, target) + bug.save() raise cherrypy.HTTPRedirect( -- cgit From 8c9f876ae69f7bf92686edea320931d875b5c681 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 28 Sep 2010 21:25:43 -0400 Subject: Converted man page source to DocBook V5.0. This has the dual benefits of keeping up with the current DocBook standard as well as removing the dependency on SGML parsers like docbook-to-man and docbook2man which may not be available on all systems. An XSLT processor and the DocBook style sheets are easier dependencies to satisfy. --- Makefile | 10 ++-- doc/man/be.1.sgml | 134 ------------------------------------------------------ doc/man/be.1.xml | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 137 deletions(-) delete mode 100644 doc/man/be.1.sgml create mode 100644 doc/man/be.1.xml diff --git a/Makefile b/Makefile index 0b96832..c7203df 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,11 @@ # along with Bugs Everywhere. If not, see . SHELL = /bin/bash -RM = rm +RM = /bin/rm +DB2MAN = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl +XP = /usr/bin/xsltproc --nonet --param man.charmap.use.subset "0" \ + --param make.year.ranges "1" --param make.single.year.ranges "1" + #PATH = /usr/bin:/bin # must include sphinx-build for 'sphinx' target. #PREFIX = /usr/local @@ -75,8 +79,8 @@ libbe/_version.py: .PHONY: man man: ${MANPAGE_FILES} -%.1: %.1.sgml - docbook-to-man $< > $@ +%.1: %.1.xml + $(XP) -o $@ $(DB2MAN) $< .PHONY: sphinx sphinx: diff --git a/doc/man/be.1.sgml b/doc/man/be.1.sgml deleted file mode 100644 index a2df21f..0000000 --- a/doc/man/be.1.sgml +++ /dev/null @@ -1,134 +0,0 @@ - manpage.1'. You may view - the manual page with: `docbook-to-man manpage.sgml | nroff -man | - less'. A typical entry in a Makefile or Makefile.am is: - -be.1: be.1.sgml - docbook-to-man $< > $@ - - The docbook-to-man binary is found in the docbook-to-man package. - Please remember that if you create the nroff version in one of the - debian/rules file targets (such as build), you will need to include - docbook-to-man in your Build-Depends control field. - - --> - - Ben"> - Finney"> - - 2009-06-25"> - - 1"> - ben+debian@benfinney.id.au"> - - BUGS-EVERYWHERE"> - - - BE"> - - - Debian"> - GNU"> - GPL"> -]> - - - -
- &dhemail; -
- - &dhfirstname; - &dhsurname; - - - 2009 - &dhusername; - - &dhdate; -
- - &uccmdname; - - &dhsection; - - - &cmdname; - - distributed bug tracker - - - - &cmdname; - command - command_options ... - command_args ... - - - &cmdname; help - - - &cmdname; help - command - - - - DESCRIPTION - - This manual page documents briefly the - &cmdname; command, part of the - &pkgfullname; package. - - &cmdname; allows commandline interaction - with the &pkgfullname; database in a project tree. - - - - COMMANDS - - - help - - - Print help for be and a list of all available commands. - - - - - - - AUTHOR - - This manual page was written by &dhusername; <&dhemail;> for - the &debian; system (but may be used by others). Permission is - granted to copy, distribute and/or modify this document under - the terms of the &gnu; General Public License, Version 2 or any - later version published by the Free Software Foundation. - - - On Debian systems, the complete text of the GNU General Public - License can be found in /usr/share/common-licenses/GPL. - - - -
- - diff --git a/doc/man/be.1.xml b/doc/man/be.1.xml new file mode 100644 index 0000000..3b5c8d0 --- /dev/null +++ b/doc/man/be.1.xml @@ -0,0 +1,133 @@ + + + + + + + + + + +]> + +
+&pkgfullname; Refentries + + + Debian + &dhdate; +
+ &dhemail; +
+ + + &dhfirstname; + &dhsurname; + Created the initial SGML version of this manpage for + the Debian system. +
+ &dhemail; +
+
+ + W. Trevor + King + Converted this manpage to DocBook 5 XML and extended + following + + dh_make + 8 + 's + manpage.xml.ex. +
+ &dhemail; +
+
+
+ + 2009 + 2010 + &dhusername; + + + This manual page was written for the Debian system + (and may be used by others). + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU General Public License, + Version 2 or (at your option) any later version published by + the Free Software Foundation. + On Debian systems, the complete text of the GNU General Public + License can be found in + /usr/share/common-licenses/GPL. + +
+ + &uccmdname; + &dhsection; + + + &cmdname; + distributed bug tracker + + + + &cmdname; + options + command + command_options + command_args + + + + DESCRIPTION + + This manual page documents briefly the + &cmdname; command, part of the &pkgfullname; + package. + + &cmdname; allows commandline interaction + with the &pkgfullname; database in a project tree. + + To avoid bit-rotted documentation, we do not describe all + available commands and options in this manpage. + Run &cmdname; help for accurate + documentation. See + the &pkgfullname; + Manual for more detailed documentation and + tutorials. + + + + COMMANDS + + + help + + + Print help for be and a list of all + available commands. + + + + + + EXAMPLES + + + &cmdname; help + + Show general help and a list of all commands. + + + + &cmdname; help init + + Show help for the init command. + + + + +
+
-- cgit From e3ec1f6f6d0f8ad5bc3777aa49f96d43aa9ffacc Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 28 Sep 2010 21:29:34 -0400 Subject: Wrap `rm` in the RM variable in doc/Makefile. This is more consistent with the example set by the root Makefile. --- doc/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/Makefile b/doc/Makefile index 6d7bbc5..71698a8 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,5 +1,6 @@ # Makefile for Sphinx documentation # +RM = /bin/rm # You can set these variables from the command line. SPHINXOPTS = @@ -29,7 +30,7 @@ help: @echo " libbe to autogenerate files for all libbe modules" clean: - -rm -rf $(BUILDDIR) libbe + $(RM) -rf $(BUILDDIR) libbe html: libbe $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html -- cgit From c293f2eaed1d3ebccd3e474c77557d2624e2ccc9 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 28 Sep 2010 21:30:57 -0400 Subject: Add dependency section to doc/install.txt. --- doc/install.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/install.txt b/doc/install.txt index 796d163..cea0a98 100644 --- a/doc/install.txt +++ b/doc/install.txt @@ -2,6 +2,38 @@ Installing BE ************* +Dependencies +============ + +============== ======================= ============= =========================== +Package Role Debian Gentoo +============== ======================= ============= =========================== +PyYAML_ serialized data storage python-yaml dev-python/pyyaml +Sphinx_ see :doc:`doc` python-sphinx dev-python/sphinx +numpydoc_ see :doc:`doc` +xsltproc_ see :doc:`doc` xsltproc dev-libs/libxslt +============== ======================= ============= =========================== + +The XSLT stylesheets reqired to generate the manpage are packaged in +``docbook-xsl-ns`` on Debian [#debian] and +``app-text/docbook-xsl-ns-stylesheets`` on Gentoo [#gentoo]. For +futher details on DocBook publishing, see the DocBook wiki pages on +tools_ and stylesheets_. + +.. _PyYAML: http://pyyaml.org/ +.. _Sphinx: http://sphinx.pocoo.org/ +.. _numpydoc: http://pypi.python.org/pypi/numpydoc +.. _xsltproc: http://www.xmlsoft.org/XSLT/ +.. [#debian] See bugs `490716 + `_ + and `447959 + `_. +.. [#gentoo] See Diego Elio Pettenò's `blog entry + `_. +.. _tools: http://wiki.docbook.org/topic/DocBookPublishingTools +.. _stylesheets: http://wiki.docbook.org/topic/DocBookXslStylesheets + + Git repository ============== -- cgit From 0a993be001ab5ff250fae4c5f20bab11f89e30cb Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 28 Sep 2010 21:31:21 -0400 Subject: Add manpage/DocBook section to doc/doc.txt. --- doc/doc.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/doc.txt b/doc/doc.txt index e1b7a3a..1b2b5aa 100644 --- a/doc/doc.txt +++ b/doc/doc.txt @@ -21,3 +21,24 @@ syntax. http://docutils.sourceforge.net/docs/user/rst/quickref.html .. _NumPy/SciPy documentation guide: http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines + +Man page +======== + +The man-page source :file:`be.1.xml` is writen in DocBook 5 [#DB5]_ +format. The :file:`Makefile` converts it to :manpage:`roff(7)` format +using an XSLT stylesheet. See DocBook XSL [#DBXSL]_ for details. +See :doc:`install` for suggestions on setting up a DocBook 5 toolchain +in several distributions. + +The man page should conform to `Debian policy`_. + +.. [#DB5] + See Norman Walsh's `DocBook 5: The Definitive Guide + `_ + +.. [#DBXSL] + See Bob Stayton's `DocBook XSL: The Complete Guide + `_ + +.. _Debian policy: http://www.debian.org/doc/debian-policy/ch-docs.html#s12.1 -- cgit From 8f1cd4f5eecba8e3322ea6725d71e430520d1585 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 12 Oct 2010 15:25:45 -0400 Subject: Point out that official packages may not be up to date. --- doc/install.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/install.txt b/doc/install.txt index cea0a98..7278c01 100644 --- a/doc/install.txt +++ b/doc/install.txt @@ -83,5 +83,7 @@ distros, that's:: $ apt-get install bugs-everywhere +However, the official packages can lag behind current development. + .. _Debian: http://packages.debian.org/sid/bugs-everywhere .. _Ubuntu: http://packages.ubuntu.com/lucid/bugs-everywhere -- cgit