~ubuntu-branches/debian/sid/bzr-builddeb/sid

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij, Jelmer Vernooij, Jonathan Riddell, Scott Kitterman
  • Date: 2011-07-15 12:15:22 UTC
  • Revision ID: james.westby@ubuntu.com-20110715121522-avtc0uc3uuzcg7zn
Tags: 2.7.5
[ Jelmer Vernooij ]
* New 'bzr dep3-patch' subcommand that can generate DEP-3 compliant
  patches. LP: #460576

[ Jonathan Riddell ]
* Use new set_commit_message() hook in bzr to set the commit
  message from debian/changelog and set fixed bugs in tags. LP: #707274

[ Jelmer Vernooij ]
* Add dependency on devscripts >= 2.10.59, required now that 'dch --
  package' is used. LP: #783122
* Fix support for native packages with dashes in their version in
  sources.list. LP: #796853
* Fix deprecation warnings for TestCase.failUnlessExists and
  TestCase.failIfExists in bzr 2.4.

[ Scott Kitterman ]
* Delete debian/bzr-builddeb.dirs so the long obsolete and empty
  /usr/lib/python2.4/site-packages/bzrlib/plugins/bzr-builddeb/ is no
  longer created. Closes: #631564

[ Jelmer Vernooij ]
* Add support for xz and lzma tarballs. LP: #553668
* When importing upstream component tarballs, don't repack bz2/lzma
  tarballs to gz if the package is in v3 source format. LP: #810531

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
commands = {
38
38
        "bd_do": [],
39
39
        "builddeb": ["bd"],
 
40
        "dep3_patch": [],
40
41
        "dh_make": ["dh_make"],
41
42
        "import_dsc": [],
42
43
        "import_upstream": [],
61
62
default_result_dir = '..'
62
63
 
63
64
 
64
 
directories.register_lazy("apt:", 'bzrlib.plugins.builddeb.directory', 
65
 
        'VcsDirectory', 
 
65
directories.register_lazy("apt:", 'bzrlib.plugins.builddeb.directory',
 
66
        'VcsDirectory',
66
67
        "Directory that uses Debian Vcs-* control fields to look up branches")
67
68
 
68
69
 
109
110
    return "".join(changes)
110
111
 
111
112
 
 
113
def debian_changelog_commit(commit, start_message):
 
114
    """hooked into bzrlib.msgeditor set_commit_message.
 
115
     Set the commit message from debian/changelog and set any LP: #1234 to bug
 
116
     fixed tags."""
 
117
    from bzrlib.plugins.builddeb.util import find_bugs_fixed
 
118
 
 
119
    changes = debian_changelog_commit_message(commit, start_message)
 
120
    if changes is None:
 
121
        return None
 
122
 
 
123
    bugs_fixed = find_bugs_fixed([changes], commit.work_tree.branch)
 
124
    commit.builder._revprops["bugs"] = "\n".join(bugs_fixed)
 
125
 
 
126
    return debian_changelog_commit_message(commit, start_message)
 
127
 
 
128
 
112
129
def changelog_merge_hook_factory(merger):
113
130
    from bzrlib.plugins.builddeb import merge_changelog
114
131
    return merge_changelog.ChangeLogFileMerge(merger)
169
186
            debian_changelog_commit_message,
170
187
            "Use changes documented in debian/changelog to suggest "
171
188
            "the commit message")
 
189
    if bzrlib.version_info[0] >= 2 and bzrlib.version_info[1] >= 4:
 
190
        install_lazy_named_hook(
 
191
            "bzrlib.msgeditor", "hooks", "set_commit_message",
 
192
                debian_changelog_commit,
 
193
                "Use changes documented in debian/changelog to set "
 
194
                "the commit message and bugs fixed")
172
195
    install_lazy_named_hook(
173
196
        "bzrlib.merge", "Merger.hooks",
174
197
        'merge_file_content', changelog_merge_hook_factory,