| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids a deepcopy error where the BugDir tries to update before
the Bug has had it's uuid assigned:
Traceback (most recent call last):
...
File ".../libbe/command/merge.py", line 168, in _run
newCommTree = copy.deepcopy(bugB.comment_root)
File "/usr/lib64/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
...
File "/usr/lib64/python2.7/copy.py", line 352, in _reconstruct
y.append(item)
File ".../libbe/bugdir.py", line 263, in append
self._bug_map_gen()
File ".../libbe/bugdir.py", line 152, in _bug_map_gen
map[bug.uuid] = bug
AttributeError: 'Bug' object has no attribute 'uuid'
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to do things like:
$ mkdir -p /tmp/joint-repo/.be
$ cd /tml/joint-repo/.be
$ ln -s ~/src/be/.be/version
$ ln -s ~/src/be/.be/bea86499-824e-4e77-b085-2d581fa9ccab/
$ ln -s ~/src/BEurtle/.be/7017b289-f207-4e39-9746-f58323404eba/
$ be list
without crashing with a:
Traceback (most recent call last):
File ".../libbe/storage/base.py", line 316, in children
return self._children(*args, **kwargs)
File ".../libbe/storage/vcs/base.py", line 820, in _children
path = self.path(id, revision, relpath=False)
File ".../libbe/storage/vcs/base.py", line 721, in path
path = self._cached_path_id.path(id)
File ".../libbe/storage/vcs/base.py", line 280, in path
raise InvalidID(uuid)
libbe.storage.base.InvalidID: 7017b289-f207-4e39-9746-f58323404eba in revision None
Currently it only lists the first bug directory it comes across, but
after this patch, it doesn't crash ;).
|
|
|
|
|
| |
By appending '.py' to *everything*, it was listing '__pycache__' for
Python 3.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
| |
More Pythonic.
|
|
|
|
| |
Previously, only the SSL server was using ExceptionApp.
|
| |
|
|
|
|
|
| |
Also rework liburl2.HTTPError handling to get both the reason and the
error code into the HTTPError message.
|
|
|
|
| |
This way they can be shared with the upcoming Command._run_remote.
|
| |
|
|
|
|
|
|
| |
We'll usually get this message if we fail to reach the server, but we
can also get it if the server is so broken that it dies without
returning a valid HTTP response.
|
|
|
|
|
| |
This allows us to set an appropriate user agent if we use this
function in other places (e.g. upcoming Command._run_remote).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They were being logged by the request handler, and then logged again
by WSGI_Object.log_request. After this patch, requests are only
logged when logger.level is at a <= level (e.g. closer to DEBUG)
than the WSGI_Object.log_level (usually INFO). For example, in
Serve_setup_logging,
self.logger.setLevel(logging.INFO)
will get request logs printed, but
self.logger.setLevel(logging.WARNING)
will not.
|
|
|
|
|
|
|
| |
To test this, you'll need to build an egg. You can use setuptools to
do this, by applying:
<snip-patch>
|
|
|
|
|
|
|
|
|
|
|
| |
WTK: This is the meat of Niall's
commit 4632cb6d22faa7220540f92af67693084f80f033
Author: Niall Douglas ...
Date: Wed Feb 22 17:46:06 2012 +0000
Fixed small bug where running from inside zip support was over
preferring .pyc files
|
|
|
|
|
|
|
|
|
|
|
| |
WTK: This is a portion of Niall's
commit 7f7a7738bcbcfd06a026f2985c1823a4ba5eb55b
Author: Niall Douglas ...
Date: Tue Feb 21 20:35:28 2012 +0000
Several hacks to make BE compatible with bbfreeze and therefore
compilable into a self contained directory
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes:
From: Phil Schumm
Date: Thu, 23 Aug 2012 08:15:21 -0500
Subject: [Be-devel] -be diff- under Hg
...
I've just noticed that -be diff- seems to yield different output
under Git than it does under Hg (e.g., in a Mercurial +repository,
-be diff- appears to show all changes as new bugs rather than
modified).
...
|
|
|
|
|
|
|
|
|
|
|
| |
With a tree like:
a
`-- b
`-- c
children(a) should return [b], not [b, c] or [c]. This catches a bug
in the Mercurial backend. Fix to follow.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to Tim Mazid for reporting the bug, and Israel Basurto for
suggesting the fix.
On Wed, May 09, 2012 at 07:26:14PM +1000, Tim Mazid wrote:
> $ interfaces/web/cfbe.py ~/projects/proj/
> Bugs Everywhere Directory v1.4
> Traceback (most recent call last):
> File "interfaces/web/cfbe.py", line 42, in <module>
> cherrypy.quickstart(WebInterface, '/', app_config)
> AttributeError: 'module' object has no attribute 'quickstart'
>
> This is with the latest be from git, and python-cherrypy 2.3.0-3 from
> Debian wheezy.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Sometimes saxutils returns unicode.
|
|
|
|
|
| |
This avoids errors if the comment text references a repository that
you don't have locally.
|
| |
|
|
|
|
|
| |
This makes the default output less threatening for new users, while
still supplying the full UUIDs for driving BE from external software.
|
| |
|
|
|
|
| |
and stdout to be overridden. This is necessary on Windows as there is no way for external programs to set stdin or stdout charsets :(
|
| |
|
|
|
|
|
| |
This will make it easier (possible?) for people using the roff version
of the man page to follow the link.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes the underlying problem that we worked around in commit
2c9ae15f53aef57d28091b237c193c653c6e80dd. Now even
$ echo 'some bug | be --paginate new -
will work instead of raising IOError: [Errno 9] Bad file descriptor.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the command is run in the pager, access to stdin is tricky, so I
avoid it by default. I'd just missed the fact that `new -` used
stdin, which caused
https://bugzilla.redhat.com/show_bug.cgi?id=751473
$ be new -
Traceback (most recent call last):
...
File "/usr/lib/python2.7/site-packages/libbe/command/new.py", line 89, in _run
summary = self.stdin.readline()
...
File "/usr/lib64/python2.7/codecs.py", line 473, in read
newdata = self.stream.read(size)
IOError: [Errno 9] Bad file descriptor
|
|
|
|
|
|
|
|
|
| |
In response to
https://bugzilla.redhat.com/show_bug.cgi?id=733945
in which Neal Becker was bummed at the long traceback, which may
initially look like a programming issue.
|