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

  • Committer: Aaron Bentley
  • Date: 2007-04-12 12:20:29 UTC
  • mto: (2520.4.1 bzr.mpbundle)
  • mto: This revision was merged to the branch mainline in revision 2631.
  • Revision ID: aaron.bentley@utoronto.ca-20070412122029-bnprn1pweeegnph3
Add some snapshot-selection crack

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
            else:
235
235
                parent_lines = self.get_line_list(parent_ids)
236
236
            diff = MultiParent.from_lines(lines, parent_lines)
 
237
            if (''.join(diff.to_patch())) > ''.join(lines):
 
238
                print >> sys.stderr, "forcing snapshot"
 
239
                diff = MultiParent([NewText(lines)])
237
240
        self.add_diff(diff, version_id, parent_ids)
238
241
        self._lines[version_id] = lines
239
242
 
309
312
                    if max_distance + 1 > self.snapshot_interval:
310
313
                        snapshots.add(version_id)
311
314
                        distances[version_id] = 0
 
315
                    elif len(descendants) > 1 and max_distance > \
 
316
                        self.snapshot_interval -4 and False:
 
317
                        snapshots.add(version_id)
 
318
                        distances[version_id] = 0
312
319
                    else:
313
320
                        distances[version_id] = max_distance + 1
314
321
            cur = next