diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | cmds.py | 12 |
2 files changed, 14 insertions, 1 deletions
@@ -17,6 +17,9 @@ Features * New option --rewrite-tag-names for 'bzr fast-export'. (Alex Usov, #872601) +* New option --dont-squash-empty-commits for 'bzr fast-import-filter'. + (Alex Usov, #877303) + 0.11 2011-08-22 Bug fixes @@ -431,13 +431,23 @@ class cmd_fast_import_filter(Command): encoding_type = 'exact' def run(self, source=None, verbose=False, include_paths=None, exclude_paths=None, user_map=None, dont_squash_empty_commits=False): + from bzrlib.errors import BzrCommandError load_fastimport() from fastimport.processors import filter_processor params = { 'include_paths': include_paths, 'exclude_paths': exclude_paths, - 'squash_empty_commits': not dont_squash_empty_commits, } + if ('squash_empty_commits' in + filter_processor.FilterProcessor.known_params): + params['squash_empty_commits'] = (not dont_squash_empty_commits) + else: + if dont_squash_empty_commits: + raise BzrCommandError("installed python-fastimport does not " + "support not squashing empty commits. Please install " + " a newer python-fastimport to use " + "--dont-squash-empty-commits") + from fastimport import parser stream = _get_source_stream(source) user_mapper = _get_user_mapper(user_map) |