aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/04edb940-06dd-4ded-8697-156d54a1d875/comments/e3389187-1e84-43d5-b40b-26f53090edff/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/76a6140e-0800-453c-9720-29cc161663d1/values6
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/866cba32-4347-4f51-9b1d-69454638ca78/comments/738f9826-57b6-43d6-a0cb-0dfeeb185b96/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/values8
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/dd7aa57c-f184-495a-8520-2676c1066fb4/comments/24aab4bf-b525-48d6-9666-626e3ddcecf7/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e23d7982-7e32-4c78-b62e-83ecc42b4cd7/values6
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/aea21508-69c2-4d6b-ada1-4fbadac14c56/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/d5ffa1c4-f435-4a9a-99f3-2a7bc3072051/body1
-rw-r--r--.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/f1fd8249-ded3-4e3c-a6ef-967d0a0edcd9/body3
-rw-r--r--.gitignore1
-rw-r--r--Makefile8
-rw-r--r--doc/conf.py8
-rw-r--r--doc/install.txt17
-rw-r--r--libbe/command/depend.py105
-rw-r--r--libbe/command/list.py70
-rwxr-xr-xsetup.py12
18 files changed, 158 insertions, 93 deletions
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/04edb940-06dd-4ded-8697-156d54a1d875/comments/e3389187-1e84-43d5-b40b-26f53090edff/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/04edb940-06dd-4ded-8697-156d54a1d875/comments/e3389187-1e84-43d5-b40b-26f53090edff/body
new file mode 100644
index 0000000..49a1e50
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/04edb940-06dd-4ded-8697-156d54a1d875/comments/e3389187-1e84-43d5-b40b-26f53090edff/body
@@ -0,0 +1 @@
+The problem is the jQuery selector... I need to escape something special but I'm not sure what. \ No newline at end of file
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/body
new file mode 100644
index 0000000..5becd48
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/545311df-8c88-4504-9f83-11d7c5d8aa50/comments/88d54d29-7312-4bb3-bc50-1970bdb2bb0e/body
@@ -0,0 +1 @@
+Apparently the summary can only be one line. That makes the whitespace issue less relevant. \ No newline at end of file
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/76a6140e-0800-453c-9720-29cc161663d1/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/76a6140e-0800-453c-9720-29cc161663d1/values
index 7f5e0b4..dc2507f 100644
--- a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/76a6140e-0800-453c-9720-29cc161663d1/values
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/76a6140e-0800-453c-9720-29cc161663d1/values
@@ -1,3 +1,6 @@
+creator: W. Trevor King <wking@drexel.edu>
+
+
extra_strings:
- BLOCKED-BY:04edb940-06dd-4ded-8697-156d54a1d875
- BLOCKED-BY:0a234f51-2fdf-4001-a04f-b7e02c2fa47b
@@ -13,6 +16,7 @@ extra_strings:
- BLOCKED-BY:9bc14860-b2bb-4442-85ea-0b8e7083457b
- BLOCKED-BY:cfb52b6c-d1a6-4018-a255-27cc1c878193
- BLOCKED-BY:dd7aa57c-f184-495a-8520-2676c1066fb4
+- BLOCKED-BY:e23d7982-7e32-4c78-b62e-83ecc42b4cd7
- TAG:CFBE
@@ -25,5 +29,5 @@ status: open
summary: beta
-time: Tue, 22 Jun 2010 18:12:21 +0000
+time: Sun, 06 Dec 2009 07:14:32 +0000
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/866cba32-4347-4f51-9b1d-69454638ca78/comments/738f9826-57b6-43d6-a0cb-0dfeeb185b96/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/866cba32-4347-4f51-9b1d-69454638ca78/comments/738f9826-57b6-43d6-a0cb-0dfeeb185b96/body
new file mode 100644
index 0000000..85da011
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/866cba32-4347-4f51-9b1d-69454638ca78/comments/738f9826-57b6-43d6-a0cb-0dfeeb185b96/body
@@ -0,0 +1 @@
+Right now you can only select assignees or targets that have already been specified in another bug. There should be a way to add new ones from the bug edit screen.
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/body
new file mode 100644
index 0000000..2891e04
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/body
@@ -0,0 +1 @@
+This seems to already have been done in the README.
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/values
new file mode 100644
index 0000000..6daa082
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/c7251ff9-24e4-402d-8d4e-605a78b9a91d/comments/109b09ce-663e-46e3-97b9-4707ec0a9540/values
@@ -0,0 +1,8 @@
+Author: W. Trevor King <wking@drexel.edu>
+
+
+Content-type: text/plain
+
+
+Date: Tue, 21 Jul 2009 14:23:37 +0000
+
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/dd7aa57c-f184-495a-8520-2676c1066fb4/comments/24aab4bf-b525-48d6-9666-626e3ddcecf7/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/dd7aa57c-f184-495a-8520-2676c1066fb4/comments/24aab4bf-b525-48d6-9666-626e3ddcecf7/body
new file mode 100644
index 0000000..6447d18
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/dd7aa57c-f184-495a-8520-2676c1066fb4/comments/24aab4bf-b525-48d6-9666-626e3ddcecf7/body
@@ -0,0 +1 @@
+I think I just need to adjust the wrapper width. \ No newline at end of file
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e23d7982-7e32-4c78-b62e-83ecc42b4cd7/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e23d7982-7e32-4c78-b62e-83ecc42b4cd7/values
index bdf6f79..6470466 100644
--- a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e23d7982-7e32-4c78-b62e-83ecc42b4cd7/values
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e23d7982-7e32-4c78-b62e-83ecc42b4cd7/values
@@ -1,3 +1,6 @@
+creator: W. Trevor King <wking@drexel.edu>
+
+
extra_strings:
- BLOCKED-BY:171819aa-c092-4ddf-ace3-797635fa2572
- BLOCKED-BY:35b962a0-a64a-4b5c-82c5-ea740e8a6322
@@ -15,6 +18,7 @@ extra_strings:
- BLOCKED-BY:decc6e78-a3db-4cd3-ad23-2bf8ed77cb0d
- BLOCKED-BY:e645d562-6f84-4df2-b8ee-86ef42546c16
- BLOCKED-BY:fd96c69d-6f78-4c0c-af6e-e01e9b8516d3
+- BLOCKS:76a6140e-0800-453c-9720-29cc161663d1
- TAG:CFBE
@@ -27,5 +31,5 @@ status: fixed
summary: alpha
-time: Tue, 22 Jun 2010 18:12:20 +0000
+time: Sun, 06 Dec 2009 07:14:33 +0000
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/aea21508-69c2-4d6b-ada1-4fbadac14c56/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/aea21508-69c2-4d6b-ada1-4fbadac14c56/body
new file mode 100644
index 0000000..d13b1b7
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/aea21508-69c2-4d6b-ada1-4fbadac14c56/body
@@ -0,0 +1 @@
+I agree. (Test message).
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/d5ffa1c4-f435-4a9a-99f3-2a7bc3072051/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/d5ffa1c4-f435-4a9a-99f3-2a7bc3072051/body
new file mode 100644
index 0000000..8598e67
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/d5ffa1c4-f435-4a9a-99f3-2a7bc3072051/body
@@ -0,0 +1 @@
+This will not be incredibly easy. It will require reworking of the repository roots.
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/f1fd8249-ded3-4e3c-a6ef-967d0a0edcd9/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/f1fd8249-ded3-4e3c-a6ef-967d0a0edcd9/body
new file mode 100644
index 0000000..20dbfd2
--- /dev/null
+++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/e645d562-6f84-4df2-b8ee-86ef42546c16/comments/f1fd8249-ded3-4e3c-a6ef-967d0a0edcd9/body
@@ -0,0 +1,3 @@
+This is a comment.
+
+With several lines.
diff --git a/.gitignore b/.gitignore
index a0a8663..3ac2a52 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@
./build
./doc/man/*.1
./doc/.build/
+.be/id-cache
libbe/_version.py
diff --git a/Makefile b/Makefile
index 120963b..8f168b1 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,7 @@
SHELL = /bin/bash
RM = /bin/rm
DB2MAN = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
+DB2HTML = http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl
XP = /usr/bin/xsltproc --nonet --param man.charmap.use.subset "0" \
--param make.year.ranges "1" --param make.single.year.ranges "1"
@@ -37,6 +38,9 @@ XP = /usr/bin/xsltproc --nonet --param man.charmap.use.subset "0" \
PREFIX = ${HOME}
INSTALL_OPTIONS = "--prefix=${PREFIX}"
+# Select the documentation you wish to build
+DOC = sphinx man
+
# Directories with semantic meaning
DOC_DIR := doc
MAN_DIR := ${DOC_DIR}/man
@@ -58,7 +62,7 @@ build: $(LIBBE_VERSION)
python setup.py build
.PHONY: doc
-doc: sphinx man
+doc: $(DOC)
.PHONY: install
install: build doc
@@ -82,6 +86,8 @@ man: ${MANPAGE_FILES}
%.1: %.1.xml
$(XP) -o $@ $(DB2MAN) $<
+%.1.html: %.1.xml
+ $(XP) -o $@ $(DB2HTML) $<
.PHONY: sphinx
sphinx:
diff --git a/doc/conf.py b/doc/conf.py
index 371480e..2019127 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -54,6 +54,14 @@ version = libbe.version.version()
# The full version, including alpha/beta/rc tags.
release = libbe.version.version()
+# Override default sphinx.config.Config.configvalues[html_title] to
+# change formatting string from '%s v%s' to '%s %s'. With git-commit
+# versions, the original formatting string gives titles like
+# bugs-everywhere vc07c687273afc1f38258d3fa5caf39244c0d1b33
+# which may suprise users who don't realize the leading 'v' is not
+# part of the hash.
+html_title = '%s %s documentation' % (project, release)
+
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
diff --git a/doc/install.txt b/doc/install.txt
index 7278c01..5752566 100644
--- a/doc/install.txt
+++ b/doc/install.txt
@@ -54,7 +54,24 @@ to install BE. By default BE will install into your home directory,
but you can tweak the ``PREFIX`` variable in ``Makefile`` to install
to another location.
+By default, ``make`` builds both a man page for ``be`` and the HTML
+Sphinx documentation (:doc:`doc`). You can customize the
+documentation targets by overriding_ the ``DOC`` variable. For
+example, to disable all documentation during a build/install, run::
+
+ $ make DOC= install
+
+Note that ``setup.py`` (called during ``make install``) will install
+the man page (``doc/man/be.1``) if it exists, so::
+
+ $ make
+ $ make DOC= install
+
+*will* build (first ``make``) install (second ``make``) the man page.
+
+
.. _homepage: http://bugseverywhere.org/
+.. _overriding: http://www.gnu.org/software/make/manual/html_node/Overriding.html#Overriding
Release tarballs
diff --git a/libbe/command/depend.py b/libbe/command/depend.py
index baea539..e1446fe 100644
--- a/libbe/command/depend.py
+++ b/libbe/command/depend.py
@@ -28,6 +28,73 @@ import libbe.util.tree
BLOCKS_TAG="BLOCKS:"
BLOCKED_BY_TAG="BLOCKED-BY:"
+
+class Filter (object):
+ def __init__(self, status='all', severity='all', assigned='all',
+ target='all', extra_strings_regexps=[]):
+ self.status = status
+ self.severity = severity
+ self.assigned = assigned
+ self.target = target
+ self.extra_strings_regexps = extra_strings_regexps
+
+ def __call__(self, bugdir, bug):
+ if self.status != 'all' and not bug.status in self.status:
+ return False
+ if self.severity != 'all' and not bug.severity in self.severity:
+ return False
+ if self.assigned != 'all' and not bug.assigned in self.assigned:
+ return False
+ if self.target == 'all':
+ pass
+ else:
+ target_bug = libbe.command.target.bug_target(bugdir, bug)
+ if self.target in ['none', None]:
+ if target_bug.summary != None:
+ return False
+ else:
+ if target_bug.summary != self.target:
+ return False
+ if len(bug.extra_strings) == 0:
+ if len(self.extra_strings_regexps) > 0:
+ return False
+ elif len(self.extra_strings_regexps) > 0:
+ matched = False
+ for string in bug.extra_strings:
+ for regexp in self.extra_strings_regexps:
+ if regexp.match(string):
+ matched = True
+ break
+ if matched == True:
+ break
+ if matched == False:
+ return False
+ return True
+
+def parse_status(status):
+ if status == 'all':
+ status = libbe.bug.status_values
+ elif status == 'active':
+ status = list(libbe.bug.active_status_values)
+ elif status == 'inactive':
+ status = list(libbe.bug.inactive_status_values)
+ else:
+ status = libbe.command.util.select_values(
+ status, libbe.bug.status_values)
+ return status
+
+def parse_severity(severity, important=False):
+ if severity == 'all':
+ severity = libbe.bug.severity_values
+ elif important == True:
+ serious = libbe.bug.severity_values.index('serious')
+ severity.append(list(libbe.bug.severity_values[serious:]))
+ else:
+ severity = libbe.command.util.select_values(
+ severity, libbe.bug.severity_values)
+ return severity
+
+
class BrokenLink (Exception):
def __init__(self, blocked_bug, blocking_bug, blocks=True):
if blocks == True:
@@ -145,34 +212,29 @@ class Depend (libbe.command.Command):
'\n'.join(['%s |-- %s' % (blockee.id.user(), blocker.id.user())
for blockee,blocker in fixed])
return 0
- allowed_status_values = \
- libbe.command.util.select_values(
- params['status'], libbe.bug.status_values)
- allowed_severity_values = \
- libbe.command.util.select_values(
- params['severity'], libbe.bug.severity_values)
+ status = parse_status(params['status'])
+ severity = parse_severity(params['severity'])
+ filter = Filter(status, severity)
bugA, dummy_comment = libbe.command.util.bug_comment_from_user_id(
bugdir, params['bug-id'])
if params['tree-depth'] != None:
- dtree = DependencyTree(bugdir, bugA, params['tree-depth'],
- allowed_status_values,
- allowed_severity_values)
+ dtree = DependencyTree(bugdir, bugA, params['tree-depth'], filter)
if len(dtree.blocked_by_tree()) > 0:
print >> self.stdout, '%s blocked by:' % bugA.id.user()
for depth,node in dtree.blocked_by_tree().thread():
if depth == 0: continue
- print >> self.stdout, \
- '%s%s' % (' '*(depth),
- node.bug.string(shortlist=True))
+ print >> self.stdout, (
+ '%s%s'
+ % (' '*(depth), self.bug_string(node.bug, params)))
if len(dtree.blocks_tree()) > 0:
print >> self.stdout, '%s blocks:' % bugA.id.user()
for depth,node in dtree.blocks_tree().thread():
if depth == 0: continue
- print >> self.stdout, \
- '%s%s' % (' '*(depth),
- node.bug.string(shortlist=True))
+ print >> self.stdout, (
+ '%s%s'
+ % (' '*(depth), self.bug_string(node.bug, params)))
return 0
if params['blocking-bug-id'] != None:
@@ -374,14 +436,11 @@ class DependencyTree (object):
"""
Note: should probably be DependencyDiGraph.
"""
- def __init__(self, bugdir, root_bug, depth_limit=0,
- allowed_status_values=None,
- allowed_severity_values=None):
+ def __init__(self, bugdir, root_bug, depth_limit=0, filter=None):
self.bugdir = bugdir
self.root_bug = root_bug
self.depth_limit = depth_limit
- self.allowed_status_values = allowed_status_values
- self.allowed_severity_values = allowed_severity_values
+ self.filter = filter
def _build_tree(self, child_fn):
root = libbe.util.tree.Tree()
@@ -393,11 +452,7 @@ class DependencyTree (object):
if self.depth_limit > 0 and node.depth == self.depth_limit:
continue
for bug in child_fn(self.bugdir, node.bug):
- if self.allowed_status_values != None \
- and not bug.status in self.allowed_status_values:
- continue
- if self.allowed_severity_values != None \
- and not bug.severity in self.allowed_severity_values:
+ if not self.filter(self.bugdir, bug):
continue
child = libbe.util.tree.Tree()
child.bug = bug
diff --git a/libbe/command/list.py b/libbe/command/list.py
index c353e09..06249a0 100644
--- a/libbe/command/list.py
+++ b/libbe/command/list.py
@@ -25,6 +25,7 @@ import libbe
import libbe.bug
import libbe.command
import libbe.command.depend
+from libbe.command.depend import Filter, parse_status, parse_severity
import libbe.command.tag
import libbe.command.target
import libbe.command.util
@@ -33,48 +34,6 @@ import libbe.command.util
AVAILABLE_CMPS = [fn[4:] for fn in dir(libbe.bug) if fn[:4] == 'cmp_']
AVAILABLE_CMPS.remove('attr') # a cmp_* template.
-class Filter (object):
- def __init__(self, status='all', severity='all', assigned='all',
- target='all', extra_strings_regexps=[]):
- self.status = status
- self.severity = severity
- self.assigned = assigned
- self.target = target
- self.extra_strings_regexps = extra_strings_regexps
-
- def __call__(self, bugdir, bug):
- if self.status != 'all' and not bug.status in self.status:
- return False
- if self.severity != 'all' and not bug.severity in self.severity:
- return False
- if self.assigned != 'all' and not bug.assigned in self.assigned:
- return False
- if self.target == 'all':
- pass
- else:
- target_bug = libbe.command.target.bug_target(bugdir, bug)
- if self.target in ['none', None]:
- if target_bug.summary != None:
- return False
- else:
- if target_bug.summary != self.target:
- return False
- if len(bug.extra_strings) == 0:
- if len(self.extra_strings_regexps) > 0:
- return False
- elif len(self.extra_strings_regexps) > 0:
- matched = False
- for string in bug.extra_strings:
- for regexp in self.extra_strings_regexps:
- if regexp.match(string):
- matched = True
- break
- if matched == True:
- break
- if matched == False:
- return False
- return True
-
class List (libbe.command.Command):
"""List bugs
@@ -91,6 +50,9 @@ class List (libbe.command.Command):
abc/a:om: Bug A
>>> ret = ui.run(cmd, {'status':'closed'})
abc/b:cm: Bug B
+ >>> ret = ui.run(cmd, {'status':'all', 'sort':'time'})
+ abc/a:om: Bug A
+ abc/b:cm: Bug B
>>> bd.storage.writeable
True
>>> ui.cleanup()
@@ -189,31 +151,15 @@ class List (libbe.command.Command):
def _parse_params(self, bugdir, params):
cmp_list = []
if params['sort'] != None:
- for cmp in params['sort'].sort_by.split(','):
+ for cmp in params['sort'].split(','):
if cmp not in AVAILABLE_CMPS:
raise libbe.command.UserError(
'Invalid sort on "%s".\nValid sorts:\n %s'
% (cmp, '\n '.join(AVAILABLE_CMPS)))
cmp_list.append(eval('libbe.bug.cmp_%s' % cmp))
- # select status
- if params['status'] == 'all':
- status = libbe.bug.status_values
- elif params['status'] == 'active':
- status = list(libbe.bug.active_status_values)
- elif params['status'] == 'inactive':
- status = list(libbe.bug.inactive_status_values)
- else:
- status = libbe.command.util.select_values(
- params['status'], libbe.bug.status_values)
- # select severity
- if params['severity'] == 'all':
- severity = libbe.bug.severity_values
- elif params['important'] == True:
- serious = libbe.bug.severity_values.index('serious')
- severity.append(list(libbe.bug.severity_values[serious:]))
- else:
- severity = libbe.command.util.select_values(
- params['severity'], libbe.bug.severity_values)
+ status = parse_status(params['status'])
+ severity = parse_severity(params['severity'],
+ important=params['important'])
# select assigned
if params['assigned'] == None:
if params['mine'] == True:
diff --git a/setup.py b/setup.py
index da1ebad..b7fb839 100755
--- a/setup.py
+++ b/setup.py
@@ -1,11 +1,19 @@
#!/usr/bin/env python
from distutils.core import setup
+import os.path
+
from libbe import _version
rev_id = _version.version_info["revision"]
rev_date = _version.version_info["date"]
+data_files = []
+
+man_path = os.path.join('doc', 'man', 'be.1')
+if os.path.exists(man_path):
+ data_files.append(('share/man/man1', [man_path]))
+
setup(
name='Bugs Everywhere',
version=rev_date,
@@ -20,7 +28,5 @@ setup(
'libbe.ui.util',
'libbe.util'],
scripts=['be'],
- data_files=[
- ('share/man/man1', ['doc/man/be.1']),
- ]
+ data_files=data_files,
)