Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 24776:52628cd73d3e
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.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 16 Apr 2015 18:30:08 -0500 |
parents | 36993b52d016 |
children | baa11dde8c0e |
comparison
equal
deleted
inserted
replaced
24775:36993b52d016 | 24776:52628cd73d3e |
---|---|
906 # use linkrev to find the first changeset where self appeared | 906 # use linkrev to find the first changeset where self appeared |
907 base = self | 907 base = self |
908 introrev = self.introrev() | 908 introrev = self.introrev() |
909 if self.rev() != introrev: | 909 if self.rev() != introrev: |
910 base = self.filectx(self.filenode(), changeid=introrev) | 910 base = self.filectx(self.filenode(), changeid=introrev) |
911 if getattr(base, '_ancestrycontext', None) is None: | 911 if introrev and getattr(base, '_ancestrycontext', None) is None: |
912 ac = self._repo.changelog.ancestors([introrev], inclusive=True) | 912 ac = self._repo.changelog.ancestors([introrev], inclusive=True) |
913 base._ancestrycontext = ac | 913 base._ancestrycontext = ac |
914 | 914 |
915 # This algorithm would prefer to be recursive, but Python is a | 915 # This algorithm would prefer to be recursive, but Python is a |
916 # bit recursion-hostile. Instead we do an iterative | 916 # bit recursion-hostile. Instead we do an iterative |