Merge lp:~jelmer/bzr-builder/git-bp-compat into lp:bzr-builder

Proposed by Jelmer Vernooij on 2012-03-25
Status: Merged
Approved by: James Westby on 2012-03-26
Approved revision: 166
Merged at revision: 167
Proposed branch: lp:~jelmer/bzr-builder/git-bp-compat
Merge into: lp:bzr-builder
Diff against target: 22 lines (+10/-2)
1 file modified
deb_util.py (+10/-2)
To merge this branch: bzr merge lp:~jelmer/bzr-builder/git-bp-compat
Reviewer Review Type Date Requested Status
James Westby 2012-03-25 Approve on 2012-03-26
Review via email: mp+99203@code.launchpad.net

Description of the change

Support the git-buildpackage syntax for upstream version tags: "upstream/FOO" rather than "upstream-FOO".

This makes daily builds of packages imported from git a bit easier.

To post a comment you must log in.
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'deb_util.py'
2--- deb_util.py 2011-12-15 17:08:16 +0000
3+++ deb_util.py 2012-03-25 11:00:24 +0000
4@@ -112,8 +112,16 @@
5 :param version: Package version
6 :param dest_dir: Destination directory
7 """
8- tag_name = "upstream-%s" % version
9- revid = branch.tags.lookup_tag(tag_name)
10+ tag_names = ["upstream-%s" % version, "upstream/%s" % version]
11+ for tag_name in tag_names:
12+ try:
13+ revid = branch.tags.lookup_tag(tag_name)
14+ except errors.NoSuchTag:
15+ pass
16+ else:
17+ break
18+ else:
19+ raise errors.NoSuchTag(tag_names[0])
20 tree = branch.repository.revision_tree(revid)
21 rev = branch.repository.get_revision(revid)
22 if 'deb-pristine-delta' in rev.properties:

Subscribers

People subscribed via source and target branches