Added libbe/encoding.py to wrap input/output/file access appropriately.
authorW. Trevor King <wking@drexel.edu>
Tue, 25 Nov 2008 20:47:19 +0000 (15:47 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 25 Nov 2008 20:47:19 +0000 (15:47 -0500)
commit5699aef2a5741c5ffc24d9cb12d6bc9b085d484a
tree84ac8783ce2d1f9a28ba0bd0c256ae7179c68507
parented4d971d1375a692fbd3a394237f56e851bb5d0e
Added libbe/encoding.py to wrap input/output/file access appropriately.

I borrowed most of the code for this.

get_encoding() is from Trac
  http://trac.edgewall.org/browser/trunk/trac/util/datefmt.py
  format_datetime()
Trac has a BSD license
  http://trac.edgewall.org/wiki/TracLicense
I don't know if such a small snippet requires us to "reproduce the
above copyright" or where we need to reproduce it if it is needed.

The stdout/stdin replacement code follows
  http://wiki.python.org/moin/ShellRedirectionFails

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).

References:
  http://wiki.python.org/moin/Unicode
  http://www.amk.ca/python/howto/unicode
  http://www.python.org/dev/peps/pep-0100/

I also split libbe/editor.py off from libbe.utility.py and started
explaining the motivation for the BugDir init flags in it's docstring.
34 files changed:
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/comments/028d2e8d-5b0f-4c43-a913-35a1709b2276/body [new file with mode: 0644]
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/comments/028d2e8d-5b0f-4c43-a913-35a1709b2276/values [new file with mode: 0644]
.be/bugs/f7ccd916-b5c7-4890-a2e3-8c8ace17ae3a/values
be
becommands/assign.py
becommands/close.py
becommands/comment.py
becommands/diff.py
becommands/help.py
becommands/list.py
becommands/merge.py
becommands/new.py
becommands/open.py
becommands/remove.py
becommands/set.py
becommands/set_root.py
becommands/severity.py
becommands/show.py
becommands/status.py
becommands/target.py
libbe/arch.py
libbe/bug.py
libbe/bugdir.py
libbe/bzr.py
libbe/cmdutil.py
libbe/comment.py
libbe/config.py
libbe/diff.py
libbe/editor.py [new file with mode: 0644]
libbe/encoding.py [new file with mode: 0644]
libbe/git.py
libbe/hg.py
libbe/rcs.py
libbe/utility.py