/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 __init__.py

  • Committer: Pieter de Bie
  • Date: 2008-06-04 20:21:39 UTC
  • mto: (0.64.82 fastimport_trunk)
  • mto: This revision was merged to the branch mainline in revision 6631.
  • Revision ID: pdebie@ai.rug.nl-20080604202139-tz639171b55udfxp
Add importing and exporting of marks to bzr-fastimport

This extends the GenericProcessor to be able to import and export revision
marks. This is useful when you want to do an incremental import of another
repository without rerunning the whole import all the time.

The file format used for the marks is the same as in bzr-fast-export. By
sharing each other's marks files, it is possible to set up a bidirectional
gateway with another repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
                    Option('experimental',
143
143
                        help="Enable experimental features.",
144
144
                        ),
 
145
                    Option('import-marks', type=str,
 
146
                        help="Import marks from file"),
 
147
                    Option('export-marks', type=str,
 
148
                        help="Export marks to file"),
145
149
                     ]
146
150
    aliases = []
147
151
    def run(self, source, verbose=False, info=None, trees=False,
148
 
        checkpoint=10000, count=-1, inv_cache=10, experimental=True):
 
152
        checkpoint=10000, count=-1, inv_cache=10, experimental=True,
 
153
        import_marks= None, export_marks = None):
149
154
        from bzrlib import bzrdir
150
155
        from bzrlib.plugins.fastimport.processors import generic_processor
151
156
        control, relpath = bzrdir.BzrDir.open_containing('.')
156
161
            'count': count,
157
162
            'inv-cache': inv_cache,
158
163
            'experimental': experimental,
 
164
            'import-marks': import_marks,
 
165
            'export-marks': export_marks,
159
166
            }
160
167
        return _run(source, generic_processor.GenericProcessor, control,
161
168
            params, verbose)