/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/git/branch.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-05-18 20:50:10 UTC
  • mfrom: (6968.1.1 version-info-horizon)
  • Revision ID: breezy.the.bot@gmail.com-20180518205010-ozsv7xu743rsvn2t
Support 'brz version-info' in branches without a known revno.

Merged from https://code.launchpad.net/~jelmer/brz/version-info-horizon/+merge/345625

Show diffs side-by-side

added added

removed removed

Lines of Context:
614
614
    def _gen_revision_history(self):
615
615
        if self.head is None:
616
616
            return []
 
617
        last_revid = self.last_revision()
617
618
        graph = self.repository.get_graph()
618
 
        ret = list(graph.iter_lefthand_ancestry(self.last_revision(),
619
 
            (revision.NULL_REVISION, )))
 
619
        try:
 
620
            ret = list(graph.iter_lefthand_ancestry(last_revid,
 
621
                (revision.NULL_REVISION, )))
 
622
        except errors.RevisionNotPresent as e:
 
623
            raise errors.GhostRevisionsHaveNoRevno(last_revid, e.revision_id)
620
624
        ret.reverse()
621
625
        return ret
622
626