Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/revset.py Thu Nov 27 02:04:30 2014 +0100 +++ b/mercurial/revset.py Tue Jan 06 11:23:38 2015 -0800 @@ -837,8 +837,9 @@ if lowesthead is None: lowesthead = {} for h in repo.heads(): - fnode = repo[h].manifest()[f] - lowesthead[fl.rev(fnode)] = h + fnode = repo[h].manifest().get(f) + if fnode is not None: + lowesthead[fl.rev(fnode)] = h headrev = lowesthead.get(fr) if headrev is None: # content is nowhere unfiltered