aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Moved subscription types from becommands/subscribe.py to libbe/diff.py.W. Trevor King2009-12-053-73/+86
|
* Replaced `be diff` options --new, --removed, --modified, and --all with --uuids.W. Trevor King2009-12-051-22/+7
| | | | | | | We'll be adding a --subscribe option which will select the bugs/changes we're interested in, which deprecates the selection portion of the old options. The new --uuids just selects the "bug uuid" output over the default "change summary" output.
* `be diff` raises UsageError if required revision control not possible.W. Trevor King2009-12-051-34/+37
| | | | It had previously printed an message and exitted without error.
* 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.
* Merged `be diff --dir DIR` functionalityW. Trevor King2009-12-043-6/+21
|\
| * Updated NEWSW. Trevor King2009-12-041-0/+3
| |
| * Added --dir option to `be diff'.W. Trevor King2009-12-041-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Now you can compare two repositories: be -d branchA diff -d branchB or branchA$ be diff -d ../branchB which is helpful for VCSs like bzr that lack cross-branch revid visibility. Git users can still use branchA$ be diff REVID where REVID is a commit from any branch in the repo. This new functionality acts like a BE counterpart to `bzr missing DIR'.
| * Fixed removed comment listing in libbe/diff.py.W. Trevor King2009-12-041-2/+2
| | | | | | | | | | Previous implementation guaranteed to raise KeyErrors, because new bug doesn't contain the uuid.
* | Updated NEWSW. Trevor King2009-12-041-0/+10
|/
* 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`.
* Don't necessarily initialize a new VCS in BugDir.load_settings().W. Trevor King2009-12-031-2/+3
| | | | | | | | | | We may already have the right type, in which case, don't mess with it. This speeds up bugdir loading a bit more: $ time be list > /dev/null real 0m1.245s user 0m1.116s sys 0m0.124s
* Don't get VCS version in VCS.__init__().W. Trevor King2009-12-031-2/+6
| | | | | | | | | | | | | | | | | | Often, this just causes a slow subprocess.Popen() call to get information we woln't even look at. Old benchmark: $ time be list > /dev/null real 0m2.369s user 0m1.980s sys 0m0.388s New benchmark: $ time be list > /dev/null real 0m1.472s user 0m1.304s sys 0m0.164s
* Added libbe.TESTING (defaults to False).W. Trevor King2009-12-0326-1045/+1161
| | | | | | | | | | | | | | | | | | | | 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
* Added copyright blurbs to __init__.py files.W. Trevor King2009-12-032-0/+32
|
* Remove _test() functions from plugin.py and cmdutil.py.W. Trevor King2009-12-032-15/+0
| | | | | Testing should be handled through test.py, not by calling per-module _test() functions.
* Merged completed be.email-bugs branch.W. Trevor King2009-11-3013-112/+593
|\ | | | | | | | | | | | | | | | | | | Highlights: * import-xml now works as advertized in its longhelp string * new methods Bug.merge() and Comment.merge() * comment.list_to_root() is now Bug.add_comments() * BugDir.list_uuids() is now BugDir.uuids() * Bug.from_xml() now imports comments :p * test.py uses unittest.TestSuite 'suite' in becommands, if present.
| * Mark bug 565 as fixed: be email-bugs for bug submission from bzr-less usersW. Trevor King2009-11-301-1/+1
| |
| * be-handle-mail uses more conservative --add-only for be-bugs:xmlW. Trevor King2009-11-301-1/+1
| |
| * Generalized doctest string in subproc.pyW. Trevor King2009-11-301-1/+1
| |
| * Added some thoughts on import_xml merge algorithmsW. Trevor King2009-11-302-0/+39
| |
| * Fixed import_xml.py to live up to its longhelp description.W. Trevor King2009-11-301-27/+188
| | | | | | | | Also added LonghelpTestCase to prove it.
| * Avoid redundant Comment.alt_idsW. Trevor King2009-11-301-1/+3
| |
| * Changed Bug and Comment.merge() kwargs.W. Trevor King2009-11-302-25/+69
| | | | | | | | | | | | | | | | 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.
| * Minor BugDir docstring typo correction.W. Trevor King2009-11-301-1/+1
| |
| * Moved comment.list_to_root() to Bug.add_comments() with some cleanups.W. Trevor King2009-11-292-65/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Added comment import to Bug.from_xml().W. Trevor King2009-11-282-10/+93
| | | | | | | | | | | | | | | | | | | | | | 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.
| * test.py now uses unittest.TestSuite 'suite' in becommands if present.W. Trevor King2009-11-281-1/+4
| | | | | | | | | | | | Such 'suite' instances have been required for libbe submodules. This will allow becommands to test themselves more thoroughly than they could with only doctests.
| * BugDir.list_uuids() -> BugDir.uuids()W. Trevor King2009-11-284-9/+9
| |
| * Added Bug.merge() and Comment.merge().W. Trevor King2009-11-282-16/+185
| | | | | | | | | | | | | | | | | | 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().
* | Merged mostly completed `be email-bugs'.W. Trevor King2009-11-2145-478/+1340
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Highlights: * new be commands 'email-bugs' and 'import-xml' * standardized <be-xml> format for XML files. * new be-handle-mail interface '[be-bug:xml]' * restrict_file_access security patch * new subprocess handling submodule libbe.subproc * test.py adjusted to use an installed VCS for most tests. * assorted bugfixes Altered interfaces to the following be commands: * comment --xml tag gone, use import-xml. * show --xml xml format updated to <be-xml> format. Also adjusted be-mbox-to-xml and be-xml-to-mbox to handle new <be-xml> format and provide better handling of *.extra_strings.
| * Added restrict_file_access to becommands' execute() args.W. Trevor King2009-11-2126-27/+57
| | | | | | | | | | | | | | + associated adjustments in other files. See cmdutil.restrict_file_access.__doc__ for an explanation of the security hole this closes.
| * Fix libbe.vcs.VCS.get_file_contents(allow_no_vcs=True,binary=True).W. Trevor King2009-11-211-1/+8
| | | | | | | | | | | | | | | | In it's previous form it had ignored the binary option if self._use_vcs() returned False. Also added a few more details to the docstring, explaining the arguments.
| * Updated interfaces/email/interactive/README for [be-bug:xml] interfaceW. Trevor King2009-11-211-2/+13
| |
| * Added [be-tag:xml] processing to be-handle-mail.W. Trevor King2009-11-211-4/+25
| | | | | | | | | | Now it will automatically apply and commit emails from be email-bugs ...
| * Adjusted `be import-xml` to properly handle croot_bug==None.W. Trevor King2009-11-211-26/+31
| | | | | | | | | | | | If there aren't any root comments, then the user needn't specify --comment-root, in which case croot_bug will be None and we want to skip all the croot processing.
| * Fixed bug in be-handle-mail.Message.parse_comment() for emails w/o Message-id.W. Trevor King2009-11-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You used to get: Uncaught exception: 'NoneType' object has no attribute 'decode' File "./be-handle-mail", line 857, in main m.run() File "./be-handle-mail", line 591, in run command.run() File "./be-handle-mail", line 244, in run manipulate_encodings=False) File "/tmp/be.email-bugs/interfaces/email/interactive/libbe/cmdutil.py", line 82, in execute ret = cmd.execute([a.decode(enc) for a in args], A `print args' in Message.parse_comment() revealed [..., u'--alt-id', None,...]
| * Added interfaces/email/interactive/examples/email_bugsW. Trevor King2009-11-211-0/+37
| | | | | | | | For testing the new [be-bug:xml] interface we're about to write.
| * `be email-bugs` now uses `be show` internals to produce consistent XML.W. Trevor King2009-11-213-66/+78
| | | | | | | | | | | | | | | | Broke the bulk of show.py out into new function show.output(), which is used by both show.py and email_bugs.py to reduce duplication of effort and increase consistency of the XML. Also a few relevant help string updates.
| * Upgraded `be show --xml` to new <be-xml> format.W. Trevor King2009-11-213-55/+128
| |
| * Broke `be comment --xml` out and extended into `be import-xml`.W. Trevor King2009-11-2118-126/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
| * Added Bug.from_xml() + some .from_xml() fixups.W. Trevor King2009-11-203-72/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Import os in libbe.subproc if _POSIX == TrueW. Trevor King2009-11-201-0/+1
| |
| * Fix typo in becommands.init's doctestW. Trevor King2009-11-201-0/+1
| |
| * Import select in libbe.subproc if _POSIX == TrueW. Trevor King2009-11-201-0/+3
| |
| * Adjusted test.py to use an installed vcs by default.W. Trevor King2009-11-205-19/+30
| | | | | | | | | | | | | | | | | | Protects agaist the off chance that the user doesn't have Arch (tla) installed ;). Changed Arch.name from "Arch" to "arch" so that each VCSs .name matches the module name. This allows us to use vcs.VCS_ORDER (a list of module names) to set up the allowed values of BugDir.vcs_name.
| * Added becommands/email_bugs.pyW. Trevor King2009-11-201-0/+231
| | | | | | | | | | | | This send a list of bugs in a single email off to be processed by be-handle-mail. Of course, be-handle-mail doesn't yet handle the [be-bug:xml] format that email_bugs.py creates. On to that now...
| * Broke subprocess handling out into its own submodule libbe.subproc.W. Trevor King2009-11-206-186/+233
| |
| * Removed superfluous 'import time' from becommands/commit.py doctest.W. Trevor King2009-11-201-1/+1
| |
| * Created bug 56506b73-36cc-4e32-a578-258a219edba8 describing problemW. Trevor King2009-11-203-0/+43
| |
* | Fixed bug 529c290e-b1cf-4800-be7e-68f1ecb9565c (howto version BE).W. Trevor King2009-11-2013-1/+304
|/ | | | | Also appended some of the recent discussion about releases to the comment list.