aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
Commit message (Collapse)AuthorAgeFilesLines
* Rearrange libbe.ui.command_line.CmdOptionParser._add_option() for Python 2.5W. Trevor King2009-12-131-14/+15
| | | | | | | | | | | | | | Python 2.6 doesn't mind, but 2.5 doesn't like kwargs after a * expansion: $ ./be list Traceback (most recent call last): File "./be", line 5, in <module> import libbe.ui.command_line File "/home/wking/src/fun/be/be.restructure/libbe/ui/command_line.py", line 63 *opt_strings, action='callback', dest=dest, ^ SyntaxError: invalid syntax
* Converted libbe.storage.vcs.base to new Storage format.W. Trevor King2009-12-1313-678/+704
|
* Moved be to libbe.ui.command_line and transitioned to Command format.W. Trevor King2009-12-1212-167/+370
|
* Use get_input/output_encoding() in libbe.command.base.CommandW. Trevor King2009-12-121-2/+3
|
* Added libbe.ui.util.user for managing user ids.W. Trevor King2009-12-125-57/+99
|
* Moved command completion from libbe.ui.util to libbe.command.utilW. Trevor King2009-12-124-80/+79
|
* Added libbe.command.base (with Command class) and moved list command to new ↵W. Trevor King2009-12-1210-316/+568
| | | | format.
* Moved bugdir, bug, and comment over to new id implementation.W. Trevor King2009-12-104-296/+171
|
* Rethought libbe.util.id moduleW. Trevor King2009-12-091-40/+254
|
* Reworked test.py to handle deeper directory structureW. Trevor King2009-12-084-4/+4
|
* Moved properties.py and settings_object.py to libbe/storage/util/W. Trevor King2009-12-086-8/+21
|
* Transitioned bugdir.py to new storage format.W. Trevor King2009-12-088-625/+618
|
* Transitioned bug.py to new storage format.W. Trevor King2009-12-082-68/+57
|
* Transitioned comment.py to new storage format.W. Trevor King2009-12-083-73/+53
|
* Use .storage.is_read/writeable() rather than .sync_with_disk() in ↵W. Trevor King2009-12-081-8/+8
| | | | settings_object.py
* Use mapfile to only create & parse mapfile strings, not filesW. Trevor King2009-12-081-10/+0
|
* Extended libbe.storage.base for separate read/write control.W. Trevor King2009-12-081-36/+94
| | | | | | | | | | | | | | Rather than just having .read_only to set write permissions and assuming that read was always legal. We also added user and backend control of both readable and writeable: do you want to read/write? and can you read/write? Specialized NotSupported into NotWriteable and NotReadable. Added automatic unicode encoding on .set(), and decode option on .get().
* Extend libbe.util.id to handle id (path) creation.W. Trevor King2009-12-081-3/+46
|
* Added libbe.storage.base and test suite.W. Trevor King2009-12-083-0/+709
|
* Initial directory restructuring to clarify dependenciesW. Trevor King2009-12-0744-0/+4302
|
* Use 'auto' for run_pager default rather than NoneW. Trevor King2009-12-071-1/+1
|
* Update libbe.pager copyrightW. Trevor King2009-12-071-1/+15
|
* Added libbe.pagerW. Trevor King2009-12-071-0/+51
|
* be --dir DIR COMMAND now roots the bugdir in DIR without changing directories.W. Trevor King2009-12-061-2/+5
| | | | | | | | | | | | | | | | | Previously, for the directory structure A |-- X `-- Y You could do something like A$ be --dir X diff --dir ../Y Now it's A$ be --dir X diff --dir Y The --root option to `be init` has been removed as redundant. Replace calls like be init --root DIR with be --dir DIR init
* Moved becommands.depend._allowed_values() to cmdutil.select_values()W. Trevor King2009-12-051-0/+53
| | | | | | | | | | I like this code, and I want to use it for other places, e.g. `be list`. Also renamed depend options --limit-severity and --limit-status to --severity and --status
* Remove some more Bug.target references from libbe/bug.pyW. Trevor King2009-12-051-6/+2
|
* Added "Bugs Everywhere Directory v1.3" which transitions to bug-type targets.W. Trevor King2009-12-051-2/+58
| | | | | | | | | See bug 22b6f620-d2f7-42a5-a02e-145733a4e366 for the motivation. This upgrade will replace all "target" settings. The new BugDir target setting will be the uuid of the appropriate target. The Bug target setting is removed, replaced by an extra_strings BLOCKS tag blocking the appropriate target. New target bugs are created on the fly as required.
* This addresses the following portion of 22b:7:W. Trevor King2009-12-051-4/+1
| | | | | | | | | | | | | * Targeting normal bugs With "be depend". I think we should remove the "target" field from bugs, and move target dependencies over into the "be depend" framework. * be target list Would become "be list --severity target". A target "severity" would keep target bugs distinct from other bug/issue types.
* Fix libbe.diff.Diff._changed_bugs() to handle subscriptions by bug shortname.W. Trevor King2009-12-051-3/+8
|
* Adjust libbe.diff.DiffTree to fix failed doctest.W. Trevor King2009-12-051-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | ====================================================================== FAIL: Doctest: libbe.diff.DiffTree ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 2128, in runTest raise self.failureException(self.format_failure(new.getvalue())) AssertionError: Failed doctest test for libbe.diff.DiffTree File "/home/wking/src/fun/be/be.diff-subscribe/libbe/diff.py", line 136, in DiffTree ---------------------------------------------------------------------- File "/home/wking/src/fun/be/be.diff-subscribe/libbe/diff.py", line 172, in libbe.diff.DiffTree Failed example: print bugdir.report_string() Exception raised: Traceback (most recent call last): File "/usr/lib/python2.5/doctest.py", line 1228, in __run compileflags, 1) in test.globs File "<doctest libbe.diff.DiffTree[18]>", line 1, in <module> print bugdir.report_string() File "/home/wking/src/fun/be/be.diff-subscribe/libbe/diff.py", line 213, in report_string return "\n".join(self.report()) TypeError
* Use new libbe.diff.Diff.report_tree(subscriptions) in be-handle-mail.W. Trevor King2009-12-051-4/+9
| | | | | | | | | | | | | 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.
* Added libbe.diff.Diff.full_report() for speed with several subscription lists.W. Trevor King2009-12-051-2/+67
| | | | | | | | | | Now report_tree() returns an appropriately .masked version of the cached full report, which is much faster than recomputing a new diff tree from scratch. Also fixed bug in libbe.diff.DiffTree.report() where .requires_children=True was exposing nodes with children, when it should (and now does) only expose nodes with _unmasked_ children.
* Created diff.subscriptions_from_string()W. Trevor King2009-12-051-0/+23
|
* Added BUGDIR_TYPE_MOD and BUGDIR_TYPE_REM to libbe.diff.W. Trevor King2009-12-051-8/+19
| | | | | | | | | Now you can subscribe to only hear about modified bugs or only about removed bugs. Kindof odd for a general subscription, but possibly useful as an argument to the upcoming `be diff --subscribe`, e.g. be diff --subscribe DIR:mod which would replace the old be diff --modified
* Adjusted diff.Subscription.__init__() to guess type_root if required.W. Trevor King2009-12-051-2/+7
|
* Added subscriptions option to diff.Diff.report_tree().W. Trevor King2009-12-051-20/+77
| | | | | | Also added diff.BUGDIR_ID to avoid lots of magic 'DIR' definitions, and added diff.Subscription class to make the old (id, type) tuples a bit more elegant.
* Moved subscription types from becommands/subscribe.py to libbe/diff.py.W. Trevor King2009-12-051-0/+46
|
* Add __eq__ and __ne__ methods to Tree.W. Trevor King2009-12-051-0/+6
| | | | | | | | | | | | | | | | | This fixes a bug introduced by revision-id: wking@drexel.edu-20091205034412-8apqxq8zqim48tf7 committer: W. Trevor King <wking@drexel.edu> timestamp: Fri 2009-12-04 22:44:12 -0500 message: Use __cmp__ instead of __eq__ for Tree comparison. When I made that commit, I'd forgotten that Tree inherits an __eq__ method from list, so it won't fall back to the __cmp__ method to determine equality. The new __eq__ and __ne__ methods use __cmp__ internally, so further subclasses (e.g. Comment) only need to override __cmp__. Of course, list also defines __ge__, __gt__, __le__, __lt__, ... which I don't bother with, so stay away from TreeA > TreeB and the like.
* Fixed removed comment listing in libbe/diff.py.W. Trevor King2009-12-041-2/+2
| | | | | Previous implementation guaranteed to raise KeyErrors, because new bug doesn't contain the uuid.
* Use __cmp__ instead of __eq__ for Tree comparison.W. Trevor King2009-12-041-2/+2
| | | | | | | | | | | | | | This ensures that __ne__ will also work, and makes it easier to subclass Tree. For example, in the previous implementation you could have >>> commA == commB False >>> cmp(commA, commB) 0 if the comments had different ids, but equivalent content. At the user-interface level, this removes some false "modified comments" from `be diff`.
* Don't necessarily initialize a new VCS in BugDir.load_settings().W. Trevor King2009-12-031-2/+3
| | | | | | | | | | We may already have the right type, in which case, don't mess with it. This speeds up bugdir loading a bit more: $ time be list > /dev/null real 0m1.245s user 0m1.116s sys 0m0.124s
* Don't get VCS version in VCS.__init__().W. Trevor King2009-12-031-2/+6
| | | | | | | | | | | | | | | | | | Often, this just causes a slow subprocess.Popen() call to get information we woln't even look at. Old benchmark: $ time be list > /dev/null real 0m2.369s user 0m1.980s sys 0m0.388s New benchmark: $ time be list > /dev/null real 0m1.472s user 0m1.304s sys 0m0.164s
* Added libbe.TESTING (defaults to False).W. Trevor King2009-12-0324-921/+1031
| | | | | | | | | | | | | | | | | | | | This flag allows us to skip unittest and testsuite declaration if we woln't need them. It speeds up simple be calls a suprising amount. With Testing=True (the old behavior): wking@thor:be.wtk$ time ./be > /dev/null real 0m0.393s user 0m0.340s sys 0m0.048s With TESTING=False (the new behavior): be.wtk$ time ./be > /dev/null real 0m0.216s user 0m0.152s sys 0m0.064s This adjustment was inspired by Jakub Wilk's Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559295
* Added copyright blurbs to __init__.py files.W. Trevor King2009-12-031-0/+16
|
* Remove _test() functions from plugin.py and cmdutil.py.W. Trevor King2009-12-032-15/+0
| | | | | Testing should be handled through test.py, not by calling per-module _test() functions.
* Generalized doctest string in subproc.pyW. Trevor King2009-11-301-1/+1
|
* Avoid redundant Comment.alt_idsW. Trevor King2009-11-301-1/+3
|
* Changed Bug and Comment.merge() kwargs.W. Trevor King2009-11-302-25/+69
| | | | | | | | The old allow_changes and allow_new_comments didn't have separate handling for extra_strings, like import_xml will need. It also didn't have a way to specify what to do if an illegal change occurs. Sometimes you'll want to raise an exception, but sometimes you'll want to ?silently? ignore the change.
* Minor BugDir docstring typo correction.W. Trevor King2009-11-301-1/+1
|
* Moved comment.list_to_root() to Bug.add_comments() with some cleanups.W. Trevor King2009-11-292-65/+45
| | | | | | | | | | | | | | | | | | | This makes Bug.add_comment simpler. Also makes Bug.from_xml() more robust, since it no longer depends on the order in which the XML file lists the comments. The previous Bug.from_xml() would have choked on <be-xml> <bug> <comment> <uuid>B</uuid> <in-reply-to>A</in-reply-to> </comment> <comment> <uuid>A</uuid> </comment> </bug> </be-xml> because when B was being added, the referenced A hadn't yet been noticed.