~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/versionedfile.py

  • Committer: Robert Collins
  • Date: 2006-03-06 12:11:25 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060306121125-4f05992d44e3bda8
Convert Knit repositories to use knits.

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
    def annotate(self, version_id):
171
171
        return list(self.annotate_iter(version_id))
172
172
 
173
 
    def join(self, other, pb=None, msg=None, version_ids=None):
 
173
    def join(self, other, pb=None, msg=None, version_ids=None,
 
174
             ignore_missing=False):
174
175
        """Integrate versions from other into this versioned file.
175
176
 
176
177
        If version_ids is None all versions from other should be
177
178
        incorporated into this versioned file.
178
179
 
179
180
        Must raise RevisionNotPresent if any of the specified versions
180
 
        are not present in the other files history."""
181
 
        return InterVersionedFile.get(other, self).join(pb, msg, version_ids)
 
181
        are not present in the other files history unless ignore_missing
 
182
        is supplied when they are silently skipped.
 
183
        """
 
184
        return InterVersionedFile.get(other, self).join(
 
185
            pb,
 
186
            msg,
 
187
            version_ids,
 
188
            ignore_missing)
182
189
 
183
190
    def walk(self, version_ids=None):
184
191
        """Walk the versioned file as a weave-like structure, for
312
319
    _optimisers = set()
313
320
    """The available optimised InterVersionedFile types."""
314
321
 
315
 
    def join(self, pb=None, msg=None, version_ids=None):
 
322
    def join(self, pb=None, msg=None, version_ids=None, ignore_missing=False):
316
323
        """Integrate versions from self.source into self.target.
317
324
 
318
325
        If version_ids is None all versions from source should be
319
326
        incorporated into this versioned file.
320
327
 
321
328
        Must raise RevisionNotPresent if any of the specified versions
322
 
        are not present in the other files history.
 
329
        are not present in the other files history unless ignore_missing is 
 
330
        supplied when they are silently skipped.
323
331
        """
324
332
        # the default join: 
325
333
        # - make a temporary versioned file of type target
335
343
                                  self.source.get_lines(version))
336
344
        
337
345
        # this should hit the native code path for target
338
 
        return self.target.join(temp_source, pb, msg, version_ids)
 
346
        return self.target.join(temp_source,
 
347
                                pb,
 
348
                                msg,
 
349
                                version_ids,
 
350
                                ignore_missing)
339
351
 
340
352
 
341
353
class InterVersionedFileTestProviderAdapter(object):