diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-15 06:44:20 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-15 06:44:20 -0500 |
commit | 89b7a1411e4658e831f5d635534b24355dbb941d (patch) | |
tree | 77f84979931ac4bf8bcf14d293154fe29e8491bc /libbe/command/base.py | |
parent | 380889988b6d7881c4e0b5968053f85676d27211 (diff) | |
download | bugseverywhere-89b7a1411e4658e831f5d635534b24355dbb941d.tar.gz |
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.
Diffstat (limited to 'libbe/command/base.py')
-rw-r--r-- | libbe/command/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbe/command/base.py b/libbe/command/base.py index 9f50632..6a49413 100644 --- a/libbe/command/base.py +++ b/libbe/command/base.py @@ -263,7 +263,7 @@ class Command (object): self.stdout = codecs.getwriter(output_encoding)(sys.stdout) self.stdout.encoding = output_encoding - def help(self, *args): + def help(self, *args): return '\n\n'.join([self._usage(), self._option_help(), self._long_help().rstrip('\n')]) @@ -345,7 +345,7 @@ class Command (object): def _get_storage(self): """ Callback for use by commands that need it. - + Note that with the current implementation, _get_unconnected_storage() will not work after this method runs, but that shouldn't be an issue for any command I can |