Merge lp:~jelmer/bzr-builddeb/location-alias-upstream into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: 651
Proposed branch: lp:~jelmer/bzr-builddeb/location-alias-upstream
Merge into: lp:bzr-builddeb
Diff against target: 36 lines (+18/-1)
1 file modified
__init__.py (+18/-1)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/location-alias-upstream
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+83737@code.launchpad.net

Description of the change

Register a ":upstream" location alias if bzr supports it.

This is an alias for the upstream branch location set in debian/bzr-builddeb.conf.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :
Revision history for this message
James Westby (james-w) wrote :

9 +from bzrlib.directory_service import (
10 + AliasDirectory,

Was that introduced recently enough that this will be a problem
on e.g. jubany for deployment?

Thanks,

James

review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On 12/02/2011 12:35 AM, James Westby wrote:
> Review: Approve
>
> 9 +from bzrlib.directory_service import (
> 10 + AliasDirectory,
>
> Was that introduced recently enough that this will be a problem
> on e.g. jubany for deployment?
No, AliasDirectory has been around for quite some time - bzr 1.6.

Cheers,

Jelmer

Revision history for this message
Vincent Ladeuil (vila) wrote :

> Was that introduced recently enough that this will be a problem on e.g. jubany for deployment?

For the record: jubany now runs bzr from source so no more worries about dependencies (well, far less at least).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '__init__.py'
--- __init__.py 2011-11-22 14:05:25 +0000
+++ __init__.py 2011-11-29 08:11:25 +0000
@@ -27,7 +27,10 @@
2727
28import bzrlib28import bzrlib
29from bzrlib.commands import plugin_cmds29from bzrlib.commands import plugin_cmds
30from bzrlib.directory_service import directories30from bzrlib.directory_service import (
31 AliasDirectory,
32 directories,
33 )
3134
32from info import (35from info import (
33 bzr_plugin_version as version_info,36 bzr_plugin_version as version_info,
@@ -69,6 +72,20 @@
69 'VcsDirectory',72 'VcsDirectory',
70 "Directory that uses Debian Vcs-* control fields to look up branches")73 "Directory that uses Debian Vcs-* control fields to look up branches")
7174
75branch_aliases = getattr(AliasDirectory, "branch_aliases", None)
76if branch_aliases is not None:
77 def upstream_branch_alias(b):
78 from bzrlib.plugins.builddeb.util import debuild_config
79 b.lock_read()
80 try:
81 tree = b.basis_tree()
82 config = debuild_config(tree, False)
83 return directories.dereference(config.upstream_branch)
84 finally:
85 b.unlock()
86 branch_aliases.register("upstream", upstream_branch_alias,
87 help="upstream branch (for packaging branches)")
88
7289
73def debian_changelog_commit_message(commit, start_message):90def debian_changelog_commit_message(commit, start_message):
74 if start_message is not None:91 if start_message is not None:

Subscribers

People subscribed via source and target branches