aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile10
-rw-r--r--doc/Makefile3
-rw-r--r--doc/doc.txt21
-rw-r--r--doc/install.txt34
-rw-r--r--doc/man/be.1.sgml134
-rw-r--r--doc/man/be.1.xml133
-rw-r--r--interfaces/web/web.py17
7 files changed, 213 insertions, 139 deletions
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 <http://www.gnu.org/licenses/>.
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/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
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
+ <http://www.docbook.org/>`_
+
+.. [#DBXSL]
+ See Bob Stayton's `DocBook XSL: The Complete Guide
+ <http://www.sagehill.net/book-description.html>`_
+
+.. _Debian policy: http://www.debian.org/doc/debian-policy/ch-docs.html#s12.1
diff --git a/doc/install.txt b/doc/install.txt
index 796d163..7278c01 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
+ <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490716>`_
+ and `447959
+ <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=447959>`_.
+.. [#gentoo] See Diego Elio Pettenò's `blog entry
+ <http://blog.flameeyes.eu/2008/09/22/docbook-5-and-gentoo>`_.
+.. _tools: http://wiki.docbook.org/topic/DocBookPublishingTools
+.. _stylesheets: http://wiki.docbook.org/topic/DocBookXslStylesheets
+
+
Git repository
==============
@@ -51,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
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 @@
-<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
-
-<!-- Process this file with docbook-to-man to generate an nroff manual
- page: `docbook-to-man manpage.sgml > 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.
-
- -->
-
- <!ENTITY dhfirstname "<firstname>Ben</firstname>">
- <!ENTITY dhsurname "<surname>Finney</surname>">
- <!-- Please adjust the date whenever revising the manpage. -->
- <!ENTITY dhdate "<date>2009-06-25</date>">
- <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
- allowed: see man(7), man(1). -->
- <!ENTITY dhsection "<manvolnum>1</manvolnum>">
- <!ENTITY dhemail "<email>ben+debian@benfinney.id.au</email>">
- <!ENTITY dhusername "Ben Finney">
- <!ENTITY dhucpackage "<refentrytitle>BUGS-EVERYWHERE</refentrytitle>">
- <!ENTITY dhpackage "bugs-everywhere">
- <!ENTITY pkgfullname "Bugs Everywhere">
- <!ENTITY uccmdname "<refentrytitle>BE</refentrytitle>">
- <!ENTITY cmdname "be">
-
- <!ENTITY debian "<productname>Debian</productname>">
- <!ENTITY gnu "<acronym>GNU</acronym>">
- <!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
-]>
-
-<refentry>
- <refentryinfo>
- <address>
- &dhemail;
- </address>
- <author>
- &dhfirstname;
- &dhsurname;
- </author>
- <copyright>
- <year>2009</year>
- <holder>&dhusername;</holder>
- </copyright>
- &dhdate;
- </refentryinfo>
- <refmeta>
- &uccmdname;
-
- &dhsection;
- </refmeta>
- <refnamediv>
- <refname>&cmdname;</refname>
-
- <refpurpose>distributed bug tracker</refpurpose>
- </refnamediv>
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>&cmdname;</command>
- <arg><replaceable>command</replaceable></arg>
- <arg><replaceable>command_options ...</replaceable></arg>
- <arg><replaceable>command_args ...</replaceable></arg>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>&cmdname; help</command>
- </cmdsynopsis>
- <cmdsynopsis>
- <command>&cmdname; help</command>
- <arg><replaceable>command</replaceable></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
- <refsect1>
- <title>DESCRIPTION</title>
-
- <para>This manual page documents briefly the
- <command>&cmdname;</command> command, part of the
- &pkgfullname; package.</para>
-
- <para><command>&cmdname;</command> allows commandline interaction
- with the &pkgfullname; database in a project tree.</para>
-
- </refsect1>
- <refsect1>
- <title>COMMANDS</title>
- <variablelist>
- <varlistentry>
- <term><command>help</command>
- </term>
- <listitem>
- <para>Print help for be and a list of all available commands.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
- <refsect1>
- <title>AUTHOR</title>
-
- <para>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.
- </para>
- <para>
- On Debian systems, the complete text of the GNU General Public
- License can be found in /usr/share/common-licenses/GPL.
- </para>
-
- </refsect1>
-</refentry>
-
-<!-- Keep this comment at the end of the file
-Local variables:
-mode: sgml
-sgml-omittag:t
-sgml-shorttag:t
-sgml-minimize-attributes:nil
-sgml-always-quote-attributes:t
-sgml-indent-step:2
-sgml-indent-data:t
-sgml-parent-document:nil
-sgml-default-dtd-file:nil
-sgml-exposed-tags:nil
-sgml-local-catalogs:nil
-sgml-local-ecat-files:nil
-End:
--->
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 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE article [
+ <!ENTITY dhfirstname "Ben">
+ <!ENTITY dhsurname "Finney">
+ <!ENTITY dhusername "&dhfirstname; &dhsurname;">
+ <!ENTITY dhemail "ben+debian@benfinney.id.au">
+ <!ENTITY dhdate "2010-09-28">
+ <!ENTITY dhsection "1">
+ <!ENTITY pkgfullname "Bugs Everywhere">
+ <!ENTITY uccmdname "BE">
+ <!ENTITY cmdname "be">
+]>
+
+<article xmlns="http://docbook.org/ns/docbook" version="5.0"
+ xmlns:xlink="http://www.w3.org/TR/xlink/">
+<title>&pkgfullname; Refentries</title>
+<refentry>
+ <info>
+ <productname>Debian</productname>
+ <date>&dhdate;</date>
+ <address>
+ <email>&dhemail;</email>
+ </address>
+ <authorgroup>
+ <author>
+ <firstname>&dhfirstname;</firstname>
+ <surname>&dhsurname;</surname>
+ <contrib>Created the initial SGML version of this manpage for
+ the Debian system.</contrib>
+ <address>
+ <email>&dhemail;</email>
+ </address>
+ </author>
+ <author>
+ <firstname>W. Trevor</firstname>
+ <surname>King</surname>
+ <contrib>Converted this manpage to DocBook 5 XML and extended
+ following
+ <citerefentry>
+ <refentrytitle>dh_make</refentrytitle>
+ <manvolnum>8</manvolnum>
+ </citerefentry>'s
+ <filename>manpage.xml.ex</filename>.</contrib>
+ <address>
+ <email>&dhemail;</email>
+ </address>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2009</year>
+ <year>2010</year>
+ <holder>&dhusername;</holder>
+ </copyright>
+ <legalnotice>
+ <para>This manual page was written for the Debian system
+ (and may be used by others).</para>
+ <para>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.</para>
+ <para>On Debian systems, the complete text of the GNU General Public
+ License can be found in
+ <filename>/usr/share/common-licenses/GPL</filename>.</para>
+ </legalnotice>
+ </info>
+ <refmeta>
+ <refentrytitle>&uccmdname;</refentrytitle>
+ <manvolnum>&dhsection;</manvolnum>
+ </refmeta>
+ <refnamediv>
+ <refname>&cmdname;</refname>
+ <refpurpose>distributed bug tracker</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&cmdname;</command>
+ <arg><replaceable>options</replaceable></arg>
+ <arg><replaceable>command</replaceable></arg>
+ <arg><replaceable>command_options</replaceable></arg>
+ <arg rep="repeat"><replaceable>command_args</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1 id="description">
+ <title>DESCRIPTION</title>
+
+ <para>This manual page documents briefly the
+ <command>&cmdname;</command> command, part of the &pkgfullname;
+ package.</para>
+
+ <para><command>&cmdname;</command> allows commandline interaction
+ with the &pkgfullname; database in a project tree.</para>
+
+ <para>To avoid bit-rotted documentation, we do not describe all
+ available commands and options in this manpage.
+ Run <command>&cmdname; help</command> for accurate
+ documentation. See
+ the <link xlink:href="http://docs.bugseverywhere.org/">&pkgfullname;
+ Manual</link> for more detailed documentation and
+ tutorials.</para>
+
+ </refsect1>
+ <refsect1 id="commands">
+ <title>COMMANDS</title>
+ <variablelist>
+ <varlistentry>
+ <term><command>help</command>
+ </term>
+ <listitem>
+ <para>Print help for <command>be</command> and a list of all
+ available commands.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="examples">
+ <title>EXAMPLES</title>
+ <glosslist>
+ <glossentry>
+ <glossterm><command>&cmdname; help</command></glossterm>
+ <glossdef>
+ <para>Show general help and a list of all commands.</para>
+ </glossdef>
+ </glossentry>
+ <glossentry>
+ <glossterm><command>&cmdname; help init</command></glossterm>
+ <glossdef>
+ <para>Show help for the <command>init</command> command.</para>
+ </glossdef>
+ </glossentry>
+ </glosslist>
+ </refsect1>
+</refentry>
+</article>
diff --git a/interfaces/web/web.py b/interfaces/web/web.py
index 2cfdd04..dcb205b 100644
--- a/interfaces/web/web.py
+++ b/interfaces/web/web.py
@@ -7,7 +7,8 @@ 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, bug_from_target_summary, bug_target
+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
@@ -77,7 +78,11 @@ class WebInterface:
if targetbug == None:
return []
bugs = [bug for bug in get_blocked_by(self.bd, targetbug) if
+<<<<<<< HEAD
bug.status not in ('closed', 'fixed', 'wontfix')]
+=======
+ bug.active]
+>>>>>>> 8f1cd4f5eecba8e3322ea6725d71e430520d1585
return bugs
@@ -184,7 +189,17 @@ class WebInterface:
bug.severity = severity if severity != 'None' else None
if target:
+<<<<<<< HEAD
add_target(self.bd, bug, 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)
+>>>>>>> 8f1cd4f5eecba8e3322ea6725d71e430520d1585
bug.save()