comparison tests/test-log.t @ 23719:34364a4b25eb

linkrev: work around linkrev to filtered entry in 'filelog' revset This revset is used by 'hg log FILENAME'. This prevent bugs when used on a repository with hidden revisions. Instead of just discarding file revisions whose linkrevs point to filtered revisions, we put them aside and post-process them trying to find a non-filtered introduction. See inline documentation for details about how it works. This only fixes some of the problems. Once again, more will be needed when we can cannot rely on child revisions of a file to find linkrev-shadowned revisions. A test is added for 'hg log' catching such cases.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 29 Dec 2014 17:23:16 -0800
parents c624fb2c4239
children 8ec03e0ef51a
comparison
equal deleted inserted replaced
23718:42908c3275c6 23719:34364a4b25eb
1671 o changeset: 0:ae0a3c9f9e95 1671 o changeset: 0:ae0a3c9f9e95
1672 user: test 1672 user: test
1673 date: Thu Jan 01 00:00:00 1970 +0000 1673 date: Thu Jan 01 00:00:00 1970 +0000
1674 summary: content1 1674 summary: content1
1675 1675
1676
1677 Test that we use the first non-hidden changeset in that case.
1678
1679 (hide the changeset)
1680
1681 $ hg log -T '{node}\n' -r 1
1682 2294ae80ad8447bc78383182eeac50cb049df623
1683 $ hg debugobsolete 2294ae80ad8447bc78383182eeac50cb049df623
1684 $ hg log -G
1685 o changeset: 4:50b9b36e9c5d
1686 | tag: tip
1687 | user: test
1688 | date: Thu Jan 01 00:00:00 1970 +0000
1689 | summary: content3
1690 |
1691 @ changeset: 3:15b2327059e5
1692 | user: test
1693 | date: Thu Jan 01 00:00:00 1970 +0000
1694 | summary: content2
1695 |
1696 o changeset: 2:2029acd1168c
1697 | parent: 0:ae0a3c9f9e95
1698 | user: test
1699 | date: Thu Jan 01 00:00:00 1970 +0000
1700 | summary: unrelated
1701 |
1702 o changeset: 0:ae0a3c9f9e95
1703 user: test
1704 date: Thu Jan 01 00:00:00 1970 +0000
1705 summary: content1
1706
1707
1708 Check that log on the file does not drop the file revision.
1709
1710 $ hg log -G a
1711 o changeset: 4:50b9b36e9c5d
1712 | tag: tip
1713 | user: test
1714 | date: Thu Jan 01 00:00:00 1970 +0000
1715 | summary: content3
1716 |
1717 @ changeset: 3:15b2327059e5
1718 | user: test
1719 | date: Thu Jan 01 00:00:00 1970 +0000
1720 | summary: content2
1721 |
1722 o changeset: 0:ae0a3c9f9e95
1723 user: test
1724 date: Thu Jan 01 00:00:00 1970 +0000
1725 summary: content1
1726
1727
1676 $ cd .. 1728 $ cd ..