~ubuntu-branches/ubuntu/natty/bzr-builddeb/natty-proposed

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij, James Westby, Jelmer Vernooij
  • Date: 2010-02-13 00:44:03 UTC
  • mfrom: (6.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100213004403-9ug5ihttyyomebf6
Tags: 2.3
[ James Westby ]
* Some support for v3 source formats (Closes: #562991)
  - Those that look quite a lot like v1 are supported well.
  - .tar.bz2 tarballs are supported for import, building, merge-upstream,
    etc., but only enabled for the latter with a --v3 switch for now.
  - Multiple orig.tar.gz is not supported.
  - .tar.lzma is not supported awaiting pristine-tar support.
* New "dh-make" command ("dh_make" alias) that allows you to start
  packaging, either in an empty branch, or based on an upstream branch.
* Fix merge-package for native packages (LP: #476348)
* debian/changelog merge hook to reduce the manual conflict resolution
  required there. Thanks to John Arbash Meinel and Andrew Bennetts
  (LP: #501754).
  - Requires newer bzr.
* Fix merge-package outside a shared repo (LP: #493462)
* Fix exporting of symlinks (LP: #364671)
* Add --force option to merge-upstream which may help certain people.
* Use system configobj if the bzr copy isn't available. Thanks Jelmer.
* Make merging multiple-root branches work. Thanks Robert Collins.
* Disentangle from bzrtools. Thanks Max Bowser.

[ Jelmer Vernooij ]
* Bump standards version to 3.8.4.
* Fix formatting in doc-base.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import os
27
27
 
28
 
from bzrlib import msgeditor
 
28
import bzrlib
 
29
from bzrlib import (
 
30
    merge,
 
31
    msgeditor,
 
32
    )
29
33
from bzrlib.commands import plugin_cmds
30
34
from bzrlib.directory_service import directories
31
35
 
33
37
    bzr_plugin_version as version_info,
34
38
    )
35
39
 
 
40
 
 
41
if getattr(merge, 'ConfigurableFileMerger', None) is None:
 
42
    raise ImportError(
 
43
        'need at least bzr 2.1.0rc2 (you use %r)', bzrlib.version_info)
 
44
else:
 
45
    def changelog_merge_hook_factory(merger):
 
46
        from bzrlib.plugins.builddeb import merge_changelog
 
47
        return merge_changelog.ChangeLogFileMerge(merger)
 
48
 
 
49
    merge.Merger.hooks.install_named_hook(
 
50
        'merge_file_content', changelog_merge_hook_factory,
 
51
        'Debian Changelog file merge')
 
52
 
 
53
 
36
54
commands = {
37
 
        "test_builddeb": [],
 
55
        "bd_do": [],
38
56
        "builddeb": ["bd"],
39
 
        "merge_upstream": ["mu"],
 
57
        "dh_make": ["dh_make"],
40
58
        "import_dsc": [],
41
 
        "bd_do": [],
42
59
        "mark_uploaded": [],
43
60
        "merge_package": [],
 
61
        "merge_upstream": ["mu"],
44
62
        }
45
63
 
46
64
for command, aliases in commands.iteritems():
113
131
 
114
132
try:
115
133
    from bzrlib.revisionspec import revspec_registry
116
 
    revspec_registry.register_lazy("package:", "bzrlib.plugins.builddeb.revspec", "RevisionSpec_package")
 
134
    revspec_registry.register_lazy("package:",
 
135
        "bzrlib.plugins.builddeb.revspec", "RevisionSpec_package")
117
136
except ImportError:
118
137
    from bzrlib.revisionspec import SPEC_TYPES
119
138
    from bzrlib.plugins.builddeb.revspec import RevisionSpec_package
120
139
    SPEC_TYPES.append(RevisionSpec_package)
121
140
 
122
141
 
123
 
def test_suite():
124
 
    from unittest import TestSuite
125
 
    from bzrlib.plugins.builddeb import tests
126
 
    result = TestSuite()
127
 
    result.addTest(tests.test_suite())
128
 
    return result
129
 
 
130
 
 
131
 
if __name__ == '__main__':
132
 
    print ("This is a Bazaar plugin. Copy this directory to ~/.bazaar/plugins "
133
 
            "to use it.\n")
134
 
    import unittest
135
 
    runner = unittest.TextTestRunner()
136
 
    runner.run(test_suite())
 
142
def load_tests(standard_tests, module, loader):
 
143
    return loader.loadTestsFromModuleNames(['bzrlib.plugins.builddeb.tests'])