aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/import_xml.py
Commit message (Collapse)AuthorAgeFilesLines
* Added libbe.TESTING (defaults to False).W. Trevor King2009-12-031-124/+128
| | | | | | | | | | | | | | | | | | | | 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
* Fixed import_xml.py to live up to its longhelp description.W. Trevor King2009-11-301-27/+188
| | | | Also added LonghelpTestCase to prove it.
* Added restrict_file_access to becommands' execute() args.W. Trevor King2009-11-211-1/+3
| | | | | | | + associated adjustments in other files. See cmdutil.restrict_file_access.__doc__ for an explanation of the security hole this closes.
* 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.
* `be email-bugs` now uses `be show` internals to produce consistent XML.W. Trevor King2009-11-211-1/+4
| | | | | | | | 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-211-6/+6
|
* Broke `be comment --xml` out and extended into `be import-xml`.W. Trevor King2009-11-211-0/+257
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.)