diff options
6 files changed, 97 insertions, 295 deletions
diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/d9959864-ea91-475a-a075-f39aa6760f98/comments/1f25cba2-03ee-43e1-a042-ef6724938ad8/body b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/d9959864-ea91-475a-a075-f39aa6760f98/comments/1f25cba2-03ee-43e1-a042-ef6724938ad8/body new file mode 100644 index 0000000..d2ef28c --- /dev/null +++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/d9959864-ea91-475a-a075-f39aa6760f98/comments/1f25cba2-03ee-43e1-a042-ef6724938ad8/body @@ -0,0 +1,77 @@ +Those are beautiful templates -- can you share those? I'd love to +study the HTML and CSS behind them. + +On Sat, Feb 7, 2009 at 5:48 PM, Steve Losh <steve@stevelosh.com> wrote: +> Hey Chris, thanks for the comments. +> +>> +>> My initial impression is that this looks good enough already to merge as +>> a replacement for the turbogears site. What does everyone else think? +>> +> +> I'm not quite sure it's there yet. There are a bunch of bugs I've got +> marked as "beta" that I'd like to see fixed before it's ready for real use. +> Hopefully they shouldn't be too tough to fix. You can point CFBE at itself +> to see them. :) +> +>> Could you explain a little about how you handle authorship of bug +>> changes at the moment, and if it looks plausible to try making it +>> multiuser? (Having it handle more than one "user" logged in at once.) +>> +> +> That's something I need advice on. Right now CFBE is pretty much only +> suitable for local use - you check out whatever you're working on and use it +> as a local interface to the bugs in the repository. Change those, check in, +> etc. It's effectively just a pretty version of the command line be tool. +> +> I haven't used CherryPy's session/authentication support before. This might +> be a good time for me to learn. One way it might be able to handle multiple +> users hitting a central server: +> +> * Each user has to register with the server and be approved by an admin. +> * Each account would be mapped to a contributor string, the same one that +> would show up if you were going to commit to the repository. +> * Once you have an account, you'd login to make any changes. +> +> +> Aside from all that, I'm a little fuzzy on how a centralized interface to a +> distributed bug tracking system should work. A read-only interface to a +> central "main" repository would be easy. Run the server in read-only mode +> pointing at the main repository. People can use it to look at the bugs in +> the tip of that repository. +> +> If it's not read-only, what happens when a user changes/adds/whatevers a +> bug? Should CFBE commit that change to the repository right then and there? +> Should it never commit, just update the bugdir and let the commits happen +> manually? +> +> What happens when you have multiple branches for a repository? Should there +> be one CFBE instance for each branch, or a single one that lets you switch +> between branches (effectively switching between revisions)? +> +> Those are the kind of things that don't really apply when CFBE is just a +> local interface to a single repository. If anyone has any advice on how a +> multi-user interface should work I'd love to hear it! +> +> -- +> Steve Losh +> http://stevelosh.com/ +> +> +> _______________________________________________ +> Be-devel mailing list +> Be-devel@bugseverywhere.org +> http://void.printf.net/cgi-bin/mailman/listinfo/be-devel +> + + + +-- +Matthew Wilson +matt@tplus1.com +http://tplus1.com + +_______________________________________________ +Be-devel mailing list +Be-devel@bugseverywhere.org +http://void.printf.net/cgi-bin/mailman/listinfo/be-devel diff --git a/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/d9959864-ea91-475a-a075-f39aa6760f98/comments/1f25cba2-03ee-43e1-a042-ef6724938ad8/values b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/d9959864-ea91-475a-a075-f39aa6760f98/comments/1f25cba2-03ee-43e1-a042-ef6724938ad8/values new file mode 100644 index 0000000..ca3efd0 --- /dev/null +++ b/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/d9959864-ea91-475a-a075-f39aa6760f98/comments/1f25cba2-03ee-43e1-a042-ef6724938ad8/values @@ -0,0 +1,14 @@ +Alt-id: <f6f643a20902071531y6aa3d7a6k7c5a4bd4aa5a04f6@mail.gmail.com> + + +Author: Matthew Wilson <matt@tplus1.com> + + +Content-type: text/plain + + +Date: Sat, 07 Feb 2009 18:31:04 -0500 + + +In-reply-to: 21c90231-d7f2-49bb-97d9-99e16459d799 + diff --git a/doc/man/module.mk b/doc/man/module.mk deleted file mode 100644 index ea4eacc..0000000 --- a/doc/man/module.mk +++ /dev/null @@ -1,44 +0,0 @@ -# :vim: filetype=make : -*- makefile; coding: utf-8; -*- - -# doc/module.mk -# Part of Bugs Everywhere, a distributed bug tracking system. -# -# Copyright (C) 2008-2010 Chris Ball <cjb@laptop.org> -# Gianluca Montecchi <gian@grys.it> -# W. Trevor King <wking@drexel.edu> -# -# 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. - -# Makefile module for documentation - -MODULE_DIR := doc/src - -MANPAGES = be.1 -manpage_files = $(patsubst %,${MODULE_DIR}/%,${MANPAGES}) - -GENERATED_FILES += ${manpage_files} - - -.PHONY: doc -doc: man - -build: doc - - -.PHONY: man -man: ${manpage_files} - -%.1: %.1.sgml - docbook-to-man $< > $@ diff --git a/libbe/command/close.py b/libbe/command/close.py index 026c605..0532ed2 100644 --- a/libbe/command/close.py +++ b/libbe/command/close.py @@ -1,5 +1,4 @@ # Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. -# Gianluca Montecchi <gian@grys.it> # Marien Zwart <marienz@gentoo.org> # Thomas Gerigk <tgerigk@gmx.de> # W. Trevor King <wking@drexel.edu> @@ -21,8 +20,7 @@ from libbe import cmdutil, bugdir __desc__ = __doc__ -def execute(args, manipulate_encodings=True, restrict_file_access=False, - dir="."): +def execute(args, manipulate_encodings=True): """ >>> from libbe import bugdir >>> import os @@ -45,9 +43,8 @@ def execute(args, manipulate_encodings=True, restrict_file_access=False, if len(args) > 1: raise cmdutil.UsageError("Too many arguments.") bd = bugdir.BugDir(from_disk=True, - manipulate_encodings=manipulate_encodings, - root=dir) - bug = cmdutil.bug_from_id(bd, args[0]) + manipulate_encodings=manipulate_encodings) + bug = cmdutil.bug_from_shortname(bd, args[0]) bug.status = "closed" bd.save() diff --git a/libbe/command/email_bugs.py b/libbe/command/email_bugs.py deleted file mode 100644 index f6641e3..0000000 --- a/libbe/command/email_bugs.py +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright (C) 2009 W. Trevor King <wking@drexel.edu> -# -# 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. -"""Email specified bugs in a be-handle-mail compatible format.""" - -import copy -from cStringIO import StringIO -from email import Message -from email.mime.text import MIMEText -from email.generator import Generator -import sys -import time - -from libbe import cmdutil, bugdir -from libbe.subproc import invoke -from libbe.utility import time_to_str -from libbe.vcs import detect_vcs, installed_vcs -import show - -__desc__ = __doc__ - -sendmail='/usr/sbin/sendmail -t' - -def execute(args, manipulate_encodings=True, restrict_file_access=False, - dir="."): - """ - >>> import os - >>> from libbe import bug - >>> bd = bugdir.SimpleBugDir() - >>> bd.encoding = 'utf-8' - >>> os.chdir(bd.root) - >>> import email.charset as c - >>> c.add_charset('utf-8', c.SHORTEST, c.QP, 'utf-8') - >>> execute(["-o", "--to", "a@b.com", "--from", "b@c.edu", "a", "b"], - ... manipulate_encodings=False) # doctest: +ELLIPSIS - Content-Type: text/xml; charset="utf-8" - MIME-Version: 1.0 - Content-Transfer-Encoding: quoted-printable - From: b@c.edu - To: a@b.com - Date: ... - Subject: [be-bug:xml] Updates to a, b - <BLANKLINE> - <?xml version=3D"1.0" encoding=3D"utf-8" ?> - <be-xml> - <version> - <tag>...</tag> - <branch-nick>...</branch-nick> - <revno>...</revno> - <revision-id>... - </version> - <bug> - <uuid>a</uuid> - <short-name>a</short-name> - <severity>minor</severity> - <status>open</status> - <creator>John Doe <jdoe@example.com></creator> - <created>Thu, 01 Jan 1970 00:00:00 +0000</created> - <summary>Bug A</summary> - </bug> - <bug> - <uuid>b</uuid> - <short-name>b</short-name> - <severity>minor</severity> - <status>closed</status> - <creator>Jane Doe <jdoe@example.com></creator> - <created>Thu, 01 Jan 1970 00:00:00 +0000</created> - <summary>Bug B</summary> - </bug> - </be-xml> - >>> bd.cleanup() - - Note that the '=3D' bits in - <?xml version=3D"1.0" encoding=3D"utf-8" ?> - are the way quoted-printable escapes '='. - - The unclosed <revision-id>... is because revision ids can be long - enough to cause line wraps, and we want to ensure we match even if - the closing </revision-id> is split by the wrapping. - """ - parser = get_parser() - options, args = parser.parse_args(args) - cmdutil.default_complete(options, args, parser, - bugid_args={-1: lambda bug : bug.active==True}) - if len(args) == 0: - raise cmdutil.UsageError - bd = bugdir.BugDir(from_disk=True, - manipulate_encodings=manipulate_encodings, - root=dir) - xml = show.output(args, bd, as_xml=True, with_comments=True) - subject = options.subject - if subject == None: - subject = '[be-bug:xml] Updates to %s' % ', '.join(args) - submit_email = TextEmail(to_address=options.to_address, - from_address=options.from_address, - subject=subject, - body=xml, - encoding=bd.encoding, - subtype='xml') - if options.output == True: - print submit_email - else: - submit_email.send() - -def get_parser(): - parser = cmdutil.CmdOptionParser("be email-bugs [options] ID [ID ...]") - parser.add_option("-t", "--to", metavar="EMAIL", dest="to_address", - help="Submission email address (%default)", - default="be-devel@bugseverywhere.org") - parser.add_option("-f", "--from", metavar="EMAIL", dest="from_address", - help="Senders email address, overriding auto-generated default", - default=None) - parser.add_option("-s", "--subject", metavar="STRING", dest="subject", - help="Subject line, overriding auto-generated default. If you use this option, remember that be-handle-mail probably want something like '[be-bug:xml] ...'", - default=None) - parser.add_option('-o', '--output', dest='output', action='store_true', - help="Don't mail the generated message, print it to stdout instead. Useful for testing functionality.") - return parser - -longhelp=""" -Email specified bugs in a be-handle-mail compatible format. This is -the prefered method for reporting bugs if you did not install bzr by -branching a bzr repository. - -If you _did_ install bzr by branching a bzr repository, we suggest you -commit any new bug information with - bzr commit --message "Reported bug in demuxulizer" -and then email a bzr merge directive with - bzr send --mail-to "be-devel@bugseverywhere.org" -rather than using this command. -""" - -def help(): - return get_parser().help_str() + longhelp - -class TextEmail (object): - """ - Make it very easy to compose and send single-part text emails. - >>> msg = TextEmail(to_address='Monty <monty@a.com>', - ... from_address='Python <python@b.edu>', - ... subject='Parrots', - ... header={'x-special-header':'your info here'}, - ... body="Remarkable bird, id'nit, squire?\\nLovely plumage!") - >>> print msg # doctest: +ELLIPSIS - Content-Type: text/plain; charset="utf-8" - MIME-Version: 1.0 - Content-Transfer-Encoding: base64 - From: Python <python@b.edu> - To: Monty <monty@a.com> - Date: ... - Subject: Parrots - x-special-header: your info here - <BLANKLINE> - UmVtYXJrYWJsZSBiaXJkLCBpZCduaXQsIHNxdWlyZT8KTG92ZWx5IHBsdW1hZ2Uh - <BLANKLINE> - >>> import email.charset as c - >>> c.add_charset('utf-8', c.SHORTEST, c.QP, 'utf-8') - >>> print msg # doctest: +ELLIPSIS - Content-Type: text/plain; charset="utf-8" - MIME-Version: 1.0 - Content-Transfer-Encoding: quoted-printable - From: Python <python@b.edu> - To: Monty <monty@a.com> - Date: ... - Subject: Parrots - x-special-header: your info here - <BLANKLINE> - Remarkable bird, id'nit, squire? - Lovely plumage! - """ - def __init__(self, to_address, from_address=None, subject=None, - header=None, body=None, encoding='utf-8', subtype='plain'): - self.to_address = to_address - self.from_address = from_address - if self.from_address == None: - self.from_address = self._guess_from_address() - self.subject = subject - self.header = header - if self.header == None: - self.header = {} - self.body = body - self.encoding = encoding - self.subtype = subtype - def _guess_from_address(self): - vcs = detect_vcs('.') - if vcs.name == "None": - vcs = installed_vcs() - return vcs.get_user_id() - def encoded_MIME_body(self): - return MIMEText(self.body.encode(self.encoding), - self.subtype, - self.encoding) - def message(self): - response = self.encoded_MIME_body() - response['From'] = self.from_address - response['To'] = self.to_address - response['Date'] = time_to_str(time.time()) - response['Subject'] = self.subject - for k,v in self.header.items(): - response[k] = v - return response - def flatten(self, to_unicode=False): - """ - This is a simplified version of send_pgp_mime.flatten(). - """ - fp = StringIO() - g = Generator(fp, mangle_from_=False) - g.flatten(self.message()) - text = fp.getvalue() - if to_unicode == True: - encoding = msg.get_content_charset() or "utf-8" - text = unicode(text, encoding=encoding) - return text - def __str__(self): - return self.flatten() - def __unicode__(self): - return self.flatten(to_unicode=True) - def send(self, sendmail=None): - """ - This is a simplified version of send_pgp_mime.mail(). - - Send an email Message instance on its merry way by shelling - out to the user specified sendmail. - """ - if sendmail == None: - sendmail = SENDMAIL - invoke(sendmail, stdin=self.flatten()) diff --git a/libbe/command/open.py b/libbe/command/open.py index a6fe48d..0c6bf05 100644 --- a/libbe/command/open.py +++ b/libbe/command/open.py @@ -1,5 +1,4 @@ # Copyright (C) 2005-2009 Aaron Bentley and Panometrics, Inc. -# Gianluca Montecchi <gian@grys.it> # Marien Zwart <marienz@gentoo.org> # Thomas Gerigk <tgerigk@gmx.de> # W. Trevor King <wking@drexel.edu> @@ -21,8 +20,7 @@ from libbe import cmdutil, bugdir __desc__ = __doc__ -def execute(args, manipulate_encodings=True, restrict_file_access=False, - dir="."): +def execute(args, manipulate_encodings=True): """ >>> import os >>> bd = bugdir.SimpleBugDir() @@ -44,9 +42,8 @@ def execute(args, manipulate_encodings=True, restrict_file_access=False, if len(args) > 1: raise cmdutil.UsageError, "Too many arguments." bd = bugdir.BugDir(from_disk=True, - manipulate_encodings=manipulate_encodings, - root=dir) - bug = cmdutil.bug_from_id(bd, args[0]) + manipulate_encodings=manipulate_encodings) + bug = cmdutil.bug_from_shortname(bd, args[0]) bug.status = "open" def get_parser(): |