~wgrant/bzr-builder/bug-1350430

« back to all changes in this revision

Viewing changes to deb_util.py

  • Committer: Jelmer Vernooij
  • Date: 2012-03-25 10:58:32 UTC
  • mto: This revision was merged to the branch mainline in revision 167.
  • Revision ID: jelmer@samba.org-20120325105832-f36sjz6ioe57xxdm
Support git-buildpackage tag syntax for upstream packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
    :param version: Package version
113
113
    :param dest_dir: Destination directory
114
114
    """
115
 
    tag_name = "upstream-%s" % version
116
 
    revid = branch.tags.lookup_tag(tag_name)
 
115
    tag_names = ["upstream-%s" % version, "upstream/%s" % version]
 
116
    for tag_name in tag_names:
 
117
        try:
 
118
            revid = branch.tags.lookup_tag(tag_name)
 
119
        except errors.NoSuchTag:
 
120
            pass
 
121
        else:
 
122
            break
 
123
    else:
 
124
        raise errors.NoSuchTag(tag_names[0])
117
125
    tree = branch.repository.revision_tree(revid)
118
126
    rev = branch.repository.get_revision(revid)
119
127
    if 'deb-pristine-delta' in rev.properties: