aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/command
Commit message (Collapse)AuthorAgeFilesLines
* Used PyCharms inspectors.Matěj Cepl2024-03-3019-111/+101
|
* More cleanups.Matěj Cepl2024-01-302-4/+2
|
* WIP plenty of clean-ups and porting to Python 3.Matěj Cepl2024-01-2110-46/+47
|
* conversion of cmp() functionMatěj Cepl2024-01-182-17/+13
|
* 2to3 conversion of the repo.Matěj Cepl2024-01-1825-187/+180
|
* remove serve-storage and HTTP storage driverMatthew Fernandez2017-11-072-355/+2
| | | | | | This functionality is now better fulfilled by using an off-the-shelf network file system technology to share the BE object directory. This has the advantage of a more comprehensive and integrated security model as well.
* fix: remove server-storage help text referencing --authMatthew Fernandez2017-10-281-5/+1
| | | | | The --auth flag was removed in 5fb6a912cd7cb0bcfa4512da5248baad1175faf5 that should have removed this text as well.
* fix: remove legacy help textMatthew Fernandez2017-10-281-2/+0
| | | | | This should have been removed in 5fb6a912cd7cb0bcfa4512da5248baad1175faf5 as it was related to the preceding sentence that was removed.
* remove check_login from the WSGI server appMatthew Fernandez2017-10-262-30/+0
| | | | | | AuthenticationApp (just removed) was the only code that had any interaction with this functionality. That is, check_login looked for an environment variable "be-auth.user" that was only ever set by AuthenticationApp.
* remove --auth option from server commandsMatthew Fernandez2017-10-262-5/+2
| | | | | The implementation of this option contained syntax errors and did not work. For more information, see https://gitlab.com/bugseverywhere/bugseverywhere/issues/7.
* remove support for ArchMatthew Fernandez2017-10-251-2/+0
| | | | | | The last release of GNU Arch was in 2006, over ten years ago at time of writing. GNU suggests users should migrate repositories to Bazaar. This commit removes all support for Arch to reduce ongoing maintenance overheads.
* trivial: remove an unused importMatthew Fernandez2017-10-071-1/+0
|
* trivial: fix syntax errorMatthew Fernandez2017-10-071-1/+1
|
* Merget patch from Matthew Fernandez to fix some typosGianluca Montecchi2017-01-243-3/+3
|
* Incorrect accquiring bugdir command line argumentMatěj Cepl2013-10-313-3/+3
| | | | | The calling below seems like a typo to me. How can we index with a variable which has not been initialized yet?
* command:target: Print full ID (bugdir/bug) on --resolveW. Trevor King2013-07-101-1/+1
| | | | | | | | | | | | The old implementation just printed the bug UUID (without the bugdir/ prefix). This lead to the command we suggest in `be target --help`: $ be depend --status -closed,fixed,wontfix --severity -target \ $(be target --resolve) failing with an invalid ID. Reported-by: Michael Sperber <sperber@deinprogramm.de>
* command:html: Rework comment <div> closingW. Trevor King2013-03-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comment nesting wasn't working properly before, where you could get things like: <div class="comment root" id="a"> </div> <!-- close a --> <div class="comment" id="a/b"> <div class="comment" id="a/b/c"> <div class="comment root" id="d"> </div> <!-- close d --> </div> <!-- close a/b/c --> </div> <!-- close a/b --> from a comment tree (using fake ids) of: . |-- a | `-- a/b | `-- a/b/c `-- d The new handling pushes the `div_close(depth)` call to the front of the comment block, because a comment's depth tells us how many of the already-rendered comments we need to close. Closing comments at the top of the block means that we'll always have at least one unclosed comment to close after the comment loop completes. With the new handling, we'll get a more appropriate: <div class="comment root" id="a"> <div class="comment" id="a/b"> <div class="comment" id="a/b/c"> </div> <!-- close a/b/c --> </div> <!-- close a/b --> </div> <!-- close a --> <div class="comment root" id="C29a03522-ed6e-4a9a-8823-23a1c513865f"> </div> <!-- close d --> Reported-by: Owen Jacobson <owen.jacobson@grimoire.ca>
* Transition to libbe.LOG for loggingW. Trevor King2013-01-241-3/+3
| | | | | | | This makes it easier to tweak log verbosity and redirect logs to other handlers. For example, the WSGI servers are unstable with stderr closed, and crash with an IOError if they try to print a warning to stderr.
* libbe:command:util: fix bugdir access for complete_status and complete_severityW. Trevor King2012-12-131-2/+2
| | | | | | | | | | | | Fix a bug introduced by: commit 4db1a045a0606bead191a563abc54dfa8352efe0 Author: W. Trevor King <wking@tremily.us> Date: Wed Aug 29 23:26:17 2012 -0400 Rewrite commands to use bugdirs instead of a single bugdir. Reported-by: James Spencer <james.s.spencer@gmail.com>
* Use libbe.util.http.HTTP_USER_ERROR everywhere instead of hardcoding 418W. Trevor King2012-10-283-6/+4
|
* command:html: remove %default from option help stringsW. Trevor King2012-10-271-6/+5
|
* command:serve_*: remove wordy "with, for example" from help messageW. Trevor King2012-10-272-4/+2
|
* command:serve_commands: fix --repo -> --server in help messageW. Trevor King2012-10-271-1/+1
|
* command: use mapfiles (JSON) instead of YAML for the command serverW. Trevor King2012-10-262-8/+7
|
* doc: update :class: to :py:class: for modern Sphinx.W. Trevor King2012-10-262-6/+6
|
* doc: update :mod: to :py:mod: for modern Sphinx.W. Trevor King2012-10-261-1/+1
|
* Ran update-copyright.py.W. Trevor King2012-10-1626-27/+32
|
* command:html: convert -moz-border-radius to border-radius.W. Trevor King2012-09-171-9/+9
| | | | | | border-radius and friends are standard CSS3 [1]. [1]: http://www.w3.org/TR/css3-background/#the-border-radius
* command.html: display "Target:" detail for bugs with targets.W. Trevor King2012-09-171-0/+10
|
* command:html: fix two auto% -> auto typos in CSS.W. Trevor King2012-09-171-2/+2
| | | | | | | | | | | | | | | | | | These were introduced in commit d61d54ce33022f0613c5e19e2f52be4ab77c4664 Author: Gianluca Montecchi <gian@grys.it> Date: Mon Jan 24 22:47:32 2011 +0100 New html output for html command and propogated in commit 5b6be7a511670cdf1961d13040cddcb34e70b8a1 Author: W. Trevor King <wking@drexel.edu> Date: Sun Apr 17 02:41:07 2011 -0400 Rework `be html` to use Jinja2 templates.
* command:html: add --strip-email option.W. Trevor King2012-09-031-6/+21
|
* command:html: oops, use default arguments for 'notify' and 'auth'.W. Trevor King2012-09-031-2/+2
|
* command:html: fix super(HTML. self) -> super(HTML, self).W. Trevor King2012-09-031-1/+1
|
* command:help: add `repo` and `server` topics.W. Trevor King2012-09-031-1/+60
|
* command:help: match against command names (not module names).W. Trevor King2012-09-031-1/+1
|
* command:html: rewrite as a libbe.util.wsgi.ServerCommand.W. Trevor King2012-09-031-291/+368
| | | | | | | | | Now `be html` defaults to serving the BE repo live. With the `--export-html` option, it reverts to the earlier static dump behaviour. This will make it easier for others to embed a read-only HTML server in their own app (e.g. as a gitorious issue tracker).
* command:serve-storage: rename server_version to BE-storage-server/<VERSION>.W. Trevor King2012-09-031-1/+1
| | | | | | | | | | This catches the server version up with: commit 0336db8d4052a319f1d959a33fc847814551e3f8 Author: W. Trevor King <wking@tremily.us> Date: Wed Aug 29 23:55:37 2012 -0400 command:serve-storage: rename `be serve` -> `be serve-storage`.
* command:serve_commands: allow unspecified parameters (use defaults).W. Trevor King2012-09-031-2/+12
| | | | | | | | | | | | | | | Also raise UnknownCommand if there is no `command` key in the posted dict (malformed request). With the new code, you can run commands with: $ wget --post-data='command: list' http://localhost:8000/run/ instead of having to go through and specify all the parameters explicitly. This will make the command server more robust for use with older clients (who may not know about all the parameters that the server knows about). Parameters sent by the client that the server does not know about are silently ignored.
* command:import_xml: fix `--r` -> `-r` in long help.W. Trevor King2012-09-031-2/+2
|
* command:import_xml: fix be-mbox-to-xml -> be-mail-to-xml.W. Trevor King2012-09-031-3/+3
| | | | | | | | | | This catches the doc up with misc/xml/be-mail-to-xml: commit c8985785eb741ff646082879f1ca5e9cfe3873b0 Author: W. Trevor King <wking@drexel.edu> Date: Wed Jan 20 15:22:28 2010 -0500 'be-mbox-to-xml' -> 'be-mail-to-xml' + support for several formats.
* command:serve-storage: rename `be serve` -> `be serve-storage`.W. Trevor King2012-08-292-5/+9
| | | | | | | | | | This will help avoid confusion between be serve-storage and be serve-commands
* Rewrite commands to use bugdirs instead of a single bugdir.W. Trevor King2012-08-2921-407/+620
| | | | | | | The bulk of the work is in regard to XML, with new BugDir.xml and .from_xml methods to support the new <bugdir> entity. I also split the guts import_xml's ._run method into sub-methods to make the import logic more obvious.
* util:wsgi: add BEExceptionApp for translating storage exceptions.W. Trevor King2012-08-291-10/+0
| | | | | | This fixes .test_get_initial_value for the HTTP backend, because the tests use TestingHTTP.getURL, which only catch HandlerError, not the more specific storage exceptions.
* libbe:util:wsgi: extract WSGI utilities into a separate module.W. Trevor King2012-08-272-1118/+84
|
* command:serve_commands: remove duplicate cruft and get working unit tests.W. Trevor King2012-08-241-327/+19
|
* command:serve: add ability to pass raw POST data with getURL.W. Trevor King2012-08-241-12/+16
| | | | | | | | | | This is analagous to the earlier change to get_post_url: commit 0cd072b9710ee964e6f449abd9265d85e02f34d2 Author: W. Trevor King <wking@tremily.us> Date: Fri Aug 24 09:29:58 2012 -0400 util:http: add ability to pass raw POST data with get_post_url.
* command:serve_commands: new command for running a command server.W. Trevor King2012-08-242-2/+700
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an initial step towards improving BE's efficiency. Previously, BE gets slow as the bug count increases for several commands (e.g. `be list`), because it takes time to load the bugdir information from disk at each invocation. If you use a remote repo (`be --repo http://localhost:8000/ list`), the server process may have already loaded the repo from disk, but now your listing process has to fetch everything over the wire. This is even worse than loading it from disk. With the new `be serve-commands` and `be --server URL ...` pair, the bugdir loading happens once on the server, and all the processing is also carried out on the server. This means that calls like `be --server http://localhost:8000/ list` will scale much better than other methods. For example: $ time be --server http://localhost:8000/ list > /dev/null real 0m2.234s user 0m0.548s sys 0m0.114s $ time be --server http://localhost:8000/ list > /dev/null real 0m0.730s user 0m0.548s sys 0m0.112s $ time be list > /dev/null real 0m2.453s user 0m2.289s sys 0m0.166s $ time be list > /dev/null real 0m2.521s user 0m2.350s sys 0m0.172s The first call to a cold server takes about the same time as a local call, because you need to load the bugs from the filesystem. However, later calls to a warm server are 3x faster, while later local calls are still slow. This is currently a minimal working implementation. There's a good deal of code in libbe.command.serve that I'd like to abstract out into a libbe.util library (since there's still a bunch of duplication between libbe.command.serve and libbe.command.serve_commands). The remote calls are also not as fast as I'd like, likely due to library load times. This commit just locks in an initial working implementation.
* command:base: only cleanup UseInterface.storage_callback if it's there.W. Trevor King2012-08-241-1/+2
| | | | | It's hard to see why it wouldn't be, but .setup_command handles the case where it's missing, so we should be consistent here.
* command:base: use is/is-not None instead of ==/!= None in setup_command.W. Trevor King2012-08-241-3/+3
| | | | More Pythonic.
* command:serve: wrap server in ExceptionApp regardless of SSL.W. Trevor King2012-08-241-1/+1
| | | | Previously, only the SSL server was using ExceptionApp.