diff options
author | Oleksandr Usov <oleksandr.usov@tibra.com> | 2011-10-20 19:16:36 +0100 |
---|---|---|
committer | Oleksandr Usov <oleksandr.usov@tibra.com> | 2011-10-20 19:16:36 +0100 |
commit | 5052e8f8a27c1c302f0914e6aad6c4e8377bd9bc (patch) | |
tree | 7c7aad527144607e8ea2691414fa2876a23ff519 | |
parent | 312db166607189c3375a0eac42cf5d721804cdbc (diff) | |
download | bzr-fastimport-5052e8f8a27c1c302f0914e6aad6c4e8377bd9bc.tar.gz |
Add preserve_all_history flag fast-import-filter
-rw-r--r-- | cmds.py | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -387,6 +387,15 @@ class cmd_fast_import_filter(Command): User mapping is supported by both the fast-import and fast-import-filter commands. + :History rewriting: + + By default fast-import-filter does quite aggressive history rewriting. + Empty commits (or commits which had all their content filtered out) will + be removed, and so are the references to commits not included in the stream. + + Flag --preserve-all-history reverses this behavior and makes it possible to + use fast-import-filter on incremental streams. + :Examples: Create a new project from a library (note the trailing / on the @@ -415,15 +424,19 @@ class cmd_fast_import_filter(Command): Option('user-map', type=str, help="Path to file containing a map of user-ids.", ), + Option('preserve-all-history', + help="Preserve all commits and links between them" + ), ] encoding_type = 'exact' def run(self, source=None, verbose=False, include_paths=None, - exclude_paths=None, user_map=None): + exclude_paths=None, user_map=None, preserve_all_history=False): load_fastimport() from fastimport.processors import filter_processor params = { 'include_paths': include_paths, 'exclude_paths': exclude_paths, + 'preserve_all_history': preserve_all_history } from fastimport import parser stream = _get_source_stream(source) |