aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command
Commit message (Collapse)AuthorAgeFilesLines
* Improved POST and error handling in `be serve`W. Trevor King2010-01-011-22/+43
| | | | | | | | | | | | | | POST handling: Drop the cgi.FieldStorage() in favor of the old urlparse.parse_qs(). We need a dictionary, which FieldStorage is not. However, I added .read_post_data() since my old self.rfile.read() was hanging. The read_post_data() implementation comes from the FieldStorage.__init__(). Error handling: wrap .handle_*() blocks in try/except to handle Storage errors
* Improved POST parsing, fixed Serve._long_help(), added --read-only.W. Trevor King2010-01-011-49/+40
| | | | | POST parsing via cgi.FieldStorage from Doug Hellmann's http://blog.doughellmann.com/2007/12/pymotw-basehttpserver.html
* Added libbe.command.serve and libbe.storage.http for HTTP backend.W. Trevor King2010-01-011-0/+346
| | | | | | | | | | Now the following works: some-BE-dir$ ./be serve $ ./be --repo http://localhost:8000 list I haven't come up with a clean idea for testing this yet, so other commands may be broken, but once we get the testing working, it shouldn't be too hard to get everything working over HTTP :).
* Updated copyright informationW. Trevor King2010-01-0124-27/+55
|
* Merged be.restructure, major internal reorganization.W. Trevor King2009-12-313-0/+363
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a bunch of classes to make the commands, user interfaces, and storage backends more abstract and distinct. This should make it much easier to extend and maintain BE. Features: * Directory restructured: becommands/ -> libbe/commands submods sorted by functionality. * Lots of new classes: Option, Argument, Command InputOutput, StorageCallbacks, UserInterface Storage * Consolidated ID handling in libbe.util.id * Transitioned VCS backends for Python-based VCSs from subprocess calss to internal python calls. Plus the user-visible changes: * New bugdir/bug/comment ID format replaces old bug:comment format. * Deprecated support for `be diff` on Arch and Darcs <= 2.3.1. A new backend abstraction (Storage) makes the former implementation ungainly. * Improved command completion. * Removed commands close, open, email_bugs, * Flipped some arguments `be assign BUG-ID [ASSIGNEE]` -> `be status ASSIGNED BUG-ID ...` `be severity BUG-ID SEVERITY` -> `be severity SEVERITY BUG-ID ...` `be status BUG-ID STATUS` -> `be status STATUS BUG-ID ...` In the merge: * Added 'commit' to list of pagerless commands. * Updated doc/README.dev See #bea86499-824e-4e77-b085-2d581fa9ccab/1100c966-9671-4bc6-8b68-6d408a910da1# for a discussion of why the changes were made and some of the difficulties en-route.
* Use fragment in base command completion + command io fixups.W. Trevor King2009-12-311-5/+11
|
* Added UserInterface and other improved abstractions for command handlingW. Trevor King2009-12-3123-214/+390
|
* Don't chdir() in libbe/command/html.py doctests.W. Trevor King2009-12-291-10/+7
|
* Remove libbe.ui.util.cmdutilW. Trevor King2009-12-291-11/+4
| | | | All of its functionality has moved off into more focused modules.
* Restored post-colon spaces in doctestsW. Trevor King2009-12-292-6/+6
|
* Fixed up the completion helpers in libbe.command.utilW. Trevor King2009-12-292-5/+80
| | | | | | | | | | This entailed a fairly thorough cleanup of libbe.util.id. Remaining unimplemented completion helpers: * complete_assigned() * complete_extra_strings() Since these would require scanning all (active?) bugs to compile lists, and I was feeling lazy...
* Allow external use of Command.usage() and use CmdOptionParser.set_usage()W. Trevor King2009-12-282-3/+3
| | | | | | | | | | | | | This fixes $ python be diff -2 Usage: be [options] be: error: no such option: -2 and we now get the correct output $ python be diff -2 Usage: be diff [options] [REVISION] be: error: no such option: -2
* Moved InvalidStorageVersion from libbe.command to libbe.storageW. Trevor King2009-12-272-14/+2
| | | | | | Also added ConnectionError pretty-print to ui.command_line, storage version checking to BugDir.duplicate_bugdir(), and optional revision argument to Storage.storage_version().
* Added storage.Storage.storage_version() and command.InvalidStorageVersion.W. Trevor King2009-12-272-1/+16
| | | | Now commands automatically check for storage version compatibility.
* Fixed libbe.command.diff + ugly BugDir.duplicate_bugdir implementationW. Trevor King2009-12-1515-65/+46
| | | | | | | | | | | | | | | | | | | | | duplicate_bugdir() works, but for the vcs backends, it could require shelling out for _every_ file read. This could, and probably will, be horribly slow. Still it works ;). I'm not sure what a better implementation would be. The old implementation checked out the entire earlier state into a temporary directory pros: single shell out, simple upgrade implementation cons: wouldn't work well for HTTP backens I think a good solution would run along the lines of the currently commented out code in duplicate_bugdir(), where a VersionedStorage.changed_since(revision) call would give you a list of changed files. diff could work off of that directly, without the need to generate a whole duplicate bugdir. I'm stuck on how to handle upgrades though... Also removed trailing whitespace from all python files.
* Fixed libbe.command.subscribeW. Trevor King2009-12-152-11/+12
|
* Transition to Command-format complete.W. Trevor King2009-12-156-29/+31
| | | | | | | | Well, except for going through and updating the _long_help() strings. $ python test.py libbe.command succeeds for everything except Diff and Subscribe, which is expected since I haven't fixed up libbe.diff yet.
* Transitioned set to Command-formatW. Trevor King2009-12-152-80/+87
|
* Transitioned target to Command-formatW. Trevor King2009-12-153-69/+98
|
* Transitioned tag to Command-formatW. Trevor King2009-12-153-93/+108
|
* Transitioned diff and subscribe to Command-format"W. Trevor King2009-12-152-221/+254
| | | | | | They don't work yet, since I still need to fix up libbe.diff and replace BugDir.duplicate_bugdir() with something based on the new Storage backend.
* Transitioned show to Command-formatW. Trevor King2009-12-152-73/+95
|
* Transitioned status to Command-formatW. Trevor King2009-12-142-81/+69
|
* Transitioned severity to Command-format, also added Command._get_*()W. Trevor King2009-12-1415-163/+202
| | | | | | | | | | | | | | The old .requires_* thing was rediculous. The new ._get_*() callbacks allow the caller to provide a means for getting the expensive structures, which the command can use, or not, as required. This will also make it easier to implement the completion callbacks. The callbacks should probably have matching .set_*() methods, to avoid the current cache tweaking cmd._storage = ... etc. But that can wait for now...
* Transitioned remove to Command-formatW. Trevor King2009-12-141-40/+51
|
* Transitioned new to Command-formatW. Trevor King2009-12-142-49/+59
|
* Transitioned html to Command-formatW. Trevor King2009-12-142-118/+147
|
* Transitioned help to Command-formatW. Trevor King2009-12-143-43/+56
|
* Transitioned merge to Command-formatW. Trevor King2009-12-143-78/+99
|
* Transitioned import_xml to Command-formatW. Trevor King2009-12-143-184/+204
|
* Removed email_bugs, to be replaced by assorted storage backends.W. Trevor King2009-12-141-239/+0
|
* Transitioned due to Command formatW. Trevor King2009-12-142-50/+53
|
* Transitioned depend to Command formatW. Trevor King2009-12-144-128/+165
|
* Transitioned comment to Command formatW. Trevor King2009-12-147-210/+283
|
* Transitioned init to Command formatW. Trevor King2009-12-144-78/+97
|
* Added parse_user() calls to AssignW. Trevor King2009-12-141-4/+12
|
* Removed `be open` and `be close`. Alias `be status` instead.W. Trevor King2009-12-142-124/+0
| | | | | | | | | | For example, in Bash alias be-open='be status open' If you need to set options, this won't work, but command completion with misc/completion/be.bash should make typing out be status open not too painful ;).
* Transitioned assign to Command formatW. Trevor King2009-12-144-75/+104
|
* Converted libbe.storage.vcs.base to new Storage format.W. Trevor King2009-12-132-10/+13
|
* Moved be to libbe.ui.command_line and transitioned to Command format.W. Trevor King2009-12-124-51/+91
|
* Use get_input/output_encoding() in libbe.command.base.CommandW. Trevor King2009-12-121-2/+3
|
* Moved command completion from libbe.ui.util to libbe.command.utilW. Trevor King2009-12-123-12/+79
|
* Added libbe.command.base (with Command class) and moved list command to new ↵W. Trevor King2009-12-123-159/+418
| | | | format.
* Initial directory restructuring to clarify dependenciesW. Trevor King2009-12-0725-0/+4302