comparison mercurial/revset.py @ 23729:07a6faf939dc

revset-filelog: handle hidden linkrev for file missing for head (issue4490) The fix for linkrev pointing to hidden revision was crashing when the file was missing from head's manifest. We now properly handle this case. (yes I feel silly)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 06 Jan 2015 11:23:38 -0800
parents d944492445fa
children 3a4d8a6ce432
comparison
equal deleted inserted replaced
23728:31d3f973d079 23729:07a6faf939dc
835 # and be in the other 'else' clause, 835 # and be in the other 'else' clause,
836 # - all versions of the revision are hidden. 836 # - all versions of the revision are hidden.
837 if lowesthead is None: 837 if lowesthead is None:
838 lowesthead = {} 838 lowesthead = {}
839 for h in repo.heads(): 839 for h in repo.heads():
840 fnode = repo[h].manifest()[f] 840 fnode = repo[h].manifest().get(f)
841 lowesthead[fl.rev(fnode)] = h 841 if fnode is not None:
842 lowesthead[fl.rev(fnode)] = h
842 headrev = lowesthead.get(fr) 843 headrev = lowesthead.get(fr)
843 if headrev is None: 844 if headrev is None:
844 # content is nowhere unfiltered 845 # content is nowhere unfiltered
845 continue 846 continue
846 rev = repo[headrev][f].introrev() 847 rev = repo[headrev][f].introrev()