comparison tests/test-hgweb-filelog.t @ 31992:3e47a40d7a7a

context: possibly yield initial fctx in blockdescendants() If initial 'fctx' has changes in line range with respect to its parents, we yield it first. This makes 'followlines(..., descend=True)' consistent with 'descendants()' revset which yields the starting revision. We reuse one iteration of blockancestors() which does exactly what we want. In test-annotate.t, adjust 'startrev' in one case to cover the situation where the starting revision does not touch specified line range.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Fri, 14 Apr 2017 14:25:06 +0200
parents 604d31507f86
children befefdd34cf8
comparison
equal deleted inserted replaced
31991:55987fc8aba1 31992:3e47a40d7a7a
1500 1500
1501 </body> 1501 </body>
1502 </html> 1502 </html>
1503 1503
1504 $ hg log -r 'followlines(c, 3:4, startrev=8, descend=True) and follow(c)' -p 1504 $ hg log -r 'followlines(c, 3:4, startrev=8, descend=True) and follow(c)' -p
1505 changeset: 8:5c6574614c37
1506 branch: a-branch
1507 user: test
1508 date: Thu Jan 01 00:00:00 1970 +0000
1509 summary: make c bigger and touch its beginning
1510
1511 diff -r 46c1a66bd8fc -r 5c6574614c37 c
1512 --- a/c Thu Jan 01 00:00:00 1970 +0000
1513 +++ b/c Thu Jan 01 00:00:00 1970 +0000
1514 @@ -1,2 +1,11 @@
1515 +0
1516 +0
1517 b
1518 -c
1519 +c+
1520 +
1521 +a
1522 +a
1523 +
1524 +d
1525 +e
1526 +f
1527
1505 changeset: 10:e95928d60479 1528 changeset: 10:e95928d60479
1506 branch: a-branch 1529 branch: a-branch
1507 user: test 1530 user: test
1508 date: Thu Jan 01 00:00:00 1970 +0000 1531 date: Thu Jan 01 00:00:00 1970 +0000
1509 summary: touch beginning of c 1532 summary: touch beginning of c
1627 <th class="author">author</th> 1650 <th class="author">author</th>
1628 <th class="description">description</th> 1651 <th class="description">description</th>
1629 </tr> 1652 </tr>
1630 </thead> 1653 </thead>
1631 <tbody class="stripes2"> 1654 <tbody class="stripes2">
1655 <tr>
1656 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
1657 <td class="author">test</td>
1658 <td class="description">
1659 <a href="/rev/5c6574614c37">make c bigger and touch its beginning</a>
1660 <span class="branchname">a-branch</span>
1661 </td>
1662 </tr>
1663
1632 <tr> 1664 <tr>
1633 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td> 1665 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
1634 <td class="author">test</td> 1666 <td class="author">test</td>
1635 <td class="description"> 1667 <td class="description">
1636 <a href="/rev/e95928d60479">touch beginning of c</a> 1668 <a href="/rev/e95928d60479">touch beginning of c</a>