[MERGE] pybaz: sanitize patch logs for more tla quirks

Martin Pool mbp at sourcefrog.net
Fri May 5 06:28:20 BST 2006


On 26 Apr 2006, Robert Collins <robertc at robertcollins.net> wrote:
> On Tue, 2006-04-25 at 14:56 +0200, David Allouche wrote:
> > On Tue, 2006-04-25 at 20:26 +1000, Anand Kumria wrote:
> > Something simpler could addresses all my non-regression concerns: just
> > ignore invalid headers.
> > 
> > Independently, raise on multiple matching headers because we cannot
> > decide what to return, and it's critical to bzr data consistency to be
> > consistent with what other baz-import runs would have produced.
> > 
> > Robert how does that one sound to you?

I'm not as familiar as Robert and David are with arch quirks.  Either
raising an exception or taking one of them sounds reasonable to me.  

Perhaps for the moment it would be best to raise an exception, so that
attention is drawn to any real cases where the problem occurs.  If there
are none, great.  If we do find some examples we can decide what to do
with more evidence.

> I don't think we should raise on dups: rather check the tla code to see
> which one it honours when reading the logs, and use that logic.
> 
> IIRC its a loop from top to bottom over the headers inserting into a
> hash table. I think it takes the last one always, so duplicating that
> will work no worse than arch.

However, that is precisely the opposite of what email.Message has
previously done, as far as I can see.  Won't this mean that imports of
such problematic logs using the fixed importer will differ from previous
imports?

-- 
Martin




More information about the bazaar mailing list