# HG changeset patch # User Matt Mackall # Date 1429227008 18000 # Node ID 52628cd73d3e45163b69ed14a7cfbef86b0d9c7d # Parent 36993b52d01687e98e9bf44e18dbaf836337693f linkrev: fix issue with annotate of working copy The introrev was appearing as None in new annotate tests, which the code from the stable branch wasn't expecting. diff -r 36993b52d016 -r 52628cd73d3e mercurial/context.py --- a/mercurial/context.py Thu Apr 16 17:30:01 2015 -0500 +++ b/mercurial/context.py Thu Apr 16 18:30:08 2015 -0500 @@ -908,7 +908,7 @@ introrev = self.introrev() if self.rev() != introrev: base = self.filectx(self.filenode(), changeid=introrev) - if getattr(base, '_ancestrycontext', None) is None: + if introrev and getattr(base, '_ancestrycontext', None) is None: ac = self._repo.changelog.ancestors([introrev], inclusive=True) base._ancestrycontext = ac