Merge lp:~a-s-usov/bzr-fastimport/fast-import-filter-fixes into lp:bzr-fastimport

Proposed by Alex Usov
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 339
Merged at revision: 338
Proposed branch: lp:~a-s-usov/bzr-fastimport/fast-import-filter-fixes
Merge into: lp:bzr-fastimport
Diff against target: 40 lines (+14/-1)
1 file modified
cmds.py (+14/-1)
To merge this branch: bzr merge lp:~a-s-usov/bzr-fastimport/fast-import-filter-fixes
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+80035@code.launchpad.net

This proposal supersedes a proposal from 2011-10-20.

Description of the change

Flag renamed

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Posted in a previous version of this proposal

As in the python-fastimport merge proposal, I think saying that the option "preserves all history" is misleading. History is still changed, just not as aggressively as it is without the option.

Perhaps --dont-squash-empty-commits would be a better name.

> + help="Preserve all commits and links between them"
This lacks a dot at the end of the line.

Revision history for this message
Jelmer Vernooij (jelmer) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks, this looks good now. I'll merge with a few tweaks to the description.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmds.py'
2--- cmds.py 2011-10-17 15:41:16 +0000
3+++ cmds.py 2011-10-21 09:41:26 +0000
4@@ -387,6 +387,15 @@
5 User mapping is supported by both the fast-import and
6 fast-import-filter commands.
7
8+ :History rewriting:
9+
10+ By default fast-import-filter does quite aggressive history rewriting.
11+ Empty commits (or commits which had all their content filtered out) will
12+ be removed, and so are the references to commits not included in the stream.
13+
14+ Flag --dont-squash-empty-commits reverses this behavior and makes it possible to
15+ use fast-import-filter on incremental streams.
16+
17 :Examples:
18
19 Create a new project from a library (note the trailing / on the
20@@ -415,15 +424,19 @@
21 Option('user-map', type=str,
22 help="Path to file containing a map of user-ids.",
23 ),
24+ Option('dont-squash-empty-commits',
25+ help="Preserve all commits and links between them"
26+ ),
27 ]
28 encoding_type = 'exact'
29 def run(self, source=None, verbose=False, include_paths=None,
30- exclude_paths=None, user_map=None):
31+ exclude_paths=None, user_map=None, dont_squash_empty_commits=False):
32 load_fastimport()
33 from fastimport.processors import filter_processor
34 params = {
35 'include_paths': include_paths,
36 'exclude_paths': exclude_paths,
37+ 'squash_empty_commits': not dont_squash_empty_commits,
38 }
39 from fastimport import parser
40 stream = _get_source_stream(source)

Subscribers

People subscribed via source and target branches