summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Usov <oleksandr.usov@tibra.com>2011-10-20 19:16:36 +0100
committerOleksandr Usov <oleksandr.usov@tibra.com>2011-10-20 19:16:36 +0100
commit5052e8f8a27c1c302f0914e6aad6c4e8377bd9bc (patch)
tree7c7aad527144607e8ea2691414fa2876a23ff519
parent312db166607189c3375a0eac42cf5d721804cdbc (diff)
downloadbzr-fastimport-5052e8f8a27c1c302f0914e6aad6c4e8377bd9bc.tar.gz
Add preserve_all_history flag fast-import-filter
-rw-r--r--cmds.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/cmds.py b/cmds.py
index d5aedd6..8b9ef13 100644
--- a/cmds.py
+++ b/cmds.py
@@ -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)