| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously:
$ be init
$ be list
...
File ".../libbe/bugdir.py", line 537, in list_uuids
for uuid in os.listdir(self.get_path("bugs")):
OSError: [Errno 2] No such file or directory: '.../.be/bugs'
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Also simple_bug_dir -> SimpleBugDir class, which allows me to add
utility.Dir cleanup to SimpleBugDir.cleanup().
Still having a bit of trouble with the becommand.new tests due to
bugdir loading though...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was causing strange "RCS not found" errors in the bzr and hg
unittests. For example, the bzr tests all passed:
wking@thor:be.wtk-rr$ python test.py bzr
...
Ran 12 tests in 24.143s
OK
Except when run after the bugdir tests:
wking@thor:be.wtk-rr$ python test.py bugdir bzr
...
Ran 19 tests in 1.862s
FAILED (errors=12)
Where the failures were all
AssertionError: bzr RCS not found
Fixed by returning to intial directory after SimpleBugDirTestCase
execution. Problem is due to Python issues with unlinked directories
though, so bzr/hg will _still_ not work from unlinked directories.
This is for Python 2.5.4 on Ubuntu 8.04.3, but probably effects other
pythons too.
Details:
Isolated problem to unlinked directories:
mkdir /tmp/a
cd /tmp/a
rmdir /tmp/a
python /home/wking/src/fun/be/be.wtk-rr/test.py bzr
which fails with the same "RCS not found" errors because bzr fails:
wking@thor:/$ mkdir /tmp/a; cd /tmp/a; rmdir /tmp/a; bzr --help; cd /;
rmdir: removing directory, /tmp/a
'import site' failed; use -v for traceback
bzr: ERROR: Couldn't import bzrlib and dependencies.
Please check bzrlib is on your PYTHONPATH.
Traceback (most recent call last):
File "/usr/bin/bzr", line 64, in <module>
import bzrlib
ImportError: No module named bzrlib
which fails becase 'import site' fails:
wking@thor:/$ mkdir /tmp/a; cd /tmp/a; rmdir /tmp/a; python -c 'import site'; cd /;
rmdir: removing directory, /tmp/a
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/wking/lib/python/site.py", line 73, in <module>
__boot()
File "/home/wking/lib/python/site.py", line 33, in __boot
imp.load_module('site',stream,path,descr)
File "/usr/lib/python2.5/site.py", line 408, in <module>
main()
File "/usr/lib/python2.5/site.py", line 392, in main
paths_in_sys = removeduppaths()
File "/usr/lib/python2.5/site.py", line 96, in removeduppaths
dir, dircase = makepath(dir)
File "/usr/lib/python2.5/site.py", line 72, in makepath
dir = os.path.abspath(os.path.join(*paths))
File "/usr/lib/python2.5/posixpath.py", line 403, in abspath
path = join(os.getcwd(), path)
OSError: [Errno 2] No such file or directory
which fails because our cwd doesn't exist. That makes sense ;).
Still I think Python should be able to handle it, so I reported it
http://bugs.python.org/issue6612
|
|
|
|
|
|
| |
I'd done this already in
wking@drexel.edu-20090723154304-swmkxpfagdzff9ai
but for some reason the merge with the email branch brought it back.
|
| |
|
| |
|
|
|
|
| |
Only increment depth if data_part != None.
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, every node in the DiffTree created it's own attachment.
Now they're consolidated into a single attachment per bug. higher
level nodes are still one attachment per node.
Also:
* added send_pgp_mime.append_text()
* pulled guess_encoding() out of send_pgp_mime.encodedMIMEText().
* renamed data_string -> data_part in libbe.diff, since it needn't be a string.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 makes it easier to compare recent revisions without a human
around to give you revision numbers.
|
| |\
| | |
| | |
| | | |
Also pulls "show referenced text" fix to "be comment".
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Other highlights:
* be show --no-comments
* Improved *.sync_with_disk.
* Improved be-mbox-to-xml.
|
| |\ \ \ |
|
| |\ \ \ \ |
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The previous procmail encoding fix failed, because the becommand
execution checks libbe.encoding.get_encoding() on it's own, and got
the procmail encoding. This one works.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Reminder from my initial libbe/encoding.py commit:
Because of the stdout replacement, the doctests executes now need an
optional 'test' argument to turn off replacement during the doctests,
otherwise doctest flips out (since it had set up stdout to catch
output, and then we clobbered it's setup).
I'm also trying to catch stdout/stderr from be-handle-mail, and I ran
into the same problem. It took me a bit to remember exactly what
"test" was supposed to do, so I thought I'd make the argument name
more specific. If you need other changes when running in "test" mode,
you'll have to add other kwargs.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
So user's don't get confused.
|
| |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It hadn't before, which defeats the Pu purpose of hook functions.
This hand't caused any problems though, since only libbe.bzr defined a
postcommit() and there were no precommit() definitions.
Bzr's postcommit() had been to auto-merge from the default merge
source. Yikes! Removed that ;).
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| |_|_|_|/
|/| | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Missed these earlier.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | | |
Previously many backends would silently add an empty commit. Not very
useful. When the new --allow-empty flag and related allow_empty
options are false, every versioning backend is guaranteed to raise the
EmptyCommit exception in the case of an attempted empty commit.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now we can commit changes from the command line with a unified
interface. The interface is much less flexible than using your
particular version control system's commit command directly, so this
command is mostly intended for user-interfaces and other tools that
don't want to be bothered with the extra flexibility.
Normalized spacing in rcs.RCS.commit to produce:
summary
<BLANKLINE>
body
<TRAILING-ENDLINE>
messages regardless of the input string format.
Also fixed a "--complete" handline bug in cmdutil, and some minor
docstring typos in libbe.rcs and .editor.
|