Skip to content
This repository has been archived by the owner on Feb 15, 2019. It is now read-only.

Commit

Permalink
Merged with head branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mgian committed Oct 1, 2009
1 parent e42729a commit ed4a943
Show file tree
Hide file tree
Showing 156 changed files with 6,851 additions and 6,038 deletions.
1 change: 1 addition & 0 deletions AUTHORS
@@ -1,6 +1,7 @@
Bugs Everywhere was written by:
Aaron Bentley
Alexander Belchenko
Alex Miller
Ben Finney
Chris Ball
Gianluca Montecchi
Expand Down
Empty file.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-b.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-bl.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-br.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-l.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-r.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-t.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-tl.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds-tr.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds2-b.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ds2-r.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/favicon.ico
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/favicon.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/info.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-b.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-bl.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-br.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-l.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-r.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-t.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-tl.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/is-tr.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/ok.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/shadows.png
Binary file not shown.
Binary file removed Bugs-Everywhere-Web/beweb/static/images/spiral.png
Binary file not shown.
Diff not rendered.
Diff not rendered.
Empty file.
Empty file.
1 change: 0 additions & 1 deletion Bugs-Everywhere-Web/libbe

This file was deleted.

28 changes: 13 additions & 15 deletions COPYING
@@ -1,9 +1,8 @@

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand All @@ -16,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.

When we speak of free software, we are referring to freedom, not
Expand Down Expand Up @@ -56,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and
modification follow.

GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

Expand Down Expand Up @@ -111,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
Expand Down Expand Up @@ -169,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
Expand Down Expand Up @@ -226,7 +225,7 @@ impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
Expand Down Expand Up @@ -279,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest
Expand All @@ -304,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

Gnomovision version 69, Copyright (C) year name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -337,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
24 changes: 18 additions & 6 deletions Makefile
Expand Up @@ -7,11 +7,20 @@
# Copyright (C) 2008-2009 Ben Finney <benf@cybersource.com.au>
# Chris Ball <cjb@laptop.org>
# W. Trevor King <wking@drexel.edu>
# This is free software; you may copy, modify and/or distribute this work
# under the terms of the GNU General Public License, version 2 or later.
# No warranty expressed or implied. See the file COPYING for details.

# Makefile for Bugs Everywhere project
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

SHELL = /bin/bash
PATH = /usr/bin:/bin
Expand All @@ -29,6 +38,7 @@ MODULES += ${DOC_DIR}

RM = rm

#PREFIX = /usr/local
PREFIX = ${HOME}
INSTALL_OPTIONS = "--prefix=${PREFIX}"

Expand All @@ -47,12 +57,14 @@ build: libbe/_version.py
.PHONY: install
install: doc build
python setup.py install ${INSTALL_OPTIONS}
cp -v xml/* ${PREFIX}/bin
cp -v interfaces/xml/* ${PREFIX}/bin
cp -v interfaces/email/catmutt ${PREFIX}/bin


.PHONY: clean
clean:
$(RM) -rf ${GENERATED_FILES}

.PHONY: libbe/_version.py
libbe/_version.py:
bzr version-info --format python > $@
18 changes: 11 additions & 7 deletions README
@@ -1,12 +1,14 @@
Bugs Everywhere
===============
This is Bugs Everywhere, a bugtracker built on distributed revision control.
It works with Bazaar and Arch at the moment, but is easily extensible. It
can also function with no RCS at all.
This is Bugs Everywhere, a bugtracker built on distributed revision
control. It works with Arch, Bazaar, Darcs, Git, and Mercurial at the
moment, but is easily extensible. It can also function with no RCS at
all.

The idea is to package the bug information with the source code, so that
bugs can be marked 'fixed' in the branches that fix them. So, instead of
numbers, bugs have ids.
numbers, bugs have globally unique ids.


Getting started
===============
Expand All @@ -15,9 +17,11 @@ set the bug root to your project root, so that Bugs Everywhere works in any
part of your project tree.
$ be init $PROJECT_ROOT

To create bugs, use "be new $DESCRIPTION". To comment on bugs, you can can use
"be comment $BUG_ID". To close a bug, use "be close $BUG_ID". For more
commands, see "be help". You can also look at the usage in test_usage.sh.
To create bugs, use "be new $DESCRIPTION". To comment on bugs, you
can can use "be comment $BUG_ID". To close a bug, use "be close
$BUG_ID" or "be status $BUG_ID fixed". For more commands, see "be
help". You can also look at the usage examples in test_usage.sh.


Using BeWeb, the web UI
=======================
Expand Down
10 changes: 10 additions & 0 deletions README.dev
Expand Up @@ -31,6 +31,7 @@ consistent interface

Again, you can just browse around in becommands to get a feel for things.


Testing
-------

Expand Down Expand Up @@ -67,3 +68,12 @@ later. In recognition of this, cmdutil provides the default_complete
function which ensures that if '--complete' is any one of the
arguments, options, or option-arguments, GetCompletions will be raised
with and empty list.

Profiling
=========

Find out which 20 calls take the most cumulative time (time of
execution + childrens' times).

$ python -m cProfile -o profile be [command] [args]
$ python -c "import pstats; p=pstats.Stats('profile'); p.sort_stats('cumulative').print_stats(20)"
111 changes: 69 additions & 42 deletions be
Expand Up @@ -3,54 +3,81 @@
# Chris Ball <cjb@laptop.org>
# Oleg Romanyshyn <oromanyshyn@panoramicfeedback.com>
# W. Trevor King <wking@drexel.edu>
# <abentley@panoramicfeedback.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

import os
import sys

from libbe import cmdutil, _version

__doc__ == cmdutil.help()
__doc__ = cmdutil.help()

usage = "be [options] [command] [command_options ...] [command_args ...]"

if len(sys.argv) == 1 or sys.argv[1] in ('--help', '-h'):
print cmdutil.help()
elif sys.argv[1] == '--complete':
for command, module in cmdutil.iter_commands():
print command
print '\n'.join(["--help","--complete","--options","--version"])
elif sys.argv[1] == '--version':
parser = cmdutil.CmdOptionParser(usage)
parser.command = "be"
parser.add_option("--version", action="store_true", dest="version",
help="Print version string and exit.")
parser.add_option("-d", "--dir", dest="dir", metavar="DIR",
help="Run this command from DIR instead of the current directory.")

try:
options,args = parser.parse_args()
for option,value in cmdutil.option_value_pairs(options, parser):
if value == "--complete":
if option == "dir":
if len(args) == 0:
args = ["."]
paths = cmdutil.complete_path(args[0])
raise cmdutil.GetCompletions(paths)
except cmdutil.GetHelp:
print cmdutil.help(parser=parser)
sys.exit(0)
except cmdutil.GetCompletions, e:
print '\n'.join(e.completions)
sys.exit(0)

if options.version == True:
print _version.version_info["revision_id"]
else:
try:
try:
sys.exit(cmdutil.execute(sys.argv[1], sys.argv[2:]))
except KeyError, e:
raise cmdutil.UserError("Unknown command \"%s\"" % e.args[0])
except cmdutil.GetHelp:
print cmdutil.help(sys.argv[1])
sys.exit(0)
except cmdutil.GetCompletions, e:
print '\n'.join(e.completions)
sys.exit(0)
except cmdutil.UsageError, e:
print "Invalid usage:", e
print "\nArgs:", sys.argv[1:]
print cmdutil.help(sys.argv[1])
sys.exit(1)
except cmdutil.UserError, e:
print "ERROR:"
print e
sys.exit(1)
sys.exit(0)
if options.dir != None:
os.chdir(options.dir)

try:
if len(args) == 0:
raise cmdutil.UsageError, "must supply a command"
sys.exit(cmdutil.execute(args[0], args[1:]))
except cmdutil.GetHelp:
print cmdutil.help(sys.argv[1])
sys.exit(0)
except cmdutil.GetCompletions, e:
print '\n'.join(e.completions)
sys.exit(0)
except cmdutil.UnknownCommand, e:
print e
sys.exit(1)
except cmdutil.UsageError, e:
print "Invalid usage:", e
if len(args) == 0:
print cmdutil.help(parser=parser)
else:
print "\nArgs:", args
print cmdutil.help(sys.argv[1])
sys.exit(1)
except cmdutil.UserError, e:
print "ERROR:"
print e
sys.exit(1)
29 changes: 14 additions & 15 deletions becommands/assign.py
Expand Up @@ -2,31 +2,30 @@
# Marien Zwart <marienz@gentoo.org>
# Thomas Gerigk <tgerigk@gmx.de>
# W. Trevor King <wking@drexel.edu>
# <abentley@panoramicfeedback.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
"""Assign an individual or group to fix a bug"""
from libbe import cmdutil, bugdir, settings_object
from libbe import cmdutil, bugdir
__desc__ = __doc__

def execute(args, test=False):
"""
>>> import os
>>> bd = bugdir.simple_bug_dir()
>>> os.chdir(bd.root)
>>> bd.bug_from_shortname("a").assigned is settings_object.EMPTY
>>> bd.bug_from_shortname("a").assigned is None
True
>>> execute(["a"], test=True)
Expand All @@ -41,7 +40,7 @@ def execute(args, test=False):
>>> execute(["a","none"], test=True)
>>> bd._clear_bugs()
>>> bd.bug_from_shortname("a").assigned is settings_object.EMPTY
>>> bd.bug_from_shortname("a").assigned is None
True
"""
parser = get_parser()
Expand Down

0 comments on commit ed4a943

Please sign in to comment.