hgext3rd/topic/__init__.py
changeset 1958 62d5d4206840
parent 1952 665d6322994e
child 1963 7b7f073ed05e
equal deleted inserted replaced
1957:ea5553e47027 1958:62d5d4206840
    67         topic = repo.currenttopic
    67         topic = repo.currenttopic
    68         if not topic:
    68         if not topic:
    69             raise error.Abort(_('cannot resolve "%s": no active topic') % name)
    69             raise error.Abort(_('cannot resolve "%s": no active topic') % name)
    70         revs = list(stack.getstack(repo, topic))
    70         revs = list(stack.getstack(repo, topic))
    71         try:
    71         try:
    72             r = revs[idx]
    72             r = revs[idx - 1]
    73         except IndexError:
    73         except IndexError:
    74             msg = _('cannot resolve "%s": topic "%s" has only %d changesets')
    74             msg = _('cannot resolve "%s": topic "%s" has only %d changesets')
    75             raise error.Abort(msg % (name, topic, len(revs)))
    75             raise error.Abort(msg % (name, topic, len(revs)))
    76         return [repo[r].node()]
    76         return [repo[r].node()]
    77     return [ctx.node() for ctx in
    77     return [ctx.node() for ctx in