Fixed libbe.command.diff + ugly BugDir.duplicate_bugdir implementation
authorW. Trevor King <wking@drexel.edu>
Tue, 15 Dec 2009 11:44:20 +0000 (06:44 -0500)
committerW. Trevor King <wking@drexel.edu>
Tue, 15 Dec 2009 11:44:20 +0000 (06:44 -0500)
commit89b7a1411e4658e831f5d635534b24355dbb941d
tree77f84979931ac4bf8bcf14d293154fe29e8491bc
parent380889988b6d7881c4e0b5968053f85676d27211
Fixed libbe.command.diff + ugly BugDir.duplicate_bugdir implementation

duplicate_bugdir() works, but for the vcs backends, it could require
shelling out for _every_ file read.  This could, and probably will, be
horribly slow.  Still it works ;).

I'm not sure what a better implementation would be.  The old
implementation checked out the entire earlier state into a temporary
directory
  pros: single shell out, simple upgrade implementation
  cons: wouldn't work well for HTTP backens

I think a good solution would run along the lines of the currently
commented out code in duplicate_bugdir(), where a
  VersionedStorage.changed_since(revision)
call would give you a list of changed files.  diff could work off of
that directly, without the need to generate a whole duplicate bugdir.
I'm stuck on how to handle upgrades though...

Also removed trailing whitespace from all python files.
36 files changed:
libbe/bug.py
libbe/bugdir.py
libbe/command/base.py
libbe/command/commit.py
libbe/command/diff.py
libbe/command/html.py
libbe/command/import_xml.py
libbe/command/list.py
libbe/command/merge.py
libbe/command/set.py
libbe/command/severity.py
libbe/command/show.py
libbe/command/status.py
libbe/command/subscribe.py
libbe/command/tag.py
libbe/command/target.py
libbe/command/util.py
libbe/comment.py
libbe/diff.py
libbe/storage/base.py
libbe/storage/util/config.py
libbe/storage/util/mapfile.py
libbe/storage/util/settings_object.py
libbe/storage/util/upgrade.py
libbe/storage/vcs/arch.py
libbe/storage/vcs/base.py
libbe/storage/vcs/bzr.py
libbe/storage/vcs/darcs.py
libbe/storage/vcs/git.py
libbe/storage/vcs/hg.py
libbe/ui/command_line.py
libbe/util/encoding.py
libbe/util/id.py
libbe/util/plugin.py
libbe/util/subproc.py
libbe/util/utility.py