| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should currently do everything that `be comment --xml` did, but it
still has a way to go before it lives up to it's longhelp string,
mostly figuring out bug/comment merging.
The allowed XML format also changed a bit, becoming a bit more
structured.
cmdutil.bug_from_shortname() renamed to cmdutil.bug_from_id().
New functions cmdutil.parse_id() and cmdutil.bug_comment_from_id().
Additional doctests in libbe.comment.Comment.comment_shortnames() to
show example output if bug_shortname==None.
Brought be-xml-to-mbox and be-mbox-to-xml up to speed on the current
<be-xml>-rooted format.
* Added <extra-string> handling to their comment handling.
* Moved extra strings from email bodies to X-Extra-String headers
(some comment bodies are not text, and we should keep the estr
location consistent between bugs and comments.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Moved comment.InvalidXML to utility.InvalidXML, so that bug and
comment can share it. Added docstring explaining the __init__
arguments.
Added indent and shortname options to Bug.xml() to match
Comment.xml().
Added .extra_strings export to Comment.xml().
Converted Bug.xml() from string addition to list joining, which avoids
a bunch of memory allocation/deallocation.
Assorted " -> ' replacements.
Elaborated doctests to check UTF-8, extra_strings, ...
Added new comparison cmp_extra_strings for both bug. and
comment.DEFAULT_CMP_FULL_CMP_LIST.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
"comments" should always be a directory if it exists, but if it is
something else, be should fail rather than return an empty comment
list.
This fix was inspired by some browsing around in response to Thomas
Habets' version of a fix for missing "bugs" directory.
|
|
|
|
| |
Also a few minor tweaks to the module imports.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previous comment comparison had just been the default Tree.__cmp__.
Fleshed out so A == B ensures no meaningful differences between A and B.
Also added first line of comments to new comment output in libbe.diff,
and added a comment/"settings" node and .comment_mod_string() (to
mirror bugdir and bug).
|
|
|
|
|
|
| |
"Author" -> comment.author obeys settings_object.setting_name_to_attr_name(),
but all the current on-disk mapfiles talk about "From". Add a hack to accept
both forms of on-disk comment files.
|
|
|
|
|
|
|
|
|
|
| |
In BugDir, only call bug.remove if bug.sync_with_disk==True. If it's
just in memory, automatic garbage collection is sufficient cleanup.
Comment.set_sync_with_disk() had been setting .sync_with_disk=True
regardless of the value passed in. Fixed now.
Also some minor textual adjustments.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now they conform to the
libbe.settings_object.setting_name_to_attr_name()
standard.
I fixed the references I found in
becommands/comment.py
interfaces/xml/be-mbox-to-xml
interfaces/xml/be-xml-to-mbox
but there may have been some references or files that slipped through.
|
| |
|