VersionedFile.walk deprecated?

Martin Pool mbp at sourcefrog.net
Tue Apr 11 04:07:43 BST 2006


On 11/04/2006, at 12:24 AM, Aaron Bentley wrote:
>
> VersionedFile.walk is deprecated, and
> iter_lines_added_or_present_in_versions is suggested as a replacement.
> This doesn't appear to be a complete replacement, because it doesn't
> include deletion information.
>
> Deleted lines behave very differently from never-present lines when
> performing a weave merge.  (Bram Cohen refers to the three states as
> "unborn", "living" and "killed", IIRC.)
>
> Is this deprecation warranted?

I don't think it should be considered generally deprecated.

iter_lines_added_or_present_in_versions was added so that the code  
that scans the inventory for changes was less weave-specific.

Knits can't provide exactly the same output as walk(), since they  
(intentionally) don't reference all the obsolete or killed lines.   
What they can give is an iteration of the lines still present in each  
side, and the annotation of when they came in.  So a line present on  
the left side can be judged to be either unborn, still living, or  
killed on the right side, and vice versa.

Hope that answers your question.

-- 
Martin







More information about the bazaar mailing list