def headrevs(self):
        count = len(self)
        if not count:
            return [nullrev]
        ishead = [1] * (count + 1)
        index = self.index
        for r in xrange(count):
            e = index[r]
            ishead[e[5]] = ishead[e[6]] = 0
        return [r for r in xrange(count) if ishead[r]]