~jelmer/bzr-builddeb/quilt

« back to all changes in this revision

Viewing changes to cmds.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-02 18:01:36 UTC
  • mfrom: (675.2.7 merge-package-as-hook)
  • Revision ID: jelmer@samba.org-20120102180136-2t2caq8jar4kza2r
Merge new pre_merge hook which has the same behaviour as 'bzr merge-package'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
from bzrlib import (
29
29
    urlutils,
 
30
    version_info as bzrlib_version,
30
31
    )
31
32
from bzrlib.branch import Branch
32
33
from bzrlib.bzrdir import BzrDir
1290
1291
    so that the user only needs to deal with packaging branch merge issues.
1291
1292
 
1292
1293
    In the opposite case a normal merge will be performed.
 
1294
 
 
1295
    As of bzr 2.5 and bzr-builddeb 2.8.1, this functionality is automatically
 
1296
    provided as part of bzr merge.
1293
1297
    """
1294
1298
    takes_options = ['revision']
1295
1299
    takes_args = ['source']
1296
1300
 
 
1301
    if bzrlib_version >= (2, 5):
 
1302
        hidden = True
 
1303
 
1297
1304
    def run(self, source, revision=None):
 
1305
        from bzrlib import ui
 
1306
        from bzrlib.merge import Merger
1298
1307
        from bzrlib.tag import _merge_tags_if_possible
1299
1308
        from bzrlib.plugins.builddeb.merge_package import fix_ancestry_as_needed
 
1309
        if 'pre_merge' in Merger.hooks:
 
1310
            ui.ui_factory.show_warning(
 
1311
                "The merge-package command is deprecated. Use 'bzr merge' "
 
1312
                "instead.")
1300
1313
        source_branch = None
1301
1314
        # Get the target branch.
1302
1315
        try: