[MERGE][bug #300177] Pass compression_parent as part of 'get_record_stream'
Ian Clatworthy
ian.clatworthy at internode.on.net
Mon Jan 5 08:27:23 GMT 2009
John Arbash Meinel wrote:
> The attached patch does 2 basic things:
>
> 1) Changes the api so that the records (ContentFactory objects) from
> get_record_stream have a member called "compression_parents".
>
> 2) Change insert_record_stream to use the compression_parents field, and
> take appropriate action.
>
>
> I went for the plural form, because it doesn't require a code change if
> we ever do multi-parent deltas.
I'm no expert at this level so I need a few questions answered before
I can vote tweak/approve.
bb:comment
> + # if c_parent is not None and c_parent != parents[0]:
> + # raise AssertionError('Kndx files do not support'
> + # ' non-left-hand compression parents.')
Did you mean to leave this commented out? Or implement that logic?
> + # This indexs supports only a single compression parent, and it must be
> + # one of the direct parents (for now)
> + if len(compression_parents) > 1 or len(parents) < 1:
> + return False
> + # XXX: restore this to allow pack compression parents to be
> + # non-left-hand
> + # if compression_parents[0] in parents:
> + if compression_parents[0] == parents[0]:
> + return True
> + return False
Can you add some 'when' information to the XXX comment please?
More information about the bazaar
mailing list