aboutsummaryrefslogtreecommitdiffstats
path: root/libbe
Commit message (Collapse)AuthorAgeFilesLines
* ui:util:pager: cleanup pager implementationW. Trevor King2012-11-291-28/+45
| | | | | | | | | | | | | Changes: * Import libraries with an underscore prefix to avoid polluting the module's public namespace. * Use a copy `env` to avoid messing with the child process' environment. * Pass the tweaked environment on to the PAGER (e.g. for PATH). * Handle PAGER='' (by not paging). * Use shlex.split to handle cases like PAGER='less -FRSX' (thanks to Da_Blitz from pocketnix.org for the bug report and shlex idea).
* ui:util:pager: document Nathan Weizenbaum as author of Ruby inspirationW. Trevor King2012-11-291-1/+2
| | | | | | | | | | Nathan's post is released under CC BY-SA 3.0 Unported. According the the FSF, the CC BY-SA 2.0 Generic was not compatible with BE's GPLv2+ [1]. I expect my Python implementation is sufficiently different from Nathan's original notes to be classified as "fair use" and not an "adaptation". [1]: http://www.gnu.org/licenses/license-list.html#ccbysa
* storage:base: convert to Python 3.3 compatibilityW. Trevor King2012-11-121-6/+8
|
* storage: convert to Python 3 compatibilityW. Trevor King2012-11-121-9/+9
|
* version: convert to Python 3 compatibilityW. Trevor King2012-11-121-10/+12
|
* util:wsgi: handle all dispatch() exceptions in BEExceptionAppW. Trevor King2012-10-281-9/+15
| | | | | | This brings BEExceptionApp into closer agreement with libbe.ui.command_line.dispatch(), and avoids having the server go down when a user submits a silly command.
* util:http: special handling for HTTP_USER_ERROR in get_post_url().W. Trevor King2012-10-281-4/+5
|
* Use libbe.util.http.HTTP_USER_ERROR everywhere instead of hardcoding 418W. Trevor King2012-10-284-9/+7
|
* util:wsgi: catch NoIDMatches in BEExceptionAppW. Trevor King2012-10-281-0/+4
|
* util:wsgi: add --daemon, --pidfile, and --logfileW. Trevor King2012-10-281-25/+151
| | | | | | | | | | | | | | | | | | | | This allows you to manage BE servers from inetd scripts, etc. Shortcomings of the current implementation: * ServerCommand._daemonize() currently only sets a SIGTERM handler and double forks. If you want to do this right, see PEP 3143. Unfortunately, the PEP seems to have stalled, python-daemon appears unmaintained, and I don't care enough at the moment to do this right. * ServerCommand._get_pidfile() races between checking for an existing PID file and claiming the file itself. It is possible that two processes would check around the same time, and both see no existing file. Then they would both open the PID file and write their pid, without noticing that the other process was contending for the file. Solving this requires file locking, which is difficult to do portably. This shouldn't be an issue in normal operation, where each server will be using its own PID file path.
* util:wsgi: fix From -> from typo in pyOpenSSL commentW. Trevor King2012-10-271-1/+1
|
* util:wsgi: fix get_cert_filenames -> _get_cert_filenames typoW. Trevor King2012-10-271-1/+1
| | | | | | | | | | | This was broken in the creation of libbe.util.wsgi from libbe.command.serve: commit 0fa17f6bf6a809df14ae1930542059a9e62066b0 Author: W. Trevor King <wking@tremily.us> Date: Mon Aug 27 13:37:58 2012 -0400 libbe:util:wsgi: extract WSGI utilities into a separate module.
* util:wsgi: import os.path for _get_cert_filenames()W. Trevor King2012-10-271-0/+1
| | | | | | | | | | | This was lost in the creation of libbe.util.wsgi from libbe.command.serve: commit 0fa17f6bf6a809df14ae1930542059a9e62066b0 Author: W. Trevor King <wking@tremily.us> Date: Mon Aug 27 13:37:58 2012 -0400 libbe:util:wsgi: extract WSGI utilities into a separate module.
* util:wsgi: fix Clossing -> Closing typo.W. Trevor King2012-10-271-1/+1
|
* util:wsgi: remove %default from option help stringsW. Trevor King2012-10-271-2/+2
|
* command:html: remove %default from option help stringsW. Trevor King2012-10-271-6/+5
|
* storage:util:upgrade: use YAML parser to get BE Tree 1 0 settingsW. Trevor King2012-10-271-1/+1
| | | | | | | | | | | This fixes the "Bugs Everywhere Tree 1 0" -> "Bugs Everywhere Directory v1.1" upgrade broken by the switch to JSON in: commit a95915c6c7d6a4e29c1e5547580e0c1fed2467e1 Author: W. Trevor King <wking@tremily.us> Date: Mon Sep 17 08:14:21 2012 -0400 storage:util:mapfile: convert YAML settings to JSON.
* storage:vcs:git: don't accept pygit2 version 0.17.3.W. Trevor King2012-10-271-2/+2
| | | | | | | | | | | | | | | | My Repository.revparse_single() series was merged into pygit2 with: Merge: 3e9daa4 0238fb7 Author: J. David Ibáñez <jdavid.ibp@gmail.com> Date: Tue Sep 25 15:10:55 2012 +0200 Merge remote-tracking branch 'wking/revparse' But this happened after the 0.17.3 release. The next pygit2 release should contain the .revparse_single() code. The getattr() hackery works because versions of pygit2 before 0.17.3 lacked a __version__ attribute.
* 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
|
* storage:util:upgrade: make yaml import optional (unless it isn't)W. Trevor King2012-10-261-1/+9
| | | | | | Importing `yaml` may fail (if the user doesn't have PyYAML installed), but don't die until we need to use it. This way users without the old YAML formats on disk can run BE without installing PyYAML.
* command: use mapfiles (JSON) instead of YAML for the command serverW. Trevor King2012-10-262-8/+7
|
* storage:util:mapfile: add `context` argument to generate()W. Trevor King2012-10-261-23/+19
|
* doc: clean up top level module docstringsW. Trevor King2012-10-265-10/+11
|
* libbe:bugdir: avoid SimpleBugDir is not a item nameW. Trevor King2012-10-261-1/+1
| | | | | This happens because SimpleBugDir is not defined if libbe.TESTING is not set before importing libbe.bugdir.
* doc: update :attr: to :py:attr: for modern Sphinx.W. Trevor King2012-10-261-1/+1
|
* doc: update :data: to :py:data: for modern Sphinx.W. Trevor King2012-10-263-10/+10
|
* doc: update :meth: to :py:meth: for modern Sphinx.W. Trevor King2012-10-265-11/+11
|
* doc: update :class: to :py:class: for modern Sphinx.W. Trevor King2012-10-2621-49/+49
|
* storage:vcs:base: avoid `is not a item name` Sphinx error.W. Trevor King2012-10-261-1/+1
|
* doc: update :mod: to :py:mod: for modern Sphinx.W. Trevor King2012-10-269-25/+25
|
* doc: update :func: to :py:func: for modern Sphinx.W. Trevor King2012-10-264-9/+9
|
* storage:util:config: path() now defaults to ~/.config/bugs-everywhereW. Trevor King2012-10-261-2/+13
| | | | | Add a documentation section discussing the config file, respect XDG_CONFIG_HOME, and add BE_CONFIG_PATH.
* version: use abbreviated SHA instead of explicit _VERSION in master branchW. Trevor King2012-10-251-2/+2
| | | | | | Only official releases get a version number, which should help avoid confusion. If you're running a live checkout, you shouldn't be scared off by SHAs.
* bugdir|bug|comment: update default settings string to be value JSON.W. Trevor King2012-10-253-3/+3
|
* storage:util:mapfile: fix YAML -> JSON in docstrings.W. Trevor King2012-10-251-2/+4
| | | | | | | | | | | | This should have been done back in: commit a95915c6c7d6a4e29c1e5547580e0c1fed2467e1 Author: W. Trevor King <wking@tremily.us> Date: Mon Sep 17 08:14:21 2012 -0400 storage:util:mapfile: convert YAML settings to JSON. I also add an empty-settings generation as a sanity check.
* Ran update-copyright.py.W. Trevor King2012-10-1664-65/+105
|
* storage:vcs:git: check for existence of pygit2.__version__.W. Trevor King2012-09-171-0/+5
| | | | | | | | | | Now that my pull request has been accepted, we can be fairly confident that future releases of pygit2 will expose this attribute. The accepted patch was a bit different from the original submission: Add 'pygit2.__version__' for easy access from client software. https://github.com/libgit2/pygit2/pull/128 commit f10d2b7b3f0c67d81b175326035e4813420156bd
* 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.
* storage:util:mapfile: convert YAML settings to JSON.W. Trevor King2012-09-173-84/+181
| | | | | | | | | This is faster and still readable. I also add an upgrader to convert bug directories from: Bugs Everywhere Directory v1.4 to: Bugs Everywhere Directory v1.5 but I haven't upgraded the local bugdir yet.
* storage:vcs:git: move Git to ExecGit and add PygitGit using pygit2.W. Trevor King2012-09-131-11/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If `pygit2` is installed, use it (via PygitGit) rather than calling the stand-alone `git` executable for all the Git (via ExecGit) for all the Git storage stuff. This saves one serializing/deserializing and process setup/teardown. I timed each test suite by commenting out one of the `make_vcs_testcase_subclasses()` calls at the end of `git.py` and running $ time python test.py libbe.storage.vcs.git The ExecGit tests ran in 13.7s and the PygitGit tests ran in 3.6s for a 3.8x speedup. I had to stretch pygit2 a bit to get a clean fit, so if you want to test this, you'll need to build pygit2 with the following merge requests: Add 'pygit2.__version__' for easy access from client software. https://github.com/libgit2/pygit2/pull/128 commit 0238fb72dfdf2a2308f2da347717cbaafddc4b83 signature: Add keyword argument parsing to Signature(). https://github.com/libgit2/pygit2/pull/129 commit c934858b629f40221406f34166dd77e881b9d5fd repository: add Repository.revparse_single() https://github.com/libgit2/pygit2/pull/131 commit 3afdc8b2f59ed137531671fedde36f3a39cbcc9d
* storage:vcs:base: fix _gets_ -> _get_ typo in test_gets_existing_user_id.W. Trevor King2012-09-131-1/+1
| | | | | VCS_get_user_id_TestCase.test_gets_existing_user_id is now VCS_get_user_id_TestCase.test_get_existing_user_id
* storage:vcs:base: fix realtive -> relative typo in _u_abspath docstring.W. Trevor King2012-09-131-1/+1
|
* 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
|
* ui:command_line: use `be help server` for help with `--server`.W. Trevor King2012-09-031-1/+1
| | | | | Use the recently created topic, which provides more details than the `serve-commands` help message.
* ui:command_line: display help.TOPICS during `be help`.W. Trevor King2012-09-031-2/+14
|