Show More
@@ -792,6 +792,7 b' def filelog(repo, subset, x):' | |||
|
792 | 792 | backrevref = {} # final value for: changerev -> filerev |
|
793 | 793 | lowestchild = {} # lowest known filerev child of a filerev |
|
794 | 794 | delayed = [] # filerev with filtered linkrev, for post-processing |
|
795 | lowesthead = None # cache for manifest content of all head revisions | |
|
795 | 796 | fl = repo.file(f) |
|
796 | 797 | for fr in list(fl): |
|
797 | 798 | lkr = rev = fl.linkrev(fr) |
@@ -825,9 +826,24 b' def filelog(repo, subset, x):' | |||
|
825 | 826 | child = lowestchild.get(fr) |
|
826 | 827 | |
|
827 | 828 | if child is None: |
|
828 | # XXX content could be linkrev-shadowed in a head, but lets | |
|
829 | # ignore this case for now. | |
|
830 | continue | |
|
829 | # search for existence of this file revision in a head revision. | |
|
830 | # There are three possibilities: | |
|
831 | # - the revision exists in a head and we can find an | |
|
832 | # introduction from there, | |
|
833 | # - the revision does not exist in a head because it has been | |
|
834 | # changed since its introduction: we would have found a child | |
|
835 | # and be in the other 'else' clause, | |
|
836 | # - all versions of the revision are hidden. | |
|
837 | if lowesthead is None: | |
|
838 | lowesthead = {} | |
|
839 | for h in repo.heads(): | |
|
840 | fnode = repo[h].manifest()[f] | |
|
841 | lowesthead[fl.rev(fnode)] = h | |
|
842 | headrev = lowesthead.get(fr) | |
|
843 | if headrev is None: | |
|
844 | # content is nowhere unfiltered | |
|
845 | continue | |
|
846 | rev = repo[headrev][f].introrev() | |
|
831 | 847 | else: |
|
832 | 848 | # the lowest known child is a good upper bound |
|
833 | 849 | childcrev = backrevref[child] |
@@ -1725,4 +1725,22 b' Check that log on the file does not drop' | |||
|
1725 | 1725 | summary: content1 |
|
1726 | 1726 | |
|
1727 | 1727 | |
|
1728 | Even when a head revision is linkrev-shadowed. | |
|
1729 | ||
|
1730 | $ hg log -T '{node}\n' -r 4 | |
|
1731 | 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
|
1732 | $ hg debugobsolete 50b9b36e9c5df2c6fc6dcefa8ad0da929e84aed2 | |
|
1733 | $ hg log -G a | |
|
1734 | @ changeset: 3:15b2327059e5 | |
|
1735 | | tag: tip | |
|
1736 | | user: test | |
|
1737 | | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1738 | | summary: content2 | |
|
1739 | | | |
|
1740 | o changeset: 0:ae0a3c9f9e95 | |
|
1741 | user: test | |
|
1742 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
1743 | summary: content1 | |
|
1744 | ||
|
1745 | ||
|
1728 | 1746 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now