[MERGE] refactor of find_previous_heads from inventory to repository

Ian Clatworthy ian.clatworthy at internode.on.net
Mon Jul 2 02:07:24 BST 2007


John Arbash Meinel wrote:

> You seem to be refactoring a class-level function
> (InventoryEntry.find_previous_heads) into a Module level function
> (bzrlib.repository.find_previous_heads).

Yes, in hindsight, the patch probably wasn't ready for submission.

> Now, it turns out that you didn't get rid of IE.find_previous_heads, so an
> implementation still has the opportunity to override it at that level.

I left the old method in there only to keep all the tests passing. It
was only public in Repository.py because it was needed from Inventory
for this reason.

> But as I haven't been privy to the discussion you've had with Martin & Robert I
> may just be missing what you are trying to do.

And Rob and I were probably trying for slightly different things. My
focus has been on starting at the top and working downwards, moving
methods as I learnt more. This change was more a bottom up one where I
was looking to get complexity out of inventory.py and went further than
Rob wanted.

Ian C.



More information about the bazaar mailing list