Skip to content
Snippets Groups Projects
  • Denis Laxalde's avatar
    4c2c30bc
    context: follow all branches in blockdescendants() · 4c2c30bc
    Denis Laxalde authored
    In the initial implementation of blockdescendants (and thus followlines(...,
    descend=True) revset), only the first branch encountered in descending
    direction was followed.
    
    Update the algorithm so that all children of a revision ('x' in code) are
    considered. Accordingly, we need to prevent a child revision to be yielded
    multiple times when it gets visited through different path, so we skip 'i'
    when this occurs. Finally, since we now consider all parents of a possible
    child touching a given line range, we take care of yielding the child if it
    has a diff in specified line range with at least one of its parent (same logic
    as blockancestors()).
    4c2c30bc
    History
    context: follow all branches in blockdescendants()
    Denis Laxalde authored
    In the initial implementation of blockdescendants (and thus followlines(...,
    descend=True) revset), only the first branch encountered in descending
    direction was followed.
    
    Update the algorithm so that all children of a revision ('x' in code) are
    considered. Accordingly, we need to prevent a child revision to be yielded
    multiple times when it gets visited through different path, so we skip 'i'
    when this occurs. Finally, since we now consider all parents of a possible
    child touching a given line range, we take care of yielding the child if it
    has a diff in specified line range with at least one of its parent (same logic
    as blockancestors()).