| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Sometimes saxutils returns unicode.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This happens most often when a previous crash leaves an empty
directory `abc` in .be/.../bugs/abc/ or
.be/.../bugs/.../comments/abc/. The new exception ensures the error
message is "Bug/Comment X missing value file" which tells you where to
look for the repository corruption not "summary is None" which told
you nothing.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It had been removed in
revno: 473.1.43
committer: W. Trevor King <wking@drexel.edu>
branch nick: be.restructure
timestamp: Mon 2009-12-14 07:37:51 -0500
message:
Transitioned comment to Command format
when we pushed unicode encoding/decoding back to the Storage backend.
However, with the addition of libbe.util.id.short_to_long_text(),
we need it again.
Also add a Doctest showing a non-text/* comment, so utilities dealing
with them can see what they'll be working with.
|
|
|
|
| |
Also explicitly avoid loading or saving settings for root comments.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ python test.py libbe.command.init
Doctest: libbe.command.init.Init ... FAIL
...
-----------------------
File ".../libbe/command/init.py", line 47, in libbe.command.init.Init
Failed example:
ui.run(cmd)
Exception raised:
Traceback (most recent call last):
...
File "/tmp/be.wtk/libbe/command/init.py", line 97, in _run
bd = libbe.bugdir.BugDir(storage, from_storage=False)
File "/tmp/be.wtk/libbe/bugdir.py", line 185, in __init__
self.save()
File "/tmp/be.wtk/libbe/bugdir.py", line 228, in save
self.save_settings()
File "/tmp/be.wtk/libbe/bugdir.py", line 204, in save_settings
mf = mapfile.generate(self._get_saved_settings())
File "/tmp/be.wtk/libbe/storage/util/settings_object.py", line 230, in _get_saved_settings
self, self._setting_name_to_attr_name(k))
File "/tmp/be.wtk/libbe/storage/util/properties.py", line 194, in _fget
value = fget(self)
File "/tmp/be.wtk/libbe/storage/util/properties.py", line 329, in _fget
primer(self)
File "/tmp/be.wtk/libbe/storage/util/settings_object.py", line 69, in prop_load_settings
self.load_settings()
File "/tmp/be.wtk/libbe/bugdir.py", line 194, in load_settings
self.settings = mapfile.parse(settings_mapfile)
File "/tmp/be.wtk/libbe/storage/util/mapfile.py", line 123, in parse
c = yaml.load(contents)
...
File "/usr/lib/python2.6/site-packages/yaml/reader.py", line 213, in update_raw
data = self.stream.read(size)
AttributeError: 'NoneType' object has no attribute 'read'
...
|
|
|
|
|
|
|
|
|
|
| |
Now
be show --xml ID | be-xml-to-mbox | catmutt
shows appropriate linking regardless of missing references or
references to alt-ids in the original comments. On the other hand,
be show --xml ID | be import-xml
could alter alt-ids. If that's a problem we could turn off
save_in_reply_to usage via an option to the xml methods in the future.
|
| |
|
|
|
|
| |
I'd missed some calls when I made the changes.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
This is a pretty critical feature, dunno how I missed it before.
I also added a little check to both Bug and Comment.from_xml() so that
xml_string can take an ElementTree Element as well as the usual raw
string/unicode. This avoids repeated string <-> Element conversions.
Added Bug.add_comment() which handles the addition of a Comment
instance, matching .in_reply_to, checking .uuid uniqueness, etc.
|
|
|
|
|
|
|
|
|
| |
Added *.explicit_attrs list creation to Bug and Comment.from_xml().
Added match_alt_id keyword argumennt to .comment_from_uuid().
Removed extra enline following '</extra-string>' tag in Bug and
Comment.xml().
|