/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to cmds.py

  • Committer: Oleksandr Usov
  • Date: 2011-10-21 09:37:53 UTC
  • mto: (0.64.338 trunk)
  • mto: This revision was merged to the branch mainline in revision 6631.
  • Revision ID: oleksandr.usov@tibra.com-20111021093753-fl7imxi4ktm4uvxn
Command-line flag renamed to --dont-squash-empty-commits

Show diffs side-by-side

added added

removed removed

Lines of Context:
393
393
     Empty commits (or commits which had all their content filtered out) will
394
394
     be removed, and so are the references to commits not included in the stream.
395
395
 
396
 
     Flag --preserve-all-history reverses this behavior and makes it possible to
 
396
     Flag --dont-squash-empty-commits reverses this behavior and makes it possible to
397
397
     use fast-import-filter on incremental streams.
398
398
 
399
399
    :Examples:
424
424
                    Option('user-map', type=str,
425
425
                        help="Path to file containing a map of user-ids.",
426
426
                        ),
427
 
                    Option('preserve-all-history',
 
427
                    Option('dont-squash-empty-commits',
428
428
                        help="Preserve all commits and links between them"
429
429
                        ),
430
430
                     ]
431
431
    encoding_type = 'exact'
432
432
    def run(self, source=None, verbose=False, include_paths=None,
433
 
        exclude_paths=None, user_map=None, preserve_all_history=False):
 
433
        exclude_paths=None, user_map=None, dont_squash_empty_commits=False):
434
434
        load_fastimport()
435
435
        from fastimport.processors import filter_processor
436
436
        params = {
437
437
            'include_paths': include_paths,
438
438
            'exclude_paths': exclude_paths,
439
 
            'preserve_all_history': preserve_all_history
 
439
            'squash_empty_commits': not dont_squash_empty_commits,
440
440
            }
441
441
        from fastimport import parser
442
442
        stream = _get_source_stream(source)