From 6e171ccd2ab07193b2f16350d00270229ec0c0a1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 19 Nov 2009 00:39:31 -0500 Subject: Updated README and Bugs-Everywhere-Web/README. --- interfaces/web/Bugs-Everywhere-Web/README | 60 +++++++++++++++++++++++++++ interfaces/web/Bugs-Everywhere-Web/README.txt | 42 ------------------- 2 files changed, 60 insertions(+), 42 deletions(-) create mode 100644 interfaces/web/Bugs-Everywhere-Web/README delete mode 100644 interfaces/web/Bugs-Everywhere-Web/README.txt (limited to 'interfaces') diff --git a/interfaces/web/Bugs-Everywhere-Web/README b/interfaces/web/Bugs-Everywhere-Web/README new file mode 100644 index 0000000..c152757 --- /dev/null +++ b/interfaces/web/Bugs-Everywhere-Web/README @@ -0,0 +1,60 @@ +Using BeWeb, the web UI +======================= +BeWeb uses the Turbogears framework: http://www.turbogears.org/ +Please ensure you have Turbogears 0.8a5 or a compatible release installed. +Because it uses BE data, the web UI does not require a database. + +To use BeWeb, first create a configuration file, telling it which projects +to track, and what to call them. An example configuration file +(beweb/beweb/config.py.example) is provided. + +Next, cd to this directory, and run ./start-beweb.py + +BeWeb allows you to create, view and edit bugs, but it is in an early stage of +development, so some features are missing. + +Configuration file +------------------ + +Configure by creating an appropriate beweb/config.py from +beweb/config.py.example. The server will edit the repositories that +it manages, so you should probably have it running on a seperate +branch than your working repository. You can then merge/push +as you require to keep the branches in sync. + +See + http://docs.turbogears.org/1.0/Configuration +For standard turbogears configuration information. + +Actions +------- + +Currently, you need to login for any methods with a +@identity.require() decorator. The only group in the current +implementation is 'editbugs'. Basically, anyone can browse around, +but only registered 'editbugs' members can change things. + +Anonymous actions: + * See project tree + * See buglist + * See comments +Editbugs required actions: + * Create new comments + * Reply to comments + * Update comment info + +Users +----- + +All login attempts will fail unless you have added some valid users. See + http://docs.turbogears.org/1.0/GettingStartedWithIdentity +For a good intro. For the impatient, try something like + Bugs-Everywhere-Web$ tg-admin toolbox + browse to 'CatWalk' -> 'User' -> 'Add User+' +or + Bugs-Everywhere-Web$ tg-admin sholl + >>> u = User(user_name=u'jdoe', email_address=u'jdoe@example.com', + display_name=u'Jane Doe', password=u'xxx') + >>> g = Group(group_name=u'editbugs', display_name=u'Edit Bugs') + >>> g.addUser(u) # BE-Web uses SQLObject +Exit the tg-admin shell with Ctrl-Z on MS Windows, Ctrl-D on other systems. diff --git a/interfaces/web/Bugs-Everywhere-Web/README.txt b/interfaces/web/Bugs-Everywhere-Web/README.txt deleted file mode 100644 index 10774df..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/README.txt +++ /dev/null @@ -1,42 +0,0 @@ -Bugs-Everywhere-Web - -This is a TurboGears (http://www.turbogears.org) project. It can be -started by running the start-beweb.py script. - -Configure by creating an appropriate beweb/config.py from -beweb/config.py.example. The server will edit the repositories that -it manages, so you should probably have it running on a seperate -branch than your working repository. You can then merge/push -as you require to keep the branches in sync. - -See - http://docs.turbogears.org/1.0/Configuration -For standard turbogears configuration information. - -Currently, you need to login for any methods with a -@identity.require() decorator. The only group in the current -implementation is 'editbugs'. Basically, anyone can browse around, -but only registered 'editbugs' members can change things. - -Anonymous actions: - * See project tree - * See buglist - * See comments -Editbugs required actions: - * Create new comments - * Reply to comments - * Update comment info - - -All login attempts will fail unless you have added some valid users. See - http://docs.turbogears.org/1.0/GettingStartedWithIdentity -For a good intro. For the impatient, try something like - Bugs-Everywhere-Web$ tg-admin toolbox - browse to 'CatWalk' -> 'User' -> 'Add User+' -or - Bugs-Everywhere-Web$ tg-admin sholl - >>> u = User(user_name=u'jdoe', email_address=u'jdoe@example.com', - display_name=u'Jane Doe', password=u'xxx') - >>> g = Group(group_name=u'editbugs', display_name=u'Edit Bugs') - >>> g.addUser(u) # BE-Web uses SQLObject -Exit the tg-admin shell with Ctrl-Z on MS Windows, Ctrl-D on other systems. -- cgit From 4c6a1e6439293c7e584aef4fda0da1a3968fe7c9 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 19 Nov 2009 17:00:02 -0500 Subject: Ran the new update_copyright.py --- interfaces/xml/be-xml-to-mbox | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'interfaces') diff --git a/interfaces/xml/be-xml-to-mbox b/interfaces/xml/be-xml-to-mbox index c630447..7960d56 100755 --- a/interfaces/xml/be-xml-to-mbox +++ b/interfaces/xml/be-xml-to-mbox @@ -1,6 +1,5 @@ #!/usr/bin/env python -# Copyright (C) 2009 Chris Ball -# W. Trevor King +# Copyright (C) 2009 W. Trevor King # # 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 -- cgit From 3b168403ff5e50d767476c4c0f037d1841bb2bf9 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Nov 2009 10:53:04 -0500 Subject: Broke `be comment --xml` out and extended into `be import-xml`. It should currently do everything that `be comment --xml` did, but it still has a way to go before it lives up to it's longhelp string, mostly figuring out bug/comment merging. The allowed XML format also changed a bit, becoming a bit more structured. cmdutil.bug_from_shortname() renamed to cmdutil.bug_from_id(). New functions cmdutil.parse_id() and cmdutil.bug_comment_from_id(). Additional doctests in libbe.comment.Comment.comment_shortnames() to show example output if bug_shortname==None. Brought be-xml-to-mbox and be-mbox-to-xml up to speed on the current -rooted format. * Added handling to their comment handling. * Moved extra strings from email bodies to X-Extra-String headers (some comment bodies are not text, and we should keep the estr location consistent between bugs and comments.) --- interfaces/xml/be-mbox-to-xml | 8 ++++---- interfaces/xml/be-xml-to-mbox | 42 ++++++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 24 deletions(-) (limited to 'interfaces') diff --git a/interfaces/xml/be-mbox-to-xml b/interfaces/xml/be-mbox-to-xml index a740117..3af2978 100755 --- a/interfaces/xml/be-mbox-to-xml +++ b/interfaces/xml/be-mbox-to-xml @@ -15,8 +15,8 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. """ -Convert an mbox into xml suitable for imput into be. - $ cat mbox | be-mbox-to-xml | be comment --xml - +Convert an mbox into xml suitable for input into be. + $ be-mbox-to-xml file.mbox | be import-xml -c - mbox is a flat-file format, consisting of a series of messages. Messages begin with a a From_ line, followed by RFC 822 email, followed by a blank line. @@ -140,10 +140,10 @@ def comment_message_to_xml(message, fields=None): def main(mbox_filename): mb = mbox(mbox_filename) print u'' % DEFAULT_ENCODING - print u"" + print u"" for message in mb: print comment_message_to_xml(message) - print u"" + print u"" if __name__ == "__main__": diff --git a/interfaces/xml/be-xml-to-mbox b/interfaces/xml/be-xml-to-mbox index 7960d56..ecc6327 100755 --- a/interfaces/xml/be-xml-to-mbox +++ b/interfaces/xml/be-xml-to-mbox @@ -88,19 +88,18 @@ class Bug (LimitedAttrDict): def print_to_mbox(self): name,addr = email.utils.parseaddr(self["creator"]) print "From %s %s" % (addr, rfc2822_to_asctime(self["created"])) - print "Message-ID: <%s@%s>" % (self["uuid"], DEFAULT_DOMAIN) + print "Message-id: <%s@%s>" % (self["uuid"], DEFAULT_DOMAIN) print "Date: %s" % self["created"] print "From: %s" % self["creator"] print "Content-Type: %s; charset=%s" % ("text/plain", DEFAULT_ENCODING) print "Content-Transfer-Encoding: 8bit" print "Subject: %s: %s" % (self["short-name"], self["summary"]) + if "extra-strings" in self: + for estr in self["extra_strings"]: + print "X-Extra-String: %s" % estr print "" print self["summary"] print "" - if "extra-strings" in self: - print "extra strings:\n ", - print '\n '.join(self["extra_strings"]) - print "" if "comments" in self: for comment in self["comments"]: comment.print_to_mbox(self) @@ -131,7 +130,8 @@ class Comment (LimitedAttrDict): u"author", u"date", u"content-type", - u"body"] + u"body", + u"extra-strings"] def print_to_mbox(self, bug=None): if bug == None: bug = Bug() @@ -142,7 +142,7 @@ class Comment (LimitedAttrDict): elif "alt-id" in self: id = self["alt-id"] else: id = None if id != None: - print "Message-ID: <%s@%s>" % (id, DEFAULT_DOMAIN) + print "Message-id: <%s@%s>" % (id, DEFAULT_DOMAIN) print "Date: %s" % self["date"] print "From: %s" % self["author"] subject = "" @@ -156,6 +156,9 @@ class Comment (LimitedAttrDict): if "in-reply-to" not in self.keys(): self["in-reply-to"] = bug["uuid"] print "In-Reply-To: <%s@%s>" % (self["in-reply-to"], DEFAULT_DOMAIN) + if "extra-strings" in self: + for estr in self["extra_strings"]: + print "X-Extra-String: %s" % estr if self["content-type"].startswith("text/"): print "Content-Transfer-Encoding: 8bit" print "Content-Type: %s; charset=%s" % (self["content-type"], DEFAULT_ENCODING) @@ -168,9 +171,15 @@ class Comment (LimitedAttrDict): assert element.tag == "comment", element.tag for field in element.getchildren(): text = unescape(unicode(field.text).decode("unicode_escape").strip()) - if field.tag == "body": - text+="\n" - self[field.tag] = text + if field.tag == "extra-string": + if "extra-strings" in self: + self["extra-strings"].append(text) + else: + self["extra-strings"] = [text] + else: + if field.tag == "body": + text+="\n" + self[field.tag] = text def print_to_mbox(element): if element.tag == "bug": @@ -181,16 +190,9 @@ def print_to_mbox(element): c = Comment() c.init_from_etree(element) c.print_to_mbox() - elif element.tag in ["bugs", "bug-list"]: - for b_elt in element.getchildren(): - b = Bug() - b.init_from_etree(b_elt) - b.print_to_mbox() - elif element.tag in ["comments", "comment-list"]: - for c_elt in element.getchildren(): - c = Comment() - c.init_from_etree(c_elt) - c.print_to_mbox() + elif element.tag in ["be-xml"]: + for elt in element.getchildren(): + print_to_mbox(elt) if __name__ == "__main__": import sys -- cgit From a07c70a8cb30fa7295471490a7b7fdfbd48a99ec Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Nov 2009 12:23:47 -0500 Subject: Upgraded `be show --xml` to new format. --- interfaces/xml/be-xml-to-mbox | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'interfaces') diff --git a/interfaces/xml/be-xml-to-mbox b/interfaces/xml/be-xml-to-mbox index ecc6327..dc4524e 100755 --- a/interfaces/xml/be-xml-to-mbox +++ b/interfaces/xml/be-xml-to-mbox @@ -86,20 +86,23 @@ class Bug (LimitedAttrDict): u"comments", u"extra-strings"] def print_to_mbox(self): - name,addr = email.utils.parseaddr(self["creator"]) - print "From %s %s" % (addr, rfc2822_to_asctime(self["created"])) - print "Message-id: <%s@%s>" % (self["uuid"], DEFAULT_DOMAIN) - print "Date: %s" % self["created"] - print "From: %s" % self["creator"] - print "Content-Type: %s; charset=%s" % ("text/plain", DEFAULT_ENCODING) - print "Content-Transfer-Encoding: 8bit" - print "Subject: %s: %s" % (self["short-name"], self["summary"]) - if "extra-strings" in self: - for estr in self["extra_strings"]: - print "X-Extra-String: %s" % estr - print "" - print self["summary"] - print "" + if "creator" in self: + # otherwise, probably a `be show` uuid-only bug to avoid + # root comments. + name,addr = email.utils.parseaddr(self["creator"]) + print "From %s %s" % (addr, rfc2822_to_asctime(self["created"])) + print "Message-id: <%s@%s>" % (self["uuid"], DEFAULT_DOMAIN) + print "Date: %s" % self["created"] + print "From: %s" % self["creator"] + print "Content-Type: %s; charset=%s" % ("text/plain", DEFAULT_ENCODING) + print "Content-Transfer-Encoding: 8bit" + print "Subject: %s: %s" % (self["short-name"], self["summary"]) + if "extra-strings" in self: + for estr in self["extra_strings"]: + print "X-Extra-String: %s" % estr + print "" + print self["summary"] + print "" if "comments" in self: for comment in self["comments"]: comment.print_to_mbox(self) -- cgit From 3b03b9aa1bd0d2550fab48940242453cff238508 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Nov 2009 13:08:05 -0500 Subject: Added interfaces/email/interactive/examples/email_bugs For testing the new [be-bug:xml] interface we're about to write. --- interfaces/email/interactive/examples/email_bugs | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 interfaces/email/interactive/examples/email_bugs (limited to 'interfaces') diff --git a/interfaces/email/interactive/examples/email_bugs b/interfaces/email/interactive/examples/email_bugs new file mode 100644 index 0000000..949e1c1 --- /dev/null +++ b/interfaces/email/interactive/examples/email_bugs @@ -0,0 +1,37 @@ +From jdoe@example.com Fri Apr 18 12:00:00 2008 +Content-Type: text/xml; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: jdoe@example.com +To: a@b.com +Date: Fri, 18 Apr 2008 12:00:00 +0000 +Subject: [be-bug:xml] Updates to a, b + + + + + 1.0.0 + be + 446 + wking@drexel.edu-20091119214553-iqyw2cpqluww3zna + + + a + a + minor + open + John Doe <jdoe@example.com> + Thu, 01 Jan 1970 00:00:00 +0000 + Bug A + + + b + b + minor + closed + Jane Doe <jdoe@example.com> + Thu, 01 Jan 1970 00:00:00 +0000 + Bug B + + + -- cgit From 65bf5f8d9ddf51625d6b3b282838a9a4c71868d3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Nov 2009 13:18:54 -0500 Subject: Fixed bug in be-handle-mail.Message.parse_comment() for emails w/o Message-id. You used to get: Uncaught exception: 'NoneType' object has no attribute 'decode' File "./be-handle-mail", line 857, in main m.run() File "./be-handle-mail", line 591, in run command.run() File "./be-handle-mail", line 244, in run manipulate_encodings=False) File "/tmp/be.email-bugs/interfaces/email/interactive/libbe/cmdutil.py", line 82, in execute ret = cmd.execute([a.decode(enc) for a in args], A `print args' in Message.parse_comment() revealed [..., u'--alt-id', None,...] --- interfaces/email/interactive/be-handle-mail | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index fa80698..8831e3c 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -564,8 +564,10 @@ class Message (object): if mime_type == "text/plain": body = self._strip_footer(body) content_type = mime_type - args = [u"--author", author, u"--alt-id", alt_id, - u"--content-type", content_type, bug_id, u"-"] + args = [u"--author", author] + if alt_id != None: + args.extend([u"--alt-id", alt_id]) + args.extend([u"--content-type", content_type, bug_id, u"-"]) commands = [Command(self, command, args, stdin=body)] return commands def parse_control(self): -- cgit From f1cb3e5d0f6341c4cdf457f4f029270037ecae16 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Nov 2009 13:53:09 -0500 Subject: Added [be-tag:xml] processing to be-handle-mail. Now it will automatically apply and commit emails from be email-bugs ... --- interfaces/email/interactive/be-handle-mail | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index 8831e3c..bd37f55 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -81,6 +81,7 @@ SUBJECT_TAG_START = None SUBJECT_TAG_NEW = None SUBJECT_TAG_COMMENT = None SUBJECT_TAG_CONTROL = None +SUBJECT_TAG_XML = None BREAK = u"--" NEW_REQUIRED_PSEUDOHEADERS = [u"Version"] @@ -90,7 +91,7 @@ NEW_OPTIONAL_PSEUDOHEADERS = [u"Reporter", u"Assign", u"Depend", u"Severity", CONTROL_COMMENT = u"#" ALLOWED_COMMANDS = [u"assign", u"comment", u"commit", u"depend", u"help", u"list", u"merge", u"new", u"open", u"severity", u"show", - u"status", u"subscribe", u"tag", u"target"] + u"status", u"subscribe", u"tag", u"target", u"import-xml"] AUTOCOMMIT = True @@ -402,8 +403,8 @@ class Message (object): def _subject_tag_type(self): """ Parse subject tag, return (type, value), where type is one of - None, "new", "comment", or "control"; and value is None except - in the case of "comment", in which case it's the bug + None, "new", "comment", "control", or "xml"; and value is None + except in the case of "comment", in which case it's the bug ID/shortname. """ tag,subject = self._split_subject() @@ -413,6 +414,8 @@ class Message (object): type = u"new" elif tag == SUBJECT_TAG_CONTROL: type = u"control" + elif tag == SUBJECT_TAG_XML: + type = u"xml" else: match = SUBJECT_TAG_COMMENT.match(tag) if len(match.groups()) == 1: @@ -506,6 +509,8 @@ class Message (object): commands = self.parse_comment(value) elif tag_type == u"control": commands = self.parse_control() + elif tag_type == u"xml": + commands = self.parse_xml() else: raise Exception, u"Unrecognized tag type '%s'" % tag_type return commands @@ -585,6 +590,16 @@ class Message (object): if len(commands) == 0: raise InvalidEmail(self, u"No commands in control email.") return commands + def parse_xml(self): + command = u"import-xml" + body,mime_type = list(self._get_bodies_and_mime_types())[0] + if mime_type != "text/xml": + raise InvalidEmail(self, + u"Emails to %s must have MIME type 'text/xml', not '%s'." + % (SUBJECT_TAG_XML, mime_type)) + args = [u"-"] + commands = [Command(self, command, args, stdin=body)] + return commands def run(self): self._begin_response() commands = self.parse() @@ -738,13 +753,15 @@ def generate_global_tags(tag_base=u"be-bug"): Generate a series of tags from a base tag string. """ global SUBJECT_TAG_BASE, SUBJECT_TAG_START, SUBJECT_TAG_RESPONSE, \ - SUBJECT_TAG_NEW, SUBJECT_TAG_COMMENT, SUBJECT_TAG_CONTROL + SUBJECT_TAG_NEW, SUBJECT_TAG_COMMENT, SUBJECT_TAG_CONTROL, \ + SUBJECT_TAG_XML SUBJECT_TAG_BASE = tag_base SUBJECT_TAG_START = u"[%s" % tag_base SUBJECT_TAG_RESPONSE = u"[%s]" % tag_base SUBJECT_TAG_NEW = u"[%s:submit]" % tag_base SUBJECT_TAG_COMMENT = re.compile(u"\[%s:([\-0-9a-z]*)]" % tag_base) SUBJECT_TAG_CONTROL = SUBJECT_TAG_RESPONSE + SUBJECT_TAG_XML = u"[%s:xml]" % tag_base def open_logfile(logpath=None): """ @@ -947,6 +964,10 @@ class GenerateGlobalTagsTestCase (unittest.TestCase): m = SUBJECT_TAG_COMMENT.match("[projectX-bug:xyz-123]") self.failUnlessEqual(len(m.groups()), 1) self.failUnlessEqual(m.group(1), u"xyz-123") + def test_subject_tag_xml(self): + "Should set SUBJECT_TAG_XML global correctly" + generate_global_tags(u"projectX-bug") + self.failUnlessEqual(SUBJECT_TAG_XML, u"[projectX-bug:xml]") if __name__ == "__main__": main(sys.argv) -- cgit From 85fd7e2681005e8b47ffc1e73fcc0cca93025921 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Nov 2009 14:03:00 -0500 Subject: Updated interfaces/email/interactive/README for [be-bug:xml] interface --- interfaces/email/interactive/README | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/README b/interfaces/email/interactive/README index 79ef9a9..2070973 100644 --- a/interfaces/email/interactive/README +++ b/interfaces/email/interactive/README @@ -23,13 +23,15 @@ execution. Once be-handle-mail receives the email, the parsing method is selected according to the subject tag that procmail used grab the email in the -first place. There are three parsing styles: +first place. There are four parsing styles: Style Subject creating bugs [be-bug:submit] new bug summary commenting on bugs [be-bug:] commit message control [be-bug] commit message + xml [be-bug:xml] commit message These are analogous to submit@bugs.debian.org, nnn@bugs.debian.org, -and control@bugs.debian.org respectively. +and control@bugs.debian.org respectively. The xml style has no Debian +analog. Creating bugs ============= @@ -106,6 +108,15 @@ shlex.split(). -- Goofy tagline ignored. +XML +=== + +This interface allows users without access to the versioned source of +the program to conveniently submit bugs and comments using be. You +should not attempt to compose emails for this interface by hand. See +the documentation for the `email-bugs' and `import-xml' be commands +for details. + Example emails ============== -- cgit From 614d4e40e148520ac511cbe0606bcbdcf24c8a08 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 21 Nov 2009 15:18:02 -0500 Subject: Added restrict_file_access to becommands' execute() args. + associated adjustments in other files. See cmdutil.restrict_file_access.__doc__ for an explanation of the security hole this closes. --- interfaces/email/interactive/be-handle-mail | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index bd37f55..e0e3490 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -242,7 +242,8 @@ class Command (object): os.chdir(BE_DIR) try: self.ret = libbe.cmdutil.execute(self.command, self.args, - manipulate_encodings=False) + manipulate_encodings=False, + restrict_file_access=True) except libbe.cmdutil.GetHelp: print libbe.cmdutil.help(command) except libbe.cmdutil.GetCompletions: -- cgit From 2156616c3dab8207a933295bfbc9d125dac4bc34 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 30 Nov 2009 06:28:01 -0500 Subject: be-handle-mail uses more conservative --add-only for be-bugs:xml --- interfaces/email/interactive/be-handle-mail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index e0e3490..3b321cf 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -598,7 +598,7 @@ class Message (object): raise InvalidEmail(self, u"Emails to %s must have MIME type 'text/xml', not '%s'." % (SUBJECT_TAG_XML, mime_type)) - args = [u"-"] + args = [u"--add-only", u"-"] commands = [Command(self, command, args, stdin=body)] return commands def run(self): -- cgit From 129c100046231ed15d2f16eaa90b5c01e41a442c Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Dec 2009 01:58:41 -0500 Subject: Moved subscription types from becommands/subscribe.py to libbe/diff.py. --- interfaces/email/interactive/be-handle-mail | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index 3b321cf..952c16d 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -685,21 +685,21 @@ class Message (object): ordered_subscriptions.extend(subscriptions.items()) for id,types in ordered_subscriptions: if id == "DIR": - if subscribe.BUGDIR_TYPE_ALL in types: + if libbe.diff.BUGDIR_TYPE_ALL in types: parts.append(diff_tree.report_or_none()) break # we've attached everything, so stop checking. - if subscribe.BUGDIR_TYPE_NEW in types: + if libbe.diff.BUGDIR_TYPE_NEW in types: new = diff_tree.child_by_path("/bugs/new") parts.append(new.report_or_none()) continue # move on to next id # if we get this far, id refers to a bug. - assert types == [subscribe.BUG_TYPE_ALL], types + assert types == [libbe.diff.BUG_TYPE_ALL], types if id not in bug_index: continue # no changes here, move on to next id type,bug_root = bug_index[id] if type == "added" \ and "DIR" in subscriptions \ - and subscriptions["DIR"] == subscribe.BUGDIR_TYPE_NEW: + and subscriptions["DIR"] == libbe.diff.BUGDIR_TYPE_NEW: # this info already attached at the DIR level continue # move on to next id parts.append(bug_root.report_or_none()) -- cgit From cc58188259e36193c3174fbb55e37c790382a7ea Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Dec 2009 07:41:50 -0500 Subject: Use new libbe.diff.Diff.report_tree(subscriptions) in be-handle-mail. This makes Message.subscriber_emails() much cleaner. Also fix libbe.diff.Diff._sub_report() to handle missing 'bugdir/settings'. Added libbe.diff.SubscriptionType.__cmp__ so that SubscriptionType('all') == SubscriptionType('all') This is important when comparing the types returned by becommands.subscribe.get_bugdir_subscribers() with the libbe.diff.*_TYPE_* types. --- interfaces/email/interactive/be-handle-mail | 67 ++++++++--------------------- 1 file changed, 17 insertions(+), 50 deletions(-) (limited to 'interfaces') diff --git a/interfaces/email/interactive/be-handle-mail b/interfaces/email/interactive/be-handle-mail index 952c16d..10f6884 100755 --- a/interfaces/email/interactive/be-handle-mail +++ b/interfaces/email/interactive/be-handle-mail @@ -306,6 +306,8 @@ class DiffTree (libbe.diff.DiffTree): """ def report_or_none(self): report = self.report() + if report == None: + return None payload = report.get_payload() if payload == None or len(payload) == 0: return None @@ -315,7 +317,7 @@ class DiffTree (libbe.diff.DiffTree): if report == None: return "No changes" else: - return send_pgp_mime.flatten(self.report(), to_unicode=True) + return send_pgp_mime.flatten(report, to_unicode=True) def make_root(self): return MIMEMultipart() def join(self, root, parent, data_part): @@ -658,64 +660,29 @@ class Message (object): bd.load_all_bugs() subscribers = subscribe.get_bugdir_subscribers(bd, THIS_SERVER) - if len(subscribers) == 0: - return [] + return [] + for subscriber,subscriptions in subscribers.items(): + subscribers[subscriber] = [] + for id,types in subscriptions.items(): + for type in types: + subscribers[subscriber].append( + libbe.diff.Subscription(id,type)) before_bd, after_bd = self._get_before_and_after_bugdirs(bd, previous_revision) diff = Diff(before_bd, after_bd) - diff_tree = diff.report_tree(diff_tree=DiffTree) - bug_index = {} - for child in diff_tree.child_by_path("/bugs/new"): - bug_index[child.name] = ("added", child) - for child in diff_tree.child_by_path("/bugs/mod"): - bug_index[child.name] = ("modified", child) - for child in diff_tree.child_by_path("/bugs/rem"): - bug_index[child.name] = ("removed", child) + diff.full_report(diff_tree=DiffTree) header = self._subscriber_header(bd, previous_revision) emails = [] for subscriber,subscriptions in subscribers.items(): header.replace_header("to", subscriber) - parts = [] - if "DIR" in subscriptions: # make sure we check the DIR level first - ordered_subscriptions = [("DIR", subscriptions.pop("DIR"))] - else: - ordered_subscriptions = [] - ordered_subscriptions.extend(subscriptions.items()) - for id,types in ordered_subscriptions: - if id == "DIR": - if libbe.diff.BUGDIR_TYPE_ALL in types: - parts.append(diff_tree.report_or_none()) - break # we've attached everything, so stop checking. - if libbe.diff.BUGDIR_TYPE_NEW in types: - new = diff_tree.child_by_path("/bugs/new") - parts.append(new.report_or_none()) - continue # move on to next id - # if we get this far, id refers to a bug. - assert types == [libbe.diff.BUG_TYPE_ALL], types - if id not in bug_index: - continue # no changes here, move on to next id - type,bug_root = bug_index[id] - if type == "added" \ - and "DIR" in subscriptions \ - and subscriptions["DIR"] == libbe.diff.BUGDIR_TYPE_NEW: - # this info already attached at the DIR level - continue # move on to next id - parts.append(bug_root.report_or_none()) - parts = [p for p in parts if p != None] - if len(parts) == 0: - continue # no email to this subscriber - elif len(parts) == 1: - root = parts[0] - else: # join subscription parts into a single body - root = MIMEMultipart() - root[u"Content-Description"] = u"Multiple subscription trees." - for part in parts: - root.attach(part) - emails.append(send_pgp_mime.attach_root(header, root)) - if LOGFILE != None: - LOGFILE.write(u"Preparing to notify %s of changes\n" % subscriber) + report = diff.report_tree(subscriptions, diff_tree=DiffTree) + root = report.report_or_none() + if root != None: + emails.append(send_pgp_mime.attach_root(header, root)) + if LOGFILE != None: + LOGFILE.write(u"Preparing to notify %s of changes\n" % subscriber) return emails def _get_before_and_after_bugdirs(self, bd, previous_revision=None): if previous_revision == None: -- cgit From 882492c80f47b6b5330b2510e9b8ef4164666303 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Dec 2009 17:34:09 -0500 Subject: Adjusted be-mbox-to-xml to not drop author info from multipart messages --- interfaces/xml/be-mbox-to-xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'interfaces') diff --git a/interfaces/xml/be-mbox-to-xml b/interfaces/xml/be-mbox-to-xml index 3af2978..eda6d6e 100755 --- a/interfaces/xml/be-mbox-to-xml +++ b/interfaces/xml/be-mbox-to-xml @@ -40,7 +40,10 @@ def normalize_email_address(address): """ Standardize whitespace, etc. """ - return email.utils.formataddr(email.utils.parseaddr(address)) + addr = email.utils.formataddr(email.utils.parseaddr(address)) + if len(addr) == 0: + return None + return addr def normalize_RFC_2822_date(date): """ -- cgit From 3f7ec7f8c3dc9b52cd6d6b14866aad1faf502676 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Dec 2009 21:01:49 -0500 Subject: Removed Bug.target reference from interfaces/xml/be-xml-to-mbox. --- interfaces/xml/be-xml-to-mbox | 1 - 1 file changed, 1 deletion(-) (limited to 'interfaces') diff --git a/interfaces/xml/be-xml-to-mbox b/interfaces/xml/be-xml-to-mbox index dc4524e..ef7b714 100755 --- a/interfaces/xml/be-xml-to-mbox +++ b/interfaces/xml/be-xml-to-mbox @@ -78,7 +78,6 @@ class Bug (LimitedAttrDict): u"severity", u"status", u"assigned", - u"target", u"reporter", u"creator", u"created", -- cgit From 4d6bc107406ce936639cd1bd314d6ac3b4e3bff3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 5 Dec 2009 21:04:41 -0500 Subject: Removed Bugs-Everywhere-Web/server.log from version control --- interfaces/web/Bugs-Everywhere-Web/server.log | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 interfaces/web/Bugs-Everywhere-Web/server.log (limited to 'interfaces') diff --git a/interfaces/web/Bugs-Everywhere-Web/server.log b/interfaces/web/Bugs-Everywhere-Web/server.log deleted file mode 100644 index fe02ade..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/server.log +++ /dev/null @@ -1,26 +0,0 @@ -2005/12/01 15:44:05 CONFIG INFO Server parameters: -2005/12/01 15:44:05 CONFIG INFO server.environment: production -2005/12/01 15:44:05 CONFIG INFO server.logToScreen: False -2005/12/01 15:44:05 CONFIG INFO server.logFile: server.log -2005/12/01 15:44:05 CONFIG INFO server.protocolVersion: HTTP/1.0 -2005/12/01 15:44:05 CONFIG INFO server.socketHost: -2005/12/01 15:44:05 CONFIG INFO server.socketPort: 8080 -2005/12/01 15:44:05 CONFIG INFO server.socketFile: -2005/12/01 15:44:05 CONFIG INFO server.reverseDNS: False -2005/12/01 15:44:05 CONFIG INFO server.socketQueueSize: 5 -2005/12/01 15:44:05 CONFIG INFO server.threadPool: 0 -2005/12/01 15:44:05 HTTP INFO Serving HTTP on http://localhost:8080/ -2005/12/01 15:44:17 HTTP INFO 127.0.0.1 - GET / HTTP/1.1 -2005/12/01 15:44:37 HTTP INFO 192.168.2.12 - GET / HTTP/1.1 -2005/12/01 15:44:42 HTTP INFO 192.168.2.12 - GET /be HTTP/1.1 -2005/12/01 15:44:43 HTTP INFO 192.168.2.12 - GET /be/301724b1-3853-4aff-8f23-44373df7cf1c HTTP/1.1 -2005/12/01 15:44:48 HTTP INFO 192.168.2.12 - GET /be/ HTTP/1.1 -2005/12/01 15:44:50 HTTP INFO 192.168.2.12 - GET / HTTP/1.1 -2005/12/01 15:44:53 HTTP INFO 192.168.2.12 - GET /devel/ HTTP/1.1 -2005/12/01 15:44:58 HTTP INFO 192.168.2.12 - GET / HTTP/1.1 -2005/12/01 15:52:57 HTTP INFO 127.0.0.1 - GET /devel HTTP/1.1 -2005/12/01 15:52:59 HTTP INFO 127.0.0.1 - GET /devel HTTP/1.1 -2005/12/01 15:53:25 HTTP INFO 127.0.0.1 - GET /devel HTTP/1.1 -2005/12/01 15:53:29 HTTP INFO hit: shutting down server -2005/12/01 15:53:29 HTTP INFO HTTP Server shut down -2005/12/01 15:53:29 HTTP INFO CherryPy shut down -- cgit From 072a46eefb66733ae570a9fb9abbc9570461a490 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 29 Dec 2009 21:53:58 -0500 Subject: Emptied interfaces directory Mostly throwing out a bunch of outdated GUIs. The email interface hasn't been moved over to the new 'Command' format yet... --- interfaces/README | 34 --- interfaces/email/catmutt | 59 ----- interfaces/email/interactive/becommands | 1 - interfaces/gui/beg/beg | 12 -- interfaces/gui/beg/table.py | 97 --------- interfaces/gui/wxbe/wxbe | 87 -------- .../Bugs-Everywhere-Web.egg-info/SOURCES.txt | 36 ---- .../Bugs-Everywhere-Web.egg-info/not-zip-safe | 0 .../Bugs-Everywhere-Web.egg-info/requires.txt | 1 - .../Bugs-Everywhere-Web.egg-info/sqlobject.txt | 2 - .../Bugs-Everywhere-Web.egg-info/top_level.txt | 2 - .../Bugs_Everywhere_Web.egg-info/PKG-INFO | 15 -- .../Bugs_Everywhere_Web.egg-info/SOURCES.txt | 44 ---- .../dependency_links.txt | 1 - .../Bugs_Everywhere_Web.egg-info/not-zip-safe | 1 - .../paster_plugins.txt | 2 - .../Bugs_Everywhere_Web.egg-info/requires.txt | 1 - .../Bugs_Everywhere_Web.egg-info/sqlobject.txt | 2 - .../Bugs_Everywhere_Web.egg-info/top_level.txt | 1 - interfaces/web/Bugs-Everywhere-Web/README | 60 ------ .../web/Bugs-Everywhere-Web/beweb/__init__.py | 0 interfaces/web/Bugs-Everywhere-Web/beweb/app.cfg | 120 ----------- .../Bugs-Everywhere-Web/beweb/config.py.example | 10 - .../web/Bugs-Everywhere-Web/beweb/config/app.cfg | 92 -------- .../web/Bugs-Everywhere-Web/beweb/config/log.cfg | 29 --- .../web/Bugs-Everywhere-Web/beweb/controllers.py | 240 --------------------- .../web/Bugs-Everywhere-Web/beweb/formatting.py | 76 ------- interfaces/web/Bugs-Everywhere-Web/beweb/json.py | 13 -- interfaces/web/Bugs-Everywhere-Web/beweb/model.py | 107 --------- interfaces/web/Bugs-Everywhere-Web/beweb/prest.py | 168 --------------- .../web/Bugs-Everywhere-Web/beweb/release.py | 14 -- .../Bugs-Everywhere-Web/beweb/static/css/style.css | 116 ---------- .../beweb/static/images/ds-b.png | Bin 213 -> 0 bytes .../beweb/static/images/ds-bl.png | Bin 327 -> 0 bytes .../beweb/static/images/ds-br.png | Bin 365 -> 0 bytes .../beweb/static/images/ds-l.png | Bin 197 -> 0 bytes .../beweb/static/images/ds-r.png | Bin 214 -> 0 bytes .../beweb/static/images/ds-t.png | Bin 200 -> 0 bytes .../beweb/static/images/ds-tl.png | Bin 240 -> 0 bytes .../beweb/static/images/ds-tr.png | Bin 311 -> 0 bytes .../beweb/static/images/ds2-b.png | Bin 206 -> 0 bytes .../beweb/static/images/ds2-r.png | Bin 204 -> 0 bytes .../beweb/static/images/favicon.ico | Bin 318 -> 0 bytes .../beweb/static/images/favicon.png | Bin 267 -> 0 bytes .../beweb/static/images/half-spiral.png | Bin 1112 -> 0 bytes .../beweb/static/images/header_inner.png | Bin 37537 -> 0 bytes .../beweb/static/images/info.png | Bin 2889 -> 0 bytes .../beweb/static/images/is-b.png | Bin 200 -> 0 bytes .../beweb/static/images/is-bl.png | Bin 408 -> 0 bytes .../beweb/static/images/is-br.png | Bin 304 -> 0 bytes .../beweb/static/images/is-l.png | Bin 214 -> 0 bytes .../beweb/static/images/is-r.png | Bin 197 -> 0 bytes .../beweb/static/images/is-t.png | Bin 213 -> 0 bytes .../beweb/static/images/is-tl.png | Bin 413 -> 0 bytes .../beweb/static/images/is-tr.png | Bin 414 -> 0 bytes .../Bugs-Everywhere-Web/beweb/static/images/ok.png | Bin 25753 -> 0 bytes .../beweb/static/images/shadows.png | Bin 3960 -> 0 bytes .../beweb/static/images/spiral.png | Bin 2120 -> 0 bytes .../beweb/static/images/tg_under_the_hood.png | Bin 4010 -> 0 bytes .../beweb/static/images/under_the_hood_blue.png | Bin 2667 -> 0 bytes .../beweb/templates/__init__.py | 0 .../Bugs-Everywhere-Web/beweb/templates/about.kid | 21 -- .../Bugs-Everywhere-Web/beweb/templates/bugs.kid | 52 ----- .../beweb/templates/edit_bug.kid | 52 ----- .../beweb/templates/edit_comment.kid | 26 --- .../Bugs-Everywhere-Web/beweb/templates/error.kid | 14 -- .../Bugs-Everywhere-Web/beweb/templates/login.kid | 113 ---------- .../Bugs-Everywhere-Web/beweb/templates/master.kid | 71 ------ .../beweb/templates/projects.kid | 32 --- .../beweb/templates/welcome.kid | 50 ----- .../Bugs-Everywhere-Web/beweb/tests/__init__.py | 0 .../beweb/tests/test_controllers.py | 16 -- .../Bugs-Everywhere-Web/beweb/tests/test_model.py | 23 -- interfaces/web/Bugs-Everywhere-Web/dev.cfg | 71 ------ interfaces/web/Bugs-Everywhere-Web/libbe | 1 - interfaces/web/Bugs-Everywhere-Web/prod.cfg | 41 ---- interfaces/web/Bugs-Everywhere-Web/sample-prod.cfg | 71 ------ interfaces/web/Bugs-Everywhere-Web/setup-tables.py | 34 --- interfaces/web/Bugs-Everywhere-Web/setup.py | 62 ------ interfaces/web/Bugs-Everywhere-Web/start-beweb.py | 28 --- interfaces/xml/be-mbox-to-xml | 154 ------------- interfaces/xml/be-xml-to-mbox | 208 ------------------ 82 files changed, 2583 deletions(-) delete mode 100644 interfaces/README delete mode 100755 interfaces/email/catmutt delete mode 120000 interfaces/email/interactive/becommands delete mode 100755 interfaces/gui/beg/beg delete mode 100644 interfaces/gui/beg/table.py delete mode 100755 interfaces/gui/wxbe/wxbe delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/SOURCES.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/not-zip-safe delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/requires.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/sqlobject.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/top_level.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/PKG-INFO delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/SOURCES.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/dependency_links.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/not-zip-safe delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/paster_plugins.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/requires.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/sqlobject.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/top_level.txt delete mode 100644 interfaces/web/Bugs-Everywhere-Web/README delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/__init__.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/app.cfg delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/config.py.example delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/config/app.cfg delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/config/log.cfg delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/controllers.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/formatting.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/json.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/model.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/prest.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/release.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/css/style.css delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-b.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-bl.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-br.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-l.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-r.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-t.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tl.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tr.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-b.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-r.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.ico delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/half-spiral.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/header_inner.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/info.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-b.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-bl.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-br.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-l.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-r.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-t.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tl.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tr.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ok.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/shadows.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/spiral.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/tg_under_the_hood.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/static/images/under_the_hood_blue.png delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/__init__.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/about.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/bugs.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_comment.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/error.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/login.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/master.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/projects.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/templates/welcome.kid delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/tests/__init__.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/tests/test_controllers.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/beweb/tests/test_model.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/dev.cfg delete mode 120000 interfaces/web/Bugs-Everywhere-Web/libbe delete mode 100644 interfaces/web/Bugs-Everywhere-Web/prod.cfg delete mode 100644 interfaces/web/Bugs-Everywhere-Web/sample-prod.cfg delete mode 100644 interfaces/web/Bugs-Everywhere-Web/setup-tables.py delete mode 100644 interfaces/web/Bugs-Everywhere-Web/setup.py delete mode 100755 interfaces/web/Bugs-Everywhere-Web/start-beweb.py delete mode 100755 interfaces/xml/be-mbox-to-xml delete mode 100755 interfaces/xml/be-xml-to-mbox (limited to 'interfaces') diff --git a/interfaces/README b/interfaces/README deleted file mode 100644 index 4d74580..0000000 --- a/interfaces/README +++ /dev/null @@ -1,34 +0,0 @@ -Removing spam commits from the history -====================================== - -arch bzr darcs git hg none - -In the case that some spam or inappropriate comment makes its way -through you interface, you can remove the offending commit XYZ with: - - If the offending commit is the last commit: - - arch: - bzr: bzr uncommit && bzr revert - darcs: darcs obliterate --last=1 - git: git reset --hard HEAD^ - hg: hg rollback && hg revert - - If the offending commit is not the last commit: - - arch: - bzr: bzr rebase -r ..-1 --onto before:XYZ . - (requires bzr-rebase plugin, note, you have to increment XYZ by - hand for , because bzr does not support "after:XYZ".) - darcs: darcs obliterate --matches 'name XYZ' - git: git rebase --onto XYZ~1 XYZ - hg: -not-supported- - (From http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#id394667 - "Mercurial also does not provide a way to make a file or - changeset completely disappear from history, because there is no - way to enforce its disappearance") - -Note that all of these _change_the_repo_history_, so only do this on -your interface-specific repo before it interacts with any other repo. -Otherwise, you'll have to survive by cherry-picking only the good -commits. diff --git a/interfaces/email/catmutt b/interfaces/email/catmutt deleted file mode 100755 index 601f14f..0000000 --- a/interfaces/email/catmutt +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh - -# catmutt - wrap mutt allowing mboxes read from stdin. -# -# Copyright (C) 1998-1999 Moritz Barsnick , -# 2009 William Trevor King -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 as published by the Free Software Foundation. -# -# 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 -# -# developed from grepm-0.6 -# http://www.barsnick.net/sw/grepm.html - -PROGNAME=`basename "$0"` -export TMPDIR="${TMPDIR-/tmp}" # used by mktemp -umask 077 - -if [ $# -gt 0 ] && [ "$1" = "--help" ]; then - echo 1>&2 "Usage: ${PROGNAME} [--help] mutt-arguments" - echo 1>&2 "" - echo 1>&2 "Read a mailbox file from stdin and opens it with mutt." - echo 1>&2 "For example: cat somefile.mbox | ${PROGNAME}" - exit 0 -fi - -# Note: the -t/-p options to mktemp are deprecated for mktemp (GNU -# coreutils) 7.1 in favor of --tmpdir but the --tmpdir option does not -# exist yet for my 6.10-3ubuntu2 coreutils -TMPFILE=`mktemp -t catmutt.XXXXXX` || exit 1 - -trap "rm -f ${TMPFILE}; exit 1" 1 2 3 13 15 - -cat > "${TMPFILE}" || exit 1 - -# Now that we've read in the mailbox file, reopen stdin for mutt/user -# interaction. When in a pipe we're not technically in a tty, so use -# a little hack from "greno" at -# http://www.linuxforums.org/forum/linux-programming-scripting/98607-bash-stdin-problem.html -tty="/dev/`ps -p$$ --no-heading | awk '{print $2}'`" -exec < ${tty} - -if [ `wc -c "${TMPFILE}" | awk '{print $1}'` -gt 0 ]; then - echo 1>&2 "Calling mutt on temporary mailbox file (${TMPFILE})." - mutt -R -f "${TMPFILE}" "$@" -else - echo 1>&2 "Empty mailbox input." -fi - -rm -f "${TMPFILE}" && echo 1>&2 "Deleted temporary mailbox file (${TMPFILE})." diff --git a/interfaces/email/interactive/becommands b/interfaces/email/interactive/becommands deleted file mode 120000 index 8af773c..0000000 --- a/interfaces/email/interactive/becommands +++ /dev/null @@ -1 +0,0 @@ -../../../becommands \ No newline at end of file diff --git a/interfaces/gui/beg/beg b/interfaces/gui/beg/beg deleted file mode 100755 index 55e537d..0000000 --- a/interfaces/gui/beg/beg +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -import table -from Tkinter import * -from libbe import bugdir - -tk = Tk() -Label(tk, text="Bug list").pack() -mlb = table.MultiListbox(tk, (('Severity', 4), ('Creator', 8), ('Summary', 40))) -for bug in [b for b in bugdir.tree_root(".").list() if b.active]: - mlb.insert(END, (bug.severity, bug.creator, bug.summary)) -mlb.pack(expand=YES,fill=BOTH) -tk.mainloop() diff --git a/interfaces/gui/beg/table.py b/interfaces/gui/beg/table.py deleted file mode 100644 index 2865f28..0000000 --- a/interfaces/gui/beg/table.py +++ /dev/null @@ -1,97 +0,0 @@ -from Tkinter import * - -class MultiListbox(Frame): - def __init__(self, master, lists): - Frame.__init__(self, master) - self.lists = [] - for l,w in lists: - frame = Frame(self); frame.pack(side=LEFT, expand=YES, fill=BOTH) - Label(frame, text=l, borderwidth=1, relief=RAISED).pack(fill=X) - lb = Listbox(frame, width=w, borderwidth=0, selectborderwidth=0, - relief=FLAT, exportselection=FALSE) - lb.pack(expand=YES, fill=BOTH) - self.lists.append(lb) - lb.bind('', lambda e, s=self: s._select(e.y)) - lb.bind('', lambda e, s=self: s._select(e.y)) - lb.bind('', lambda e: 'break') - lb.bind('', lambda e, s=self: s._b2motion(e.x, e.y)) - lb.bind('', lambda e, s=self: s._button2(e.x, e.y)) - frame = Frame(self); frame.pack(side=LEFT, fill=Y) - Label(frame, borderwidth=1, relief=RAISED).pack(fill=X) - sb = Scrollbar(frame, orient=VERTICAL, command=self._scroll) - sb.pack(expand=YES, fill=Y) - self.lists[0]['yscrollcommand']=sb.set - - def _select(self, y): - row = self.lists[0].nearest(y) - self.selection_clear(0, END) - self.selection_set(row) - return 'break' - - def _button2(self, x, y): - for l in self.lists: l.scan_mark(x, y) - return 'break' - - def _b2motion(self, x, y): - for l in self.lists: l.scan_dragto(x, y) - return 'break' - - def _scroll(self, *args): - for l in self.lists: - apply(l.yview, args) - - def curselection(self): - return self.lists[0].curselection() - - def delete(self, first, last=None): - for l in self.lists: - l.delete(first, last) - - def get(self, first, last=None): - result = [] - for l in self.lists: - result.append(l.get(first,last)) - if last: return apply(map, [None] + result) - return result - - def index(self, index): - self.lists[0].index(index) - - def insert(self, index, *elements): - for e in elements: - i = 0 - for l in self.lists: - l.insert(index, e[i]) - i = i + 1 - - def size(self): - return self.lists[0].size() - - def see(self, index): - for l in self.lists: - l.see(index) - - def selection_anchor(self, index): - for l in self.lists: - l.selection_anchor(index) - - def selection_clear(self, first, last=None): - for l in self.lists: - l.selection_clear(first, last) - - def selection_includes(self, index): - return self.lists[0].selection_includes(index) - - def selection_set(self, first, last=None): - for l in self.lists: - l.selection_set(first, last) - -if __name__ == '__main__': - tk = Tk() - Label(tk, text='MultiListbox').pack() - mlb = MultiListbox(tk, (('Subject', 40), ('Sender', 20), ('Date', 10))) - for i in range(1000): - mlb.insert(END, ('Important Message: %d' % i, 'John Doe', '10/10/%04d' % (1900+i))) - mlb.pack(expand=YES,fill=BOTH) - tk.mainloop() - diff --git a/interfaces/gui/wxbe/wxbe b/interfaces/gui/wxbe/wxbe deleted file mode 100755 index e71ae0c..0000000 --- a/interfaces/gui/wxbe/wxbe +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env python -import wx -from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin -import sys, os.path -from libbe import bugdir, names -from libbe.bug import cmp_status, cmp_severity, cmp_time, cmp_full - -class MyApp(wx.App): - def OnInit(self): - frame = BugListFrame(None, title="Bug List") - frame.Show(True) - self.SetTopWindow(frame) - return True - -class BugListFrame(wx.Frame): - def __init__(self, *args, **kwargs): - wx.Frame.__init__(self, *args, **kwargs) - bugs = BugList(self) - - # Widgets to display/sort/edit will go in this panel - # for now it is just a placeholder - panel = wx.Panel(self) - panel.SetBackgroundColour("RED") - - vbox = wx.BoxSizer(wx.VERTICAL) - vbox.Add(panel, 0, wx.EXPAND) - vbox.Add(bugs, 1, wx.EXPAND) - - self.SetAutoLayout(True) - self.SetSizer(vbox) - self.Layout() - -class BugList(wx.ListCtrl, ListCtrlAutoWidthMixin): - def __init__(self, parent): - wx.ListCtrl.__init__(self, parent, - style=wx.LC_REPORT) - ListCtrlAutoWidthMixin.__init__(self) - - self.bugdir = bugdir.tree_root(".") - self.buglist = list(self.bugdir.list()) - self.buglist.sort() - self.columns = ("id", "status", "severity", "summary") - - dataIndex = 0 - for x in range(len(self.columns)): - self.InsertColumn(x, self.columns[x].capitalize()) - self.SetColumnWidth(x, wx.LIST_AUTOSIZE_USEHEADER) - for bug in [b for b in self.buglist if b.active]: - name = names.unique_name(bug, self.buglist) - id = self.InsertStringItem(self.GetItemCount(), name) - self.SetStringItem(id, 1, bug.status) - self.SetStringItem(id, 2, bug.severity) - self.SetStringItem(id, 3, bug.summary) - self.SetItemData(id, dataIndex) # set keys for each line - dataIndex += 1 - self.EnsureVisible(id) - for x in range(len(self.columns)): - self.SetColumnWidth(x, wx.LIST_AUTOSIZE) - conts_width = self.GetColumnWidth(x) - self.SetColumnWidth(x, wx.LIST_AUTOSIZE_USEHEADER) - if conts_width > self.GetColumnWidth(x): - self.SetColumnWidth(x, conts_width) - - self.Bind(wx.EVT_LIST_COL_CLICK, self.OnColumnClick) - self.bugcmp_fn = cmp_full - # For reasons I don't understant, sorting is broken... - #self.SortItems(self.Sorter) - #self.Refresh() - def Sorter(self, key1, key2): - """Get bug info from the keys and pass to self.bugcmp_fn""" - bug1 = self.buglist[key1-1] - bug2 = self.buglist[key2-1] - # Another way of getting bug information - #bug1uuid = self.GetItem(key1, 0).GetText() - #bug2uuid = self.GetItem(key2, 0).GetText() - #print bug1uuid, bug2uuid - #bug1 = self.bugdir.get_bug(bug1uuid) - #bug2 = self.bugdir.get_bug(bug1uuid) - print self.bugcmp_fn(bug1,bug2) - return self.bugcmp_fn(bug1,bug2) - def OnColumnClick(self, event): - """Resort bug list depending on which column was clicked""" - print "TODO: sort by column %d" % event.Column - # change self.bugcmp_fn and resort, but I can't get it working - -app = MyApp() -app.MainLoop() diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/SOURCES.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/SOURCES.txt deleted file mode 100644 index def18b1..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/SOURCES.txt +++ /dev/null @@ -1,36 +0,0 @@ -README.txt -setup.py -start-beweb.py -Bugs-Everywhere-Web.egg-info/PKG-INFO -Bugs-Everywhere-Web.egg-info/SOURCES.txt -Bugs-Everywhere-Web.egg-info/not-zip-safe -Bugs-Everywhere-Web.egg-info/requires.txt -Bugs-Everywhere-Web.egg-info/sqlobject.txt -Bugs-Everywhere-Web.egg-info/top_level.txt -beweb/__init__.py -beweb/config.py -beweb/controllers.py -beweb/formatting.py -beweb/model.py -beweb/prest.py -beweb/release.py -beweb/config/__init__.py -beweb/templates/__init__.py -beweb/tests/__init__.py -beweb/tests/test_controllers.py -beweb/tests/test_model.py -libbe/__init__.py -libbe/arch.py -libbe/bugdir.py -libbe/bzr.py -libbe/cmdutil.py -libbe/config.py -libbe/diff.py -libbe/mapfile.py -libbe/names.py -libbe/no_rcs.py -libbe/plugin.py -libbe/rcs.py -libbe/restconvert.py -libbe/tests.py -libbe/utility.py diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/not-zip-safe b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/not-zip-safe deleted file mode 100644 index e69de29..0000000 diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/requires.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/requires.txt deleted file mode 100644 index 88b15cb..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -TurboGears >= 0.9a4 \ No newline at end of file diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/sqlobject.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/sqlobject.txt deleted file mode 100644 index 7f7cbad..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/sqlobject.txt +++ /dev/null @@ -1,2 +0,0 @@ -db_module=beweb.model -history_dir=$base/beweb/sqlobject-history diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/top_level.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/top_level.txt deleted file mode 100644 index 6455be9..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/top_level.txt +++ /dev/null @@ -1,2 +0,0 @@ -beweb -libbe diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/PKG-INFO b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/PKG-INFO deleted file mode 100644 index 6cb6ad2..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/PKG-INFO +++ /dev/null @@ -1,15 +0,0 @@ -Metadata-Version: 1.0 -Name: Bugs-Everywhere-Web -Version: 1.0 -Summary: UNKNOWN -Home-page: UNKNOWN -Author: UNKNOWN -Author-email: UNKNOWN -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN -Classifier: Development Status :: 3 - Alpha -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Classifier: Framework :: TurboGears diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/SOURCES.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/SOURCES.txt deleted file mode 100644 index ab62ee4..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/SOURCES.txt +++ /dev/null @@ -1,44 +0,0 @@ -README.txt -setup.py -start-beweb.py -Bugs_Everywhere_Web.egg-info/PKG-INFO -Bugs_Everywhere_Web.egg-info/SOURCES.txt -Bugs_Everywhere_Web.egg-info/dependency_links.txt -Bugs_Everywhere_Web.egg-info/not-zip-safe -Bugs_Everywhere_Web.egg-info/paster_plugins.txt -Bugs_Everywhere_Web.egg-info/requires.txt -Bugs_Everywhere_Web.egg-info/sqlobject.txt -Bugs_Everywhere_Web.egg-info/top_level.txt -Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/SOURCES.txt -Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/not-zip-safe -Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/requires.txt -Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/sqlobject.txt -Bugs_Everywhere_Web.egg-info/Bugs-Everywhere-Web.egg-info/top_level.txt -beweb/__init__.py -beweb/config.py -beweb/controllers.py -beweb/formatting.py -beweb/json.py -beweb/model.py -beweb/prest.py -beweb/release.py -beweb/config/__init__.py -beweb/templates/__init__.py -beweb/tests/__init__.py -beweb/tests/test_controllers.py -beweb/tests/test_model.py -libbe/__init__.py -libbe/arch.py -libbe/bugdir.py -libbe/bzr.py -libbe/cmdutil.py -libbe/config.py -libbe/diff.py -libbe/mapfile.py -libbe/names.py -libbe/no_rcs.py -libbe/plugin.py -libbe/rcs.py -libbe/restconvert.py -libbe/tests.py -libbe/utility.py diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/dependency_links.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/not-zip-safe b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/not-zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/not-zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/paster_plugins.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/paster_plugins.txt deleted file mode 100644 index 14fec70..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/paster_plugins.txt +++ /dev/null @@ -1,2 +0,0 @@ -TurboGears -PasteScript diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/requires.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/requires.txt deleted file mode 100644 index 5fd6f71..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -TurboGears >= 1.0b1 \ No newline at end of file diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/sqlobject.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/sqlobject.txt deleted file mode 100644 index 7f7cbad..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/sqlobject.txt +++ /dev/null @@ -1,2 +0,0 @@ -db_module=beweb.model -history_dir=$base/beweb/sqlobject-history diff --git a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/top_level.txt b/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/top_level.txt deleted file mode 100644 index 74a8358..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/Bugs_Everywhere_Web.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -beweb diff --git a/interfaces/web/Bugs-Everywhere-Web/README b/interfaces/web/Bugs-Everywhere-Web/README deleted file mode 100644 index c152757..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/README +++ /dev/null @@ -1,60 +0,0 @@ -Using BeWeb, the web UI -======================= -BeWeb uses the Turbogears framework: http://www.turbogears.org/ -Please ensure you have Turbogears 0.8a5 or a compatible release installed. -Because it uses BE data, the web UI does not require a database. - -To use BeWeb, first create a configuration file, telling it which projects -to track, and what to call them. An example configuration file -(beweb/beweb/config.py.example) is provided. - -Next, cd to this directory, and run ./start-beweb.py - -BeWeb allows you to create, view and edit bugs, but it is in an early stage of -development, so some features are missing. - -Configuration file ------------------- - -Configure by creating an appropriate beweb/config.py from -beweb/config.py.example. The server will edit the repositories that -it manages, so you should probably have it running on a seperate -branch than your working repository. You can then merge/push -as you require to keep the branches in sync. - -See - http://docs.turbogears.org/1.0/Configuration -For standard turbogears configuration information. - -Actions -------- - -Currently, you need to login for any methods with a -@identity.require() decorator. The only group in the current -implementation is 'editbugs'. Basically, anyone can browse around, -but only registered 'editbugs' members can change things. - -Anonymous actions: - * See project tree - * See buglist - * See comments -Editbugs required actions: - * Create new comments - * Reply to comments - * Update comment info - -Users ------ - -All login attempts will fail unless you have added some valid users. See - http://docs.turbogears.org/1.0/GettingStartedWithIdentity -For a good intro. For the impatient, try something like - Bugs-Everywhere-Web$ tg-admin toolbox - browse to 'CatWalk' -> 'User' -> 'Add User+' -or - Bugs-Everywhere-Web$ tg-admin sholl - >>> u = User(user_name=u'jdoe', email_address=u'jdoe@example.com', - display_name=u'Jane Doe', password=u'xxx') - >>> g = Group(group_name=u'editbugs', display_name=u'Edit Bugs') - >>> g.addUser(u) # BE-Web uses SQLObject -Exit the tg-admin shell with Ctrl-Z on MS Windows, Ctrl-D on other systems. diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/__init__.py b/interfaces/web/Bugs-Everywhere-Web/beweb/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/app.cfg b/interfaces/web/Bugs-Everywhere-Web/beweb/app.cfg deleted file mode 100644 index 024fa8a..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/app.cfg +++ /dev/null @@ -1,120 +0,0 @@ -[global] -# The settings in this file should not vary depending on the deployment -# environment. devcfg.py and prodcfg.py are the locations for -# the different deployment settings. Settings in this file will -# be overridden by settings in those other files. - -# The commented out values below are the defaults - -# VIEW - -# which view (template engine) to use if one is not specified in the -# template name -# tg.defaultview = "kid" - -# kid.outputformat="html" -# kid.encoding="utf-8" - -# The sitetemplate is used for overall styling of a site that -# includes multiple TurboGears applications -# tg.sitetemplate="" - -# Allow every exposed function to be called as json, -# tg.allow_json = False - -# Set to True if you'd like all of your pages to include MochiKit -# tg.mochikit_all = False - -# VISIT TRACKING -# Each visit to your application will be assigned a unique visit ID tracked via -# a cookie sent to the visitor's browser. -# -------------- - -# Enable Visit tracking -visit.on=True - -# Number of minutes a visit may be idle before it expires. -# visit.timeout=20 - -# The name of the cookie to transmit to the visitor's browser. -# visit.cookie.name="tg-visit" - -# Domain name to specify when setting the cookie (must begin with . according to -# RFC 2109). The default (None) should work for most cases and will default to -# the machine to which the request was made. NOTE: localhost is NEVER a valid -# value and will NOT WORK. -# visit.cookie.domain=None - -# Specific path for the cookie -# visit.cookie.path="/" - -# The name of the VisitManager plugin to use for visitor tracking. -# visit.manager="sqlobject" - - -# IDENTITY -# General configuration of the TurboGears Identity management module -# -------- - -# Switch to turn on or off the Identity management module -identity.on=True - -# [REQUIRED] URL to which CherryPy will internally redirect when an access -# control check fails. If Identity management is turned on, a value for this -# option must be specified. -identity.failure_url="/login" - -# The IdentityProvider to use -- defaults to the SqlObjectIdentityProvider which -# pulls User, Group, and Permission data out of your model database. -identity.provider="sqlobject" - -# The names of the fields on the login form containing the visitor's user ID -# and password. In addition, the submit button is specified simply so its -# existence may be stripped out prior to passing the form data to the target -# controller. -identity.form.user_name="user_name" -identity.form.password="password" -identity.form.submit="login" - -# What sources should the identity provider consider when determining the -# identity associated with a request? Comma separated list of identity sources. -# Valid sources: form, visit, http_auth -identity.source="form,http_auth,visit" - - -# SqlObjectIdentityProvider -# Configuration options for the default IdentityProvider -# ------------------------- - -# The classes you wish to use for your Identity model. Leave these commented out -# to use the default classes for SqlObjectIdentityProvider. Or set them to the -# classes in your model. NOTE: These aren't TG_* because the TG prefix is -# reserved for classes created by TurboGears. -# identity.soprovider.model.user="beweb.model.User" -# identity.soprovider.model.group="beweb.model.Group" -# identity.soprovider.model.permission="beweb.model.Permission" - -# The password encryption algorithm used when comparing passwords against what's -# stored in the database. Valid values are 'md5' or 'sha1'. If you do not -# specify an encryption algorithm, passwords are expected to be clear text. -# -# The SqlObjectProvider *will* encrypt passwords supplied as part of your login -# form. If you set the password through the password property, like: -# my_user.password = 'secret' -# the password will be encrypted in the database, provided identity is up and -# running, or you have loaded the configuration specifying what encryption to -# use (in situations where identity may not yet be running, like tests). - -# identity.soprovider.encryption_algorithm=None - -[/static] -static_filter.on = True -static_filter.dir = "." - -[/favicon.ico] -static_filter.on = True -static_filter.file = "images/favicon.ico" - -[/] -decodingFilter.on = True -static_filter.root = '%(package_dir)s/static' diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/config.py.example b/interfaces/web/Bugs-Everywhere-Web/beweb/config.py.example deleted file mode 100644 index 8745c6d..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/config.py.example +++ /dev/null @@ -1,10 +0,0 @@ -# This is an example beweb configuration file. - -# One thing we need is a map of projects. Projects have a beweb ID, a path, -# and a display name. - -# In this example, the 'be' beweb ID is assigned the display name "Bugs -# Everywhere" and the path "/home/abentley/be" - -projects = {"be": ("Bugs Everywhere","/home/abentley/be"), - } diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/config/app.cfg b/interfaces/web/Bugs-Everywhere-Web/beweb/config/app.cfg deleted file mode 100644 index 15555b7..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/config/app.cfg +++ /dev/null @@ -1,92 +0,0 @@ -[global] -# The settings in this file should not vary depending on the deployment -# environment. dev.cfg and prod.cfg are the locations for -# the different deployment settings. Settings in this file will -# be overridden by settings in those other files. - -# The commented out values below are the defaults - -# VIEW - -# which view (template engine) to use if one is not specified in the -# template name -# tg.defaultview = "kid" - -# The following kid settings determine the settings used by the kid serializer. - -# One of (html|xml|json) -# kid.outputformat="html" - -# kid.encoding="utf-8" - -# The sitetemplate is used for overall styling of a site that -# includes multiple TurboGears applications -# tg.sitetemplate="" - -# Allow every exposed function to be called as json, -# tg.allow_json = False - -# List of Widgets to include on every page. -# for exemple ['turbogears.mochikit'] -# tg.include_widgets = [] - -# Set to True if the scheduler should be started -# tg.scheduler = False - -# IDENTITY -# General configuration of the TurboGears Identity management module -# -------- - -# Switch to turn on or off the Identity management module -identity.on=True - -# [REQUIRED] URL to which CherryPy will internally redirect when an access -# control check fails. If Identity management is turned on, a value for this -# option must be specified. -identity.failure_url="/login" - -# identity.provider='sqlobject' - -# The names of the fields on the login form containing the visitor's user ID -# and password. In addition, the submit button is specified simply so its -# existence may be stripped out prior to passing the form data to the target -# controller. -# identity.form.user_name="user_name" -# identity.form.password="password" -# identity.form.submit="login" - -# What sources should the identity provider consider when determining the -# identity associated with a request? Comma separated list of identity sources. -# Valid sources: form, visit, http_auth -# identity.source="form,http_auth,visit" - -# SqlObjectIdentityProvider -# Configuration options for the default IdentityProvider -# ------------------------- - -# The classes you wish to use for your Identity model. Remember to not use reserved -# SQL keywords for class names (at least unless you specify a different table -# name using sqlmeta). -identity.soprovider.model.user="stfa.model.User" -identity.soprovider.model.group="stfa.model.Group" -identity.soprovider.model.permission="stfa.model.Permission" - -# The password encryption algorithm used when comparing passwords against what's -# stored in the database. Valid values are 'md5' or 'sha1'. If you do not -# specify an encryption algorithm, passwords are expected to be clear text. -# The SqlObjectProvider *will* encrypt passwords supplied as part of your login -# form. If you set the password through the password property, like: -# my_user.password = 'secret' -# the password will be encrypted in the database, provided identity is up and -# running, or you have loaded the configuration specifying what encryption to -# use (in situations where identity may not yet be running, like tests). - -# identity.soprovider.encryption_algorithm=None - -[/static] -static_filter.on = True -static_filter.dir = "%(top_level_dir)s/static" - -[/favicon.ico] -static_filter.on = True -static_filter.file = "%(top_level_dir)s/static/images/favicon.ico" diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/config/log.cfg b/interfaces/web/Bugs-Everywhere-Web/beweb/config/log.cfg deleted file mode 100644 index ce776f8..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/config/log.cfg +++ /dev/null @@ -1,29 +0,0 @@ -# LOGGING -# Logging is often deployment specific, but some handlers and -# formatters can be defined here. - -[logging] -[[formatters]] -[[[message_only]]] -format='*(message)s' - -[[[full_content]]] -format='*(asctime)s *(name)s *(levelname)s *(message)s' - -[[handlers]] -[[[debug_out]]] -class='StreamHandler' -level='DEBUG' -args='(sys.stdout,)' -formatter='full_content' - -[[[access_out]]] -class='StreamHandler' -level='INFO' -args='(sys.stdout,)' -formatter='message_only' - -[[[error_out]]] -class='StreamHandler' -level='ERROR' -args='(sys.stdout,)' diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/controllers.py b/interfaces/web/Bugs-Everywhere-Web/beweb/controllers.py deleted file mode 100644 index 50cc754..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/controllers.py +++ /dev/null @@ -1,240 +0,0 @@ -import logging - -import cherrypy -import turbogears -from turbogears import controllers, expose, validate, redirect, identity - -from libbe.bugdir import tree_root, NoRootEntry -from config import projects -from prest import PrestHandler, provide_action - - -from beweb import json - -log = logging.getLogger("beweb.controllers") - -def project_tree(project): - try: - return tree_root(projects[project][1]) - except KeyError: - raise Exception("Unknown project %s" % project) - -def comment_url(project, bug, comment, **kwargs): - return turbogears.url("/project/%s/bug/%s/comment/%s" % - (project, bug, comment), kwargs) - -class Comment(PrestHandler): - @identity.require( identity.has_permission("editbugs")) - @provide_action("action", "New comment") - def new_comment(self, comment_data, comment, *args, **kwargs): - bug_tree = project_tree(comment_data['project']) - bug = bug_tree.get_bug(comment_data['bug']) - comment = new_comment(bug, "") - comment.From = identity.current.user.userId - comment.content_type = "text/restructured" - comment.save() - raise cherrypy.HTTPRedirect(comment_url(comment=comment.uuid, - **comment_data)) - - @identity.require( identity.has_permission("editbugs")) - @provide_action("action", "Reply") - def reply_comment(self, comment_data, comment, *args, **kwargs): - bug_tree = project_tree(comment_data['project']) - bug = bug_tree.get_bug(comment_data['bug']) - reply_comment = new_comment(bug, "") - reply_comment.From = identity.current.user.userId - reply_comment.in_reply_to = comment.uuid - reply_comment.save() - reply_data = dict(comment_data) - del reply_data["comment"] - raise cherrypy.HTTPRedirect(comment_url(comment=reply_comment.uuid, - **reply_data)) - - @identity.require( identity.has_permission("editbugs")) - @provide_action("action", "Update") - def update(self, comment_data, comment, comment_body, *args, **kwargs): - comment.body = comment_body - comment.save() - raise cherrypy.HTTPRedirect(bug_url(comment_data['project'], - comment_data['bug'])) - - def instantiate(self, project, bug, comment): - bug_tree = project_tree(project) - bug = bug_tree.get_bug(bug) - return bug.get_comment(comment) - - def dispatch(self, comment_data, comment, *args, **kwargs): - return self.edit_comment(comment_data['project'], comment) - - @turbogears.expose(html="beweb.templates.edit_comment") - def edit_comment(self, project, comment): - return {"comment": comment, "project_id": project} - -class Bug(PrestHandler): - comment = Comment() - @turbogears.expose(html="beweb.templates.edit_bug") - def index(self, project, bug): - return {"bug": bug, "project_id": project} - - def dispatch(self, bug_data, bug, *args, **kwargs): - if bug is None: - return self.list(bug_data['project'], **kwargs) - else: - return self.index(bug_data['project'], bug) - - @turbogears.expose(html="beweb.templates.bugs") - def list(self, project, sort_by=None, show_closed=False, action=None, - search=None): - if action == "New bug": - self.new_bug() - if show_closed == "False": - show_closed = False - bug_tree = project_tree(project) - bugs = list(bug_tree.list()) - if sort_by is None: - bugs.sort() - return {"project_id" : project, - "project_name" : projects[project][0], - "bugs" : bugs, - "show_closed" : show_closed, - "search" : search, - } - - @identity.require( identity.has_permission("editbugs")) - @provide_action("action", "New bug") - def new_bug(self, bug_data, bug, **kwargs): - bug = project_tree(bug_data['project']).new_bug() - bug.creator = identity.current.user.userId - bug.save() - raise cherrypy.HTTPRedirect(bug_url(bug_data['project'], bug.uuid)) - - @identity.require( identity.has_permission("editbugs")) - @provide_action("action", "Update") - def update(self, bug_data, bug, status, severity, summary, assigned, - action): - bug.status = status - bug.severity = severity - bug.summary = summary - if assigned == "": - assigned = None - bug.assigned = assigned - bug.save() -# bug.vcs.precommit(bug.path) -# bug.vcs.commit(bug.path, "Auto-commit") -# bug.vcs.postcommit(bug.path) - raise cherrypy.HTTPRedirect(bug_list_url(bug_data["project"])) - - def instantiate(self, project, bug): - return project_tree(project).get_bug(bug) - - @provide_action("action", "New comment") - def new_comment(self, bug_data, bug, *args, **kwargs): - try: - self.update(bug_data, bug, *args, **kwargs) - except cherrypy.HTTPRedirect: - pass - return self.comment.new_comment(bug_data, comment=None, *args, - **kwargs) - - -def project_url(project_id=None): - project_url = "/project/" - if project_id is not None: - project_url += "%s/" % project_id - return turbogears.url(project_url) - -def bug_url(project_id, bug_uuid=None): - bug_url = "/project/%s/bug/" % project_id - if bug_uuid is not None: - bug_url += "%s/" % bug_uuid - return turbogears.url(bug_url) - -def bug_list_url(project_id, show_closed=False, search=None): - bug_url = "/project/%s/bug/?show_closed=%s" % (project_id, - str(show_closed)) - if search is not None: - bug_url = "%s&search=%s" % (bug_url, search) - return turbogears.url(str(bug_url)) - - -class Project(PrestHandler): - bug = Bug() - @turbogears.expose(html="beweb.templates.projects") - def dispatch(self, project_data, project, *args, **kwargs): - if project is not None: - raise cherrypy.HTTPRedirect(bug_url(project)) - else: - return {"projects": projects} - - def instantiate(self, project): - return project - - -class Root(controllers.Root): - prest = PrestHandler() - prest.project = Project() - @turbogears.expose() - def index(self): - raise cherrypy.HTTPRedirect(project_url()) - - @expose(template="beweb.templates.login") - def login(self, forward_url=None, previous_url=None, *args, **kw): - - if not identity.current.anonymous and identity.was_login_attempted(): - raise redirect(forward_url) - - forward_url=None - previous_url= cherrypy.request.path - - if identity.was_login_attempted(): - msg=_("The credentials you supplied were not correct or "\ - "did not grant access to this resource.") - elif identity.get_identity_errors(): - msg=_("You must provide your credentials before accessing "\ - "this resource.") - else: - msg=_("Please log in.") - forward_url= cherrypy.request.headers.get("Referer", "/") - cherrypy.response.status=403 - return dict(message=msg, previous_url=previous_url, logging_in=True, - original_parameters=cherrypy.request.params, - forward_url=forward_url) - - @expose() - def logout(self): - identity.current.logout() - raise redirect("/") - - @turbogears.expose('beweb.templates.about') - def about(self, *paths, **kwargs): - return {} - - @turbogears.expose() - def default(self, *args, **kwargs): - return self.prest.default(*args, **kwargs) - - def _cp_on_error(self): - import traceback, StringIO - bodyFile = StringIO.StringIO() - traceback.print_exc(file = bodyFile) - trace_text = bodyFile.getvalue() - try: - raise - except cherrypy.NotFound: - self.handle_error('Not Found', str(e), trace_text, '404 Not Found') - - except NoRootEntry, e: - self.handle_error('Project Misconfiguration', str(e), trace_text) - - except Exception, e: - self.handle_error('Internal server error', str(e), trace_text) - - def handle_error(self, heading, body, traceback=None, - status='500 Internal Server Error'): - cherrypy.response.headerMap['Status'] = status - cherrypy.response.body = [self.errorpage(heading, body, traceback)] - - - @turbogears.expose(html='beweb.templates.error') - def errorpage(self, heading, body, traceback): - return {'heading': heading, 'body': body, 'traceback': traceback} diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/formatting.py b/interfaces/web/Bugs-Everywhere-Web/beweb/formatting.py deleted file mode 100644 index 1278414..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/formatting.py +++ /dev/null @@ -1,76 +0,0 @@ -from StringIO import StringIO - -try : - from xml.etree.ElementTree import XML # Python 2.5 (and greater?) -except ImportError : - from elementtree.ElementTree import XML -from libbe.restconvert import rest_xml - -def to_unix(text): - skip_newline = False - for ch in text: - if ch not in ('\r', '\n'): - yield ch - else: - if ch == '\n': - if skip_newline: - continue - else: - skip_newline = True - yield '\n' - - -def soft_text(text): - first_space = False - translations = {'\n': '
\n', '&': '&', '\x3c': '<', - '\x3e': '>'} - for ch in to_unix(text): - if ch == ' ' and first_space is True: - yield ' ' - first_space = ch in (' ') - try: - yield translations[ch] - except KeyError: - yield ch - - -def soft_pre(text): - return XML('
'+ - ''.join(soft_text(text)).encode('utf-8')+'
') - - -def get_rest_body(rest): - xml, warnings = rest_xml(StringIO(rest)) - return xml.find('{http://www.w3.org/1999/xhtml}body'), warnings - - -def comment_body_xhtml(comment): - if comment.content_type == "text/restructured": - return get_rest_body(comment.body)[0] - else: - return soft_pre(comment.body) - - -def select_among(name, options, default, display_names=None): - output = ['") - return XML("".join(output)) diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/json.py b/interfaces/web/Bugs-Everywhere-Web/beweb/json.py deleted file mode 100644 index 6e100c3..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/json.py +++ /dev/null @@ -1,13 +0,0 @@ -# This module provides helper functions for the JSON part of your -# view, if you are providing a JSON-based API for your app. - -# Here's what most rules would look like: -# @jsonify.when("isinstance(obj, YourClass)") -# def jsonify_yourclass(obj): -# return [obj.val1, obj.val2] -# -# The goal is to break your objects down into simple values: -# lists, dicts, numbers and strings - -from turbojson.jsonify import jsonify - diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/model.py b/interfaces/web/Bugs-Everywhere-Web/beweb/model.py deleted file mode 100644 index aa4b6b6..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/model.py +++ /dev/null @@ -1,107 +0,0 @@ -from datetime import datetime - -from sqlobject import * -from turbogears.database import PackageHub -from turbogears import identity - -hub = PackageHub("beweb") -__connection__ = hub - -class Visit(SQLObject): - class sqlmeta: - table = "visit" - - visit_key = StringCol(length=40, alternateID=True, - alternateMethodName="by_visit_key") - created = DateTimeCol(default=datetime.now) - expiry = DateTimeCol() - - def lookup_visit(cls, visit_key): - try: - return cls.by_visit_key(visit_key) - except SQLObjectNotFound: - return None - lookup_visit = classmethod(lookup_visit) - -class VisitIdentity(SQLObject): - visit_key = StringCol(length=40, alternateID=True, - alternateMethodName="by_visit_key") - user_id = IntCol() - - -class Group(SQLObject): - """ - An ultra-simple group definition. - """ - - # names like "Group", "Order" and "User" are reserved words in SQL - # so we set the name to something safe for SQL - class sqlmeta: - table = "tg_group" - - group_name = UnicodeCol(length=16, alternateID=True, - alternateMethodName="by_group_name") - display_name = UnicodeCol(length=255) - created = DateTimeCol(default=datetime.now) - - # collection of all users belonging to this group - users = RelatedJoin("User", intermediateTable="user_group", - joinColumn="group_id", otherColumn="user_id") - - # collection of all permissions for this group - permissions = RelatedJoin("Permission", joinColumn="group_id", - intermediateTable="group_permission", - otherColumn="permission_id") - - -class User(SQLObject): - """ - Reasonably basic User definition. Probably would want additional attributes. - """ - # names like "Group", "Order" and "User" are reserved words in SQL - # so we set the name to something safe for SQL - class sqlmeta: - table = "tg_user" - - child_name = UnicodeCol(length=255) - user_name = UnicodeCol(length=16, alternateID=True, - alternateMethodName="by_user_name") - email_address = UnicodeCol(length=255, alternateID=True, - alternateMethodName="by_email_address") - display_name = UnicodeCol(length=255) - password = UnicodeCol(length=40) - created = DateTimeCol(default=datetime.now) - - # groups this user belongs to - groups = RelatedJoin("Group", intermediateTable="user_group", - joinColumn="user_id", otherColumn="group_id") - - def _get_permissions(self): - perms = set() - for g in self.groups: - perms = perms | set(g.permissions) - return perms - - def _set_password(self, cleartext_password): - "Runs cleartext_password through the hash algorithm before saving." - hash = identity.encrypt_password(cleartext_password) - self._SO_set_password(hash) - - def set_password_raw(self, password): - "Saves the password as-is to the database." - self._SO_set_password(password) - - - -class Permission(SQLObject): - permission_name = UnicodeCol(length=16, alternateID=True, - alternateMethodName="by_permission_name") - description = UnicodeCol(length=255) - - groups = RelatedJoin("Group", - intermediateTable="group_permission", - joinColumn="permission_id", - otherColumn="group_id") - -def people_map(): - return dict((u.user_name, u.display_name) for u in User.select()) diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/prest.py b/interfaces/web/Bugs-Everywhere-Web/beweb/prest.py deleted file mode 100644 index 9a6505d..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/prest.py +++ /dev/null @@ -1,168 +0,0 @@ -from unittest import TestCase -import unittest -from cherrypy import NotFound -"""A pseudo-REST dispatching method in which only the noun comes from the path. -The action performed will depend on kwargs. -""" - -class AmbiguousAction(Exception): - def __init__(self, actions): - Exception.__init__(self, "Supplied action is ambiguous.") - self.actions = actions - - -def provide_action(name, value): - def provider(func): - func._action_desc = (name, value) - return func - return provider - -class PrestHandler(object): - def __init__(self): - object.__init__(self) - self.actions = {} - for member in (getattr(self, m) for m in dir(self)): - if not hasattr(member, '_action_desc'): - continue - name, value = member._action_desc - if name not in self.actions: - self.actions[name] = {} - self.actions[name][value] = member - - @classmethod - def add_action(klass, name, value, function): - if name not in klass.actions: - klass.actions[name] = {} - klass.actions[name][value] = function - - - def decode(self, path, data=None): - """Convert the path into a handler, a resource, data, and extra_path""" - if data is None: - data = {} - if len(path) < 2 or not (hasattr(self, path[1])): - if len(path) == 0: - resource = None - else: - try: - resource = self.instantiate(**data) - except NotImplementedError, e: - if e.args[0] is not PrestHandler.instantiate: - raise NotFound() - - return self, resource, data, path[1:] - if len(path) > 2: - data[path[1]] = path[2] - return getattr(self, path[1]).decode(path[2:], data) - - def instantiate(self, **date): - raise NotImplementedError(PrestHandler.instantiate) - - def default(self, *args, **kwargs): - child, resource, data, extra = self.decode([None,] + list(args)) - action = child.get_action(**kwargs) - new_args = ([data, resource]+extra) - if action is not None: - return action(*new_args, **kwargs) - else: - return child.dispatch(*new_args, **kwargs) - - def get_action(self, **kwargs): - """Return the action requested by kwargs, if any. - - Raises AmbiguousAction if more than one action matches. - """ - actions = [] - for key in kwargs: - if key in self.actions: - if kwargs[key] in self.actions[key]: - actions.append(self.actions[key][kwargs[key]]) - if len(actions) == 0: - return None - elif len(actions) == 1: - return actions[0] - else: - raise AmbiguousAction(actions) - - -class PrestTester(TestCase): - def test_decode(self): - class ProjectHandler(PrestHandler): - actions = {} - def dispatch(self, project_data, project, *args, **kwargs): - self.project_id = project_data['project'] - self.project_data = project_data - self.resource = project - self.args = args - self.kwargs = kwargs - - def instantiate(self, project): - return [project] - - @provide_action('action', 'Save') - def save(self, project_data, project, *args, **kwargs): - self.action = "save" - - @provide_action('behavior', 'Update') - def update(self, project_data, project, *args, **kwargs): - self.action = "update" - - foo = PrestHandler() - foo.project = ProjectHandler() - handler, resource, data, extra = foo.decode([None, 'project', '83', - 'bloop', 'yeah']) - assert handler is foo.project - self.assertEqual({'project': '83'}, data) - self.assertEqual(['bloop', 'yeah'], extra) - foo.default(*['project', '27', 'extra'], **{'a':'b', 'b':'97'}) - self.assertEqual(foo.project.args, ('extra',)) - self.assertEqual(foo.project.kwargs, {'a':'b', 'b':'97'}) - self.assertEqual(foo.project.project_data, {'project': '27'}) - self.assertEqual(foo.project.resource, ['27']) - foo.default(*['project', '27', 'extra'], **{'action':'Save', 'b':'97'}) - self.assertEqual(foo.project.action, 'save') - foo.default(*['project', '27', 'extra'], - **{'behavior':'Update', 'b':'97'}) - self.assertEqual(foo.project.action, 'update') - self.assertRaises(AmbiguousAction, foo.default, - *['project', '27', 'extra'], - **{'behavior':'Update', 'action':'Save', 'b':'97'}) - - class BugHandler(PrestHandler): - actions = {} - def dispatch(self, bug_data, bug, *args, **kwargs): - self.project_id = project_data['project'] - self.project_data = project_data - self.resource = project - self.args = args - self.kwargs = kwargs - - def instantiate(self, project, bug): - return [project, bug] - - @provide_action('action', 'Save') - def save(self, project_data, project, *args, **kwargs): - self.action = "save" - - @provide_action('behavior', 'Update') - def update(self, project_data, project, *args, **kwargs): - self.action = "update" - - foo.project.bug = BugHandler() - handler, resource, data, extra = foo.decode([None, 'project', '83', - 'bug', '92']) - assert handler is foo.project.bug - self.assertEqual(resource[0], '83') - self.assertEqual(resource[1], '92') - self.assertEqual([], extra) - self.assertEqual(data['project'], '83') - self.assertEqual(data['bug'], '92') - -def test(): - patchesTestSuite = unittest.makeSuite(PrestTester,'test') - runner = unittest.TextTestRunner(verbosity=0) - return runner.run(patchesTestSuite) - - -if __name__ == "__main__": - test() diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/release.py b/interfaces/web/Bugs-Everywhere-Web/beweb/release.py deleted file mode 100644 index 9d64bf7..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/release.py +++ /dev/null @@ -1,14 +0,0 @@ -# Release information about Bugs-Everywhere-Web - -version = "1.0" - -# description = "Your plan to rule the world" -# long_description = "More description about your plan" -# author = "Your Name Here" -# email = "YourEmail@YourDomain" -# copyright = "Vintage 2006 - a good year indeed" - -# if it's open source, you might want to specify these -# url = "http://yourcool.site/" -# download_url = "http://yourcool.site/download" -# license = "MIT" diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/css/style.css b/interfaces/web/Bugs-Everywhere-Web/beweb/static/css/style.css deleted file mode 100644 index 6fe197f..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/static/css/style.css +++ /dev/null @@ -1,116 +0,0 @@ -table -{ - background-color: black; -} -td -{ - background-color: white; -} -h1 -{ - font-family: "Verdana"; - font-weight: bold; - font-size: 120%; - margin-bottom:0; - color: #990; -} - -tr.closed td -{ - background-color: #ccc; -} -tr.closedeven td -{ - background-color: #ccc; -} -tr.closedodd td -{ - background-color: #dda; -} - -a:visited, a:link -{ - color: #990; - text-decoration: None; -} -td a:visited, td a:link -{ - display: block; -} -a:visited:hover, a:link:hover -{ - text-decoration: underline; -} -td a:visited:hover, td a:link:hover -{ - color:black; - background-color:#dda; - text-decoration: None; - display: block; -} - -body -{ - font-family: "Verdana"; - font-size:11pt; - background-color: white; -} -.comment -{ -} -.comment table -{ - background-color: transparent; -} -.comment td -{ - background-color: transparent; -} -.comment pre -{ - font-family: "Verdana"; -} -#header -{ - color: black; - font-weight: bold; - background-image: url(/static/images/half-spiral.png); - background-position: right center; - background-repeat: no-repeat; - background-color: #ff0; -} -#header ul.navoption -{ - display: block; - float: right; - margin: 0; - padding-right: 30px; -} -#header li -{ - display: inline; - margin:0; - padding:0; -} -table.insetbox -{ - margin-top: 0.5em; - margin-bottom: 0.5em; -} -.insetbox tr, .insetbox td -{ - margin: 0; - padding: 0; -} -pre.traceback -{ - font-family: Verdana, Ariel, Helvetica, sanserif; -} -tr.even td -{ - background-color: #eee; -} -tr.odd td -{ - background-color: #ffe; -} diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-b.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-b.png deleted file mode 100644 index 790e438..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-b.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-bl.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-bl.png deleted file mode 100644 index 5b43259..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-bl.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-br.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-br.png deleted file mode 100644 index 6cfd62c..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-br.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-l.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-l.png deleted file mode 100644 index a6ce3ce..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-l.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-r.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-r.png deleted file mode 100644 index 1ffd6f8..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-r.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-t.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-t.png deleted file mode 100644 index 0129b0c..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-t.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tl.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tl.png deleted file mode 100644 index d616b77..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tl.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tr.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tr.png deleted file mode 100644 index 18e542e..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds-tr.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-b.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-b.png deleted file mode 100644 index 05a190e..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-b.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-r.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-r.png deleted file mode 100644 index 0c3ea4c..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ds2-r.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.ico b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.ico deleted file mode 100644 index 339d09c..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.ico and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.png deleted file mode 100644 index 6dc53ee..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/favicon.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/half-spiral.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/half-spiral.png deleted file mode 100644 index cb4b56c..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/half-spiral.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/header_inner.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/header_inner.png deleted file mode 100644 index 2b2d87d..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/header_inner.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/info.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/info.png deleted file mode 100644 index 329c523..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/info.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-b.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-b.png deleted file mode 100644 index 25d3cfa..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-b.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-bl.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-bl.png deleted file mode 100644 index f496223..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-bl.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-br.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-br.png deleted file mode 100644 index 74cbd91..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-br.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-l.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-l.png deleted file mode 100644 index dd567fa..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-l.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-r.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-r.png deleted file mode 100644 index 9ac4486..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-r.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-t.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-t.png deleted file mode 100644 index fbb06c8..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-t.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tl.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tl.png deleted file mode 100644 index 9336290..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tl.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tr.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tr.png deleted file mode 100644 index de74808..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/is-tr.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ok.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ok.png deleted file mode 100644 index fee6751..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/ok.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/shadows.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/shadows.png deleted file mode 100644 index 9ddc676..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/shadows.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/spiral.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/spiral.png deleted file mode 100644 index b4bcb1e..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/spiral.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/tg_under_the_hood.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/tg_under_the_hood.png deleted file mode 100644 index bc9c79c..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/tg_under_the_hood.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/under_the_hood_blue.png b/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/under_the_hood_blue.png deleted file mode 100644 index 90e84b7..0000000 Binary files a/interfaces/web/Bugs-Everywhere-Web/beweb/static/images/under_the_hood_blue.png and /dev/null differ diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/__init__.py b/interfaces/web/Bugs-Everywhere-Web/beweb/templates/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/about.kid b/interfaces/web/Bugs-Everywhere-Web/beweb/templates/about.kid deleted file mode 100644 index fa3548a..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/about.kid +++ /dev/null @@ -1,21 +0,0 @@ - - - - - About Bugs Everywhere - - - -

About Bugs Everywhere

-

Bugs Everywhere is a "distributed bugtracker", designed to complement distributed revision control systems. -

-

-Bugs Everywhere was conceived and written by developers at Panoramic Feedback, primarily Aaron Bentley. Panoramic Feedback is no longer developing BE, and the current maintainer is Chris Ball. -

-

- Bugs Everywhere web site -

-Project List - - diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/bugs.kid b/interfaces/web/Bugs-Everywhere-Web/beweb/templates/bugs.kid deleted file mode 100644 index 198aa94..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/bugs.kid +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - Bugs for $project_name - - - -

Bug list for ${project_name}

- - -
- -
IDStatusSeverityAssigned ToCommentsSummary
${unique_name(bug, bugs[:])}${bug.status}${bug.severity}${people.get(bug.assigned, bug.assigned)}${len(list(bug.iter_comment_ids()))}${bug.summary}
-Project list -Toggle closed -
- -
-
- - - -
- - diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid b/interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid deleted file mode 100644 index 276f610..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_bug.kid +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - Edit bug - - - -

Edit bug

-
- - - - -
StatusSeverityAssigned ToSummary
${select_among("status", status_values, bug.status)}${select_among("severity", severity_values, bug.severity)}${select_among("assigned", people.keys()+[None], bug.assigned, people)}
-
- - - - -
From${comment.From}
Date${time_to_str(comment.time)}
-
- Edit - Reply -
-
-
- ${show_comment(child, grandchildren)} -
-
-
-
- ${show_comment(comment, children)} -
-

-

-
-Bug List - - diff --git a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_comment.kid b/interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_comment.kid deleted file mode 100644 index 2b522d4..0000000 --- a/interfaces/web/Bugs-Everywhere-Web/beweb/templates/edit_comment.kid +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - Edit comment - - - -

Edit comment

-
- - - -
From${comment.From}
Date${time_to_str(comment.time)}
-