| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Now change_hook properties handle defaults, which allows them to avoid
an initial
None -> default
save hook trigger.
Removed the now-redundant read-only mode business in
becommands/diff.py.
|
|
|
|
|
|
|
|
| |
Otherwise comment comparison reads were triggering notice of the
None -> EMPTY
transition in comment.extra_strings, which was causing a write to
disk. This trigger is probably occuring in Bug and BugDir too.
Perhaps I should just remove the trigger...
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This makes repeated .report() generation from the same tree more
efficient.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To make the interface proposed by becommands/subscribers.py easier to
implement, I've moved the libbe.diff functionality into classes. Now
it should be easy two tweak the output as desired by subclassing these
classes. The basic idea is that Diff.report_tree() generates a
diff_tree tree of changes between two bugdirs, where diff_tree is some
subclass of DiffTree. Each type of change has a default .*_string()
method producing a string summary of the change. DiffTree.report()
moves through and generates a report by joining all those summary
strings to a single root, and DiffTree.report_string() serialized the
report to produce e.g. the output of becommands/diff.py.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was too confusing having three memory access levels:
1) syncronized
2) explicit
3) memory-only
with .sync_with_disk selecting between 1 and 2/3 and ._in_memory
selecting between 2/3.
Now there are only two:
1) syncronized
2) memory-only excepting explicit BugDir.save() calls.
I avoid the problem of non-syncronized loading of on-disk bugs in
simple_bug_dir by restricting .list_uuids() to in-memory bugs when
.sync_with_disk==True.
Beyond that, I shifted the order of the BugDir methods around a bit so
that they were better grouped according to general idea.
Note that the DiskAccessRequired exceptions on filesystem access when
.sync_with_disk==False should be propogated to the Bug and Comment
methods, but I haven't done that yet.
|
|
|
|
|
|
|
| |
The previous simple_bug_dir(on_disk==False) supprised me by loading my
BE bugdir when called from the BE directory. This functionality could
probably move out to Bug and Comment as well, but I have avoided that
for now.
|
|
|
|
| |
Now you can easily generate simple_bug_dirs that live only in memory.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This still needs a lot of cleaning up, but it worked for an "all"
subscription to "DIR", so I thought I'd lock in the current status ;).
|
|
|
|
| |
This is the default behaviour of most of the VCSs own diff commands.
|
|
|
|
|
| |
This makes it easier to compare recent revisions without a human
around to give you revision numbers.
|
|
|
|
|
| |
It's useful enough even when you're not intending to encrypt
something.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Tree subclass SubscriptionType may be a few more lines to setup,
but they should be really easy to extend and will automatically keep
the longhelp and type handling in sync.
An example extension for bugdir types would be
all -> assigned -> <user>
to subscribe only to bugs being assigned to the specified user. You'd
have to loosen the currently strict InvalidType checking to make that
work, but the current type-tree handling would be up to the task.
Also a bit of reorganizing to hide the private functions.
|
|\
| |
| |
| | |
Also pulls "show referenced text" fix to "be comment".
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Renamed libbe.diff.diff -> bug_diffs, since it doesn't compare bugdirs.
Load comments before bug comparision so cmp_comments will see them.
Use .settings_properties rather than static lists to create attribute
lists for change_lines().
Removed trailing endline from becommands/diff.py output.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Tree equality is now based on instance id. It had previously used the
default list "equal if all elements are equal", which meant that all
the leaves matched each other.
|
| | |
|
| | |
|
| | |
|
| | |
|
|\|
| |
| |
| |
| |
| |
| | |
Other highlights:
* be show --no-comments
* Improved *.sync_with_disk.
* Improved be-mbox-to-xml.
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| |\| |
|
| |/
| |
| |
| | |
Missed these earlier.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
12c:uw: Bug aggregation. Multi-repo meta-BE?
529:ow: How should we version BE?
2f0:aw: Static html report generation
22b:aw: Sorting targets chronologically
d99:aw: CherryPy interface "Cherry-flavored BE"
e08:aw: Interactive email interface
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also moved the XML-header line to the top of the argument loop, since
there should only be one. We're still missing global tags wrapping the
whole thing though...
Also set options.XML default to False. It had been defaulting to
None, which was breaking the non-XML newline-adding check.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A previous "len(ret) >= 0" had been stripping the alt-id and
in-reply-to from _all_ parts of multipart comments. Now it only
strips them from parts after the first. The following parts do not
specify and alt-id, and they all are in-reply-to the first part.
I also added the KNOWN_IDS list for selecting amongst an array of
possible in-reply-to or references ids. This works well enough for
now, but would be more robust if we could import a list of previously
known ids from BE...
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
They are generated in memory (from_disk defaults to False)
133: new = comment.Comment(bug)
With the leaner saving since I started trusting sync_with_disk, they
were no longer making it to disk.
Easily fixed with an explicit save once you've got them all set up.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The actual fix was
@@ -339,7 +355,10 @@
fset = funcs.get("fset")
name = funcs.get("name", "<unknown>")
def _fget(self, new_value=None, from_fset=False): # only used if mutable == True
- value = fget(self)
+ if from_fset == True:
+ value = new_value # compare new value with cached
+ else:
+ value = fget(self) # compare current value with cached
if _cmp_cached_mutable_property(self, "change hook property", name, value) != 0:
# there has been a change, cache new value
old_value = _get_cached_mutable_property(self, "change hook property", name)
The reason for the double-save was:
>>> print t.settings["List-type"]==EMPTY
True
(the cached value here is EMPTY)
>>> t.list_type = []
(old fget compares cached EMPTY to current EMPTY, no change, so no
cache. fset notices change and saves EMPTY->[])
>>> t.list_type.append(5)
(now fget notices the change EMPTY->[], caches [], and calls extra save)
The new way:
>>> print t.settings["List-type"]==EMPTY
True
(the cached value here is EMPTY)
>>> t.list_type = []
(fget compares cached EMPTY to new [] and saves EMPTY->[])
>>> t.list_type.append(5)
(fget sees no change ([]->[]), which is correct)
In addition to the fix and the related corrections to
testChangeHookMutableProperty, I added details about mutables to all
relevant docstrings and stripped trailing whitespace from both files.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Got rid of a whole bunch of redundant .save() calls when
sync_with_disk==True.
Fixed up the "File-system access" portion of the BugDir docstring so
we can all remember how things are supposed to work ;).
Note that some .save() calls are still required. For example in
becommands/merge.py, the copied comments have their .bug changed, but
that is not a versioned property, so it doesn't trigger an automatic
save, and we have to force the .save() by hand.
libbe.rcs.RCS.mkdir() is now recursive by default, but you can set
check_parents==False if you want it to fail in the case of missing
parents. Because of the recursion, we removed the .update() call
on preexisting directories, since there will be at least one of
these occurrences for every .mkdir(check_parents=True) call, and
I don't know of any VCS that actually needs them...
Also stripped trailing whitespace from some files...
|
| |
| |
| |
| |
| |
| |
| |
| | |
From back before commit
wking@drexel.edu-20090619184215-nfx205yaj02sqrqx
cleaned up the versioned_property implementation.
Also a few style fixes and typos.
|
| | |
|
| |
| |
| |
| | |
Split arguments following POSIX rather than at all whitespace.
|
| |
| |
| |
| | |
Also some minor textual cleanups.
|