aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/tree.py
Commit message (Collapse)AuthorAgeFilesLines
* Initial directory restructuring to clarify dependenciesW. Trevor King2009-12-071-193/+0
|
* Add __eq__ and __ne__ methods to Tree.W. Trevor King2009-12-051-0/+6
| | | | | | | | | | | | | | | | | This fixes a bug introduced by revision-id: wking@drexel.edu-20091205034412-8apqxq8zqim48tf7 committer: W. Trevor King <wking@drexel.edu> timestamp: Fri 2009-12-04 22:44:12 -0500 message: Use __cmp__ instead of __eq__ for Tree comparison. When I made that commit, I'd forgotten that Tree inherits an __eq__ method from list, so it won't fall back to the __cmp__ method to determine equality. The new __eq__ and __ne__ methods use __cmp__ internally, so further subclasses (e.g. Comment) only need to override __cmp__. Of course, list also defines __ge__, __gt__, __le__, __lt__, ... which I don't bother with, so stay away from TreeA > TreeB and the like.
* Use __cmp__ instead of __eq__ for Tree comparison.W. Trevor King2009-12-041-2/+2
| | | | | | | | | | | | | | This ensures that __ne__ will also work, and makes it easier to subclass Tree. For example, in the previous implementation you could have >>> commA == commB False >>> cmp(commA, commB) 0 if the comments had different ids, but equivalent content. At the user-interface level, this removes some false "modified comments" from `be diff`.
* Added libbe.TESTING (defaults to False).W. Trevor King2009-12-031-2/+5
| | | | | | | | | | | | | | | | | | | | 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
* Ran the new update_copyright.pyW. Trevor King2009-11-191-1/+2
|
* Added docstrings to libbe submodules.W. Trevor King2009-08-311-0/+4
| | | | Also a few minor tweaks to the module imports.
* Added libbe.tree.Tree.has_descendant().W. Trevor King2009-07-231-0/+19
| | | | | | 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.
* libbe/tree.Tree.traverse(depthFirst)->depth_first & stripped trailing spaces.W. Trevor King2009-07-231-7/+7
|
* Updated GPLv2 to current GPLv2.W. Trevor King2009-07-141-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | Fixes Ben's bug 00f26f04-9202-4288-8744-b29abc2342d6. I also tweaked update_copyright.sh to make possible future copyright-blurb revision easier. The new algorithm is greedier, overwriting _all_ consecutive comments after a '^# Copyright' line, so do # Copyright # GPL ... GPL ... GPL # Your comment here... not # Copyright # GPL ... GPL ... GPL # # Your comment here... Without the blank line, your comment would get overwritten by the next run of update_copyright.sh. Note that catmutt is ignored by update_copyright.sh because Moritz Barsnick has only licensed his grepm code under the GPLv2 (not GPLv>=2). See the initial catmutt commit for details.
* Updated copyright blurbs and AUTHORS and included script for future updatesW. Trevor King2009-07-011-1/+1
|
* Oops, should be passing libbe.tree.Tree.sort() args to children. Fixed.W. Trevor King2008-11-251-1/+4
|
* Oops, these new submods are used by the new, classified Bug & BugDir.W. Trevor King2008-11-221-0/+158
I'd forgotten tell bzr...