~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2011-10-27 15:38:14 UTC
  • mfrom: (6015.44.4 2.4)
  • mto: This revision was merged to the branch mainline in revision 6236.
  • Revision ID: v.ladeuil+lp@free.fr-20111027153814-0r4nd2io1jv6t47f
Merge 2.4 into trunk including fix for bug #880701

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
 
21
import bzrlib.bzrdir
 
22
 
21
23
from bzrlib.lazy_import import lazy_import
22
24
lazy_import(globals(), """
23
25
import cStringIO
29
31
    bugtracker,
30
32
    bundle,
31
33
    btree_index,
32
 
    bzrdir,
 
34
    controldir,
33
35
    directory_service,
34
36
    delta,
35
37
    config as _mod_config,
197
199
    the --directory option is used to specify a different branch."""
198
200
    if directory is not None:
199
201
        return (None, Branch.open(directory), filename)
200
 
    return bzrdir.BzrDir.open_containing_tree_or_branch(filename)
 
202
    return controldir.ControlDir.open_containing_tree_or_branch(filename)
201
203
 
202
204
 
203
205
# TODO: Make sure no commands unconditionally use the working directory as a
339
341
            raise errors.BzrCommandError(gettext('You must supply either'
340
342
                                         ' --revision or a revision_id'))
341
343
 
342
 
        b = bzrdir.BzrDir.open_containing_tree_or_branch(directory)[1]
 
344
        b = controldir.ControlDir.open_containing_tree_or_branch(directory)[1]
343
345
 
344
346
        revisions = b.repository.revisions
345
347
        if revisions is None:
473
475
            location_list=['.']
474
476
 
475
477
        for location in location_list:
476
 
            d = bzrdir.BzrDir.open(location)
477
 
            
 
478
            d = controldir.ControlDir.open(location)
 
479
 
478
480
            try:
479
481
                working = d.open_workingtree()
480
482
            except errors.NoWorkingTree:
557
559
    takes_args = ['location?']
558
560
    takes_options = [
559
561
        Option('tree', help='Show revno of working tree'),
 
562
        'revision',
560
563
        ]
561
564
 
562
565
    @display_command
563
 
    def run(self, tree=False, location=u'.'):
 
566
    def run(self, tree=False, location=u'.', revision=None):
 
567
        if revision is not None and tree:
 
568
            raise errors.BzrCommandError(gettext("--tree and --revision can "
 
569
                "not be used together"))
 
570
 
564
571
        if tree:
565
572
            try:
566
573
                wt = WorkingTree.open_containing(location)[0]
567
574
                self.add_cleanup(wt.lock_read().unlock)
568
575
            except (errors.NoWorkingTree, errors.NotLocalUrl):
569
576
                raise errors.NoWorkingTree(location)
 
577
            b = wt.branch
570
578
            revid = wt.last_revision()
571
 
            try:
572
 
                revno_t = wt.branch.revision_id_to_dotted_revno(revid)
573
 
            except errors.NoSuchRevision:
574
 
                revno_t = ('???',)
575
 
            revno = ".".join(str(n) for n in revno_t)
576
579
        else:
577
580
            b = Branch.open_containing(location)[0]
578
581
            self.add_cleanup(b.lock_read().unlock)
579
 
            revno = b.revno()
 
582
            if revision:
 
583
                if len(revision) != 1:
 
584
                    raise errors.BzrCommandError(gettext(
 
585
                        "Tags can only be placed on a single revision, "
 
586
                        "not on a range"))
 
587
                revid = revision[0].as_revision_id(b)
 
588
            else:
 
589
                revid = b.last_revision()
 
590
        try:
 
591
            revno_t = b.revision_id_to_dotted_revno(revid)
 
592
        except errors.NoSuchRevision:
 
593
            revno_t = ('???',)
 
594
        revno = ".".join(str(n) for n in revno_t)
580
595
        self.cleanup_now()
581
 
        self.outf.write(str(revno) + '\n')
 
596
        self.outf.write(revno + '\n')
582
597
 
583
598
 
584
599
class cmd_revision_info(Command):
748
763
            if id != None:
749
764
                os.mkdir(d)
750
765
                wt.add([dd])
751
 
                self.outf.write(gettext('added %s\n') % d)
 
766
                if not is_quiet():
 
767
                    self.outf.write(gettext('added %s\n') % d)
752
768
            else:
753
769
                raise errors.NotVersionedError(path=base)
754
770
 
868
884
        if len(names_list) < 2:
869
885
            raise errors.BzrCommandError(gettext("missing file argument"))
870
886
        tree, rel_names = WorkingTree.open_containing_paths(names_list, canonicalize=False)
 
887
        for file_name in rel_names[0:-1]:
 
888
            if file_name == '':
 
889
                raise errors.BzrCommandError(gettext("can not move root of branch"))
871
890
        self.add_cleanup(tree.lock_tree_write().unlock)
872
891
        self._run(tree, names_list, rel_names, after)
873
892
 
985
1004
    location to use the default.  To change the default, use --remember. The
986
1005
    value will only be saved if the remote location can be accessed.
987
1006
 
 
1007
    The --verbose option will display the revisions pulled using the log_format
 
1008
    configuration option. You can use a different format by overriding it with
 
1009
    -Olog_format=<other_format>.
 
1010
 
988
1011
    Note: The location can be specified either in the form of a branch,
989
1012
    or in the form of a path to a file containing a merge directive generated
990
1013
    with bzr send.
1120
1143
    --no-remember to avoid setting it).  After that, you can omit the
1121
1144
    location to use the default.  To change the default, use --remember. The
1122
1145
    value will only be saved if the remote location can be accessed.
 
1146
 
 
1147
    The --verbose option will display the revisions pushed using the log_format
 
1148
    configuration option. You can use a different format by overriding it with
 
1149
    -Olog_format=<other_format>.
1123
1150
    """
1124
1151
 
1125
1152
    _see_also = ['pull', 'update', 'working-trees']
1163
1190
            directory = '.'
1164
1191
        # Get the source branch
1165
1192
        (tree, br_from,
1166
 
         _unused) = bzrdir.BzrDir.open_containing_tree_or_branch(directory)
 
1193
         _unused) = controldir.ControlDir.open_containing_tree_or_branch(directory)
1167
1194
        # Get the tip's revision_id
1168
1195
        revision = _get_one_revision('push', revision)
1169
1196
        if revision is not None:
1266
1293
                deprecated_name=self.invoked_as,
1267
1294
                recommended_name='branch',
1268
1295
                deprecated_in_version='2.4')
1269
 
        accelerator_tree, br_from = bzrdir.BzrDir.open_tree_or_branch(
 
1296
        accelerator_tree, br_from = controldir.ControlDir.open_tree_or_branch(
1270
1297
            from_location)
1271
1298
        if not (hardlink or files_from):
1272
1299
            # accelerator_tree is usually slower because you have to read N
1295
1322
                    'already exists.') % to_location)
1296
1323
            else:
1297
1324
                try:
1298
 
                    bzrdir.BzrDir.open_from_transport(to_transport)
 
1325
                    to_dir = controldir.ControlDir.open_from_transport(
 
1326
                        to_transport)
1299
1327
                except errors.NotBranchError:
1300
 
                    pass
 
1328
                    to_dir = None
1301
1329
                else:
1302
 
                    raise errors.AlreadyBranchError(to_location)
 
1330
                    try:
 
1331
                        to_dir.open_branch()
 
1332
                    except errors.NotBranchError:
 
1333
                        pass
 
1334
                    else:
 
1335
                        raise errors.AlreadyBranchError(to_location)
1303
1336
        except errors.NoSuchFile:
1304
1337
            raise errors.BzrCommandError(gettext('Parent of "%s" does not exist.')
1305
1338
                                         % to_location)
1306
 
        try:
1307
 
            # preserve whatever source format we have.
1308
 
            dir = br_from.bzrdir.sprout(to_transport.base, revision_id,
1309
 
                                        possible_transports=[to_transport],
1310
 
                                        accelerator_tree=accelerator_tree,
1311
 
                                        hardlink=hardlink, stacked=stacked,
1312
 
                                        force_new_repo=standalone,
1313
 
                                        create_tree_if_local=not no_tree,
1314
 
                                        source_branch=br_from)
1315
 
            branch = dir.open_branch()
1316
 
        except errors.NoSuchRevision:
1317
 
            to_transport.delete_tree('.')
1318
 
            msg = gettext("The branch {0} has no revision {1}.").format(
1319
 
                from_location, revision)
1320
 
            raise errors.BzrCommandError(msg)
 
1339
        else:
 
1340
            to_dir = None
 
1341
        if to_dir is None:
 
1342
            try:
 
1343
                # preserve whatever source format we have.
 
1344
                to_dir = br_from.bzrdir.sprout(to_transport.base, revision_id,
 
1345
                                            possible_transports=[to_transport],
 
1346
                                            accelerator_tree=accelerator_tree,
 
1347
                                            hardlink=hardlink, stacked=stacked,
 
1348
                                            force_new_repo=standalone,
 
1349
                                            create_tree_if_local=not no_tree,
 
1350
                                            source_branch=br_from)
 
1351
                branch = to_dir.open_branch()
 
1352
            except errors.NoSuchRevision:
 
1353
                to_transport.delete_tree('.')
 
1354
                msg = gettext("The branch {0} has no revision {1}.").format(
 
1355
                    from_location, revision)
 
1356
                raise errors.BzrCommandError(msg)
 
1357
        else:
 
1358
            branch = br_from.sprout(to_dir, revision_id=revision_id)
1321
1359
        _merge_tags_if_possible(br_from, branch)
1322
1360
        # If the source branch is stacked, the new branch may
1323
1361
        # be stacked whether we asked for that explicitly or not.
1360
1398
            if not t.listable():
1361
1399
                raise errors.BzrCommandError(
1362
1400
                    "Can't scan this type of location.")
1363
 
            for b in bzrdir.BzrDir.find_branches(t):
 
1401
            for b in controldir.ControlDir.find_branches(t):
1364
1402
                self.outf.write("%s\n" % urlutils.unescape_for_display(
1365
1403
                    urlutils.relative_url(t.base, b.base),
1366
1404
                    self.outf.encoding).rstrip("/"))
1367
1405
        else:
1368
 
            dir = bzrdir.BzrDir.open_containing(location)[0]
 
1406
            dir = controldir.ControlDir.open_containing(location)[0]
1369
1407
            for branch in dir.list_branches():
1370
1408
                if branch.name is None:
1371
1409
                    self.outf.write(gettext(" (default)\n"))
1418
1456
        if branch_location is None:
1419
1457
            branch_location = osutils.getcwd()
1420
1458
            to_location = branch_location
1421
 
        accelerator_tree, source = bzrdir.BzrDir.open_tree_or_branch(
 
1459
        accelerator_tree, source = controldir.ControlDir.open_tree_or_branch(
1422
1460
            branch_location)
1423
1461
        if not (hardlink or files_from):
1424
1462
            # accelerator_tree is usually slower because you have to read N
1479
1517
 
1480
1518
 
1481
1519
class cmd_update(Command):
1482
 
    __doc__ = """Update a tree to have the latest code committed to its branch.
1483
 
 
1484
 
    This will perform a merge into the working tree, and may generate
1485
 
    conflicts. If you have any local changes, you will still
1486
 
    need to commit them after the update for the update to be complete.
1487
 
 
1488
 
    If you want to discard your local changes, you can just do a
1489
 
    'bzr revert' instead of 'bzr commit' after the update.
1490
 
 
1491
 
    If you want to restore a file that has been removed locally, use
1492
 
    'bzr revert' instead of 'bzr update'.
1493
 
 
1494
 
    If the tree's branch is bound to a master branch, it will also update
 
1520
    __doc__ = """Update a working tree to a new revision.
 
1521
 
 
1522
    This will perform a merge of the destination revision (the tip of the
 
1523
    branch, or the specified revision) into the working tree, and then make
 
1524
    that revision the basis revision for the working tree.  
 
1525
 
 
1526
    You can use this to visit an older revision, or to update a working tree
 
1527
    that is out of date from its branch.
 
1528
    
 
1529
    If there are any uncommitted changes in the tree, they will be carried
 
1530
    across and remain as uncommitted changes after the update.  To discard
 
1531
    these changes, use 'bzr revert'.  The uncommitted changes may conflict
 
1532
    with the changes brought in by the change in basis revision.
 
1533
 
 
1534
    If the tree's branch is bound to a master branch, bzr will also update
1495
1535
    the branch from the master.
 
1536
 
 
1537
    You cannot update just a single file or directory, because each Bazaar
 
1538
    working tree has just a single basis revision.  If you want to restore a
 
1539
    file that has been removed locally, use 'bzr revert' instead of 'bzr
 
1540
    update'.  If you want to restore a file to its state in a previous
 
1541
    revision, use 'bzr revert' with a '-r' option, or use 'bzr cat' to write
 
1542
    out the old content of that file to a new location.
 
1543
 
 
1544
    The 'dir' argument, if given, must be the location of the root of a
 
1545
    working tree to update.  By default, the working tree that contains the 
 
1546
    current working directory is used.
1496
1547
    """
1497
1548
 
1498
1549
    _see_also = ['pull', 'working-trees', 'status-flags']
1503
1554
                     ]
1504
1555
    aliases = ['up']
1505
1556
 
1506
 
    def run(self, dir='.', revision=None, show_base=None):
 
1557
    def run(self, dir=None, revision=None, show_base=None):
1507
1558
        if revision is not None and len(revision) != 1:
1508
1559
            raise errors.BzrCommandError(gettext(
1509
 
                        "bzr update --revision takes exactly one revision"))
1510
 
        tree = WorkingTree.open_containing(dir)[0]
 
1560
                "bzr update --revision takes exactly one revision"))
 
1561
        if dir is None:
 
1562
            tree = WorkingTree.open_containing('.')[0]
 
1563
        else:
 
1564
            tree, relpath = WorkingTree.open_containing(dir)
 
1565
            if relpath:
 
1566
                # See bug 557886.
 
1567
                raise errors.BzrCommandError(gettext(
 
1568
                    "bzr update can only update a whole tree, "
 
1569
                    "not a file or subdirectory"))
1511
1570
        branch = tree.branch
1512
1571
        possible_transports = []
1513
1572
        master = branch.get_master_branch(
1611
1670
        else:
1612
1671
            noise_level = 0
1613
1672
        from bzrlib.info import show_bzrdir_info
1614
 
        show_bzrdir_info(bzrdir.BzrDir.open_containing(location)[0],
 
1673
        show_bzrdir_info(controldir.ControlDir.open_containing(location)[0],
1615
1674
                         verbose=noise_level, outfile=self.outf)
1616
1675
 
1617
1676
 
1749
1808
 
1750
1809
    def run(self, branch=".", canonicalize_chks=False):
1751
1810
        from bzrlib.reconcile import reconcile
1752
 
        dir = bzrdir.BzrDir.open(branch)
 
1811
        dir = controldir.ControlDir.open(branch)
1753
1812
        reconcile(dir, canonicalize_chks=canonicalize_chks)
1754
1813
 
1755
1814
 
1764
1823
    @display_command
1765
1824
    def run(self, location="."):
1766
1825
        branch = Branch.open_containing(location)[0]
1767
 
        for revid in branch.revision_history():
 
1826
        self.add_cleanup(branch.lock_read().unlock)
 
1827
        graph = branch.repository.get_graph()
 
1828
        history = list(graph.iter_lefthand_ancestry(branch.last_revision(),
 
1829
            [_mod_revision.NULL_REVISION]))
 
1830
        for revid in reversed(history):
1768
1831
            self.outf.write(revid)
1769
1832
            self.outf.write('\n')
1770
1833
 
1831
1894
                help='Specify a format for this branch. '
1832
1895
                'See "help formats".',
1833
1896
                lazy_registry=('bzrlib.bzrdir', 'format_registry'),
1834
 
                converter=lambda name: bzrdir.format_registry.make_bzrdir(name),
 
1897
                converter=lambda name: controldir.format_registry.make_bzrdir(name),
1835
1898
                value_switches=True,
1836
1899
                title="Branch format",
1837
1900
                ),
1844
1907
    def run(self, location=None, format=None, append_revisions_only=False,
1845
1908
            create_prefix=False, no_tree=False):
1846
1909
        if format is None:
1847
 
            format = bzrdir.format_registry.make_bzrdir('default')
 
1910
            format = controldir.format_registry.make_bzrdir('default')
1848
1911
        if location is None:
1849
1912
            location = u'.'
1850
1913
 
1867
1930
            to_transport.create_prefix()
1868
1931
 
1869
1932
        try:
1870
 
            a_bzrdir = bzrdir.BzrDir.open_from_transport(to_transport)
 
1933
            a_bzrdir = controldir.ControlDir.open_from_transport(to_transport)
1871
1934
        except errors.NotBranchError:
1872
1935
            # really a NotBzrDir error...
1873
 
            create_branch = bzrdir.BzrDir.create_branch_convenience
 
1936
            create_branch = controldir.ControlDir.create_branch_convenience
1874
1937
            if no_tree:
1875
1938
                force_new_tree = False
1876
1939
            else:
1887
1950
                        raise errors.BranchExistsWithoutWorkingTree(location)
1888
1951
                raise errors.AlreadyBranchError(location)
1889
1952
            branch = a_bzrdir.create_branch()
1890
 
            if not no_tree:
 
1953
            if not no_tree and not a_bzrdir.has_workingtree():
1891
1954
                a_bzrdir.create_workingtree()
1892
1955
        if append_revisions_only:
1893
1956
            try:
1949
2012
    takes_options = [RegistryOption('format',
1950
2013
                            help='Specify a format for this repository. See'
1951
2014
                                 ' "bzr help formats" for details.',
1952
 
                            lazy_registry=('bzrlib.bzrdir', 'format_registry'),
1953
 
                            converter=lambda name: bzrdir.format_registry.make_bzrdir(name),
 
2015
                            lazy_registry=('bzrlib.controldir', 'format_registry'),
 
2016
                            converter=lambda name: controldir.format_registry.make_bzrdir(name),
1954
2017
                            value_switches=True, title='Repository format'),
1955
2018
                     Option('no-trees',
1956
2019
                             help='Branches in the repository will default to'
1960
2023
 
1961
2024
    def run(self, location, format=None, no_trees=False):
1962
2025
        if format is None:
1963
 
            format = bzrdir.format_registry.make_bzrdir('default')
 
2026
            format = controldir.format_registry.make_bzrdir('default')
1964
2027
 
1965
2028
        if location is None:
1966
2029
            location = '.'
2571
2634
                location = revision[0].get_branch()
2572
2635
            else:
2573
2636
                location = '.'
2574
 
            dir, relpath = bzrdir.BzrDir.open_containing(location)
 
2637
            dir, relpath = controldir.ControlDir.open_containing(location)
2575
2638
            b = dir.open_branch()
2576
2639
            self.add_cleanup(b.lock_read().unlock)
2577
2640
            rev1, rev2 = _get_revision_range(revision, b, self.name())
3560
3623
        RegistryOption('format',
3561
3624
            help='Upgrade to a specific format.  See "bzr help'
3562
3625
                 ' formats" for details.',
3563
 
            lazy_registry=('bzrlib.bzrdir', 'format_registry'),
3564
 
            converter=lambda name: bzrdir.format_registry.make_bzrdir(name),
 
3626
            lazy_registry=('bzrlib.controldir', 'format_registry'),
 
3627
            converter=lambda name: controldir.format_registry.make_bzrdir(name),
3565
3628
            value_switches=True, title='Branch format'),
3566
3629
        Option('clean',
3567
3630
            help='Remove the backup.bzr directory if successful.'),
4812
4875
        ]
4813
4876
 
4814
4877
    def run(self, branch_or_repo='.', clean_obsolete_packs=False):
4815
 
        dir = bzrdir.BzrDir.open_containing(branch_or_repo)[0]
 
4878
        dir = controldir.ControlDir.open_containing(branch_or_repo)[0]
4816
4879
        try:
4817
4880
            branch = dir.open_branch()
4818
4881
            repository = branch.repository
5095
5158
            revision=None, force=False, local=False, keep_tags=False):
5096
5159
        if location is None:
5097
5160
            location = u'.'
5098
 
        control, relpath = bzrdir.BzrDir.open_containing(location)
 
5161
        control, relpath = controldir.ControlDir.open_containing(location)
5099
5162
        try:
5100
5163
            tree = control.open_workingtree()
5101
5164
            b = tree.branch
5205
5268
            conf = _mod_config.LockableConfig(file_name=location)
5206
5269
            conf.break_lock()
5207
5270
        else:
5208
 
            control, relpath = bzrdir.BzrDir.open_containing(location)
 
5271
            control, relpath = controldir.ControlDir.open_containing(location)
5209
5272
            try:
5210
5273
                control.break_lock()
5211
5274
            except NotImplementedError:
5255
5318
                    'option leads to global uncontrolled write access to your '
5256
5319
                    'file system.'
5257
5320
                ),
 
5321
        Option('client-timeout', type=float,
 
5322
               help='Override the default idle client timeout (5min).'),
5258
5323
        ]
5259
5324
 
5260
5325
    def get_host_and_port(self, port):
5277
5342
        return host, port
5278
5343
 
5279
5344
    def run(self, port=None, inet=False, directory=None, allow_writes=False,
5280
 
            protocol=None):
 
5345
            protocol=None, client_timeout=None):
5281
5346
        from bzrlib import transport
5282
5347
        if directory is None:
5283
5348
            directory = os.getcwd()
5288
5353
        if not allow_writes:
5289
5354
            url = 'readonly+' + url
5290
5355
        t = transport.get_transport(url)
5291
 
        protocol(t, host, port, inet)
 
5356
        try:
 
5357
            protocol(t, host, port, inet, client_timeout)
 
5358
        except TypeError, e:
 
5359
            # We use symbol_versioning.deprecated_in just so that people
 
5360
            # grepping can find it here.
 
5361
            # symbol_versioning.deprecated_in((2, 5, 0))
 
5362
            symbol_versioning.warn(
 
5363
                'Got TypeError(%s)\ntrying to call protocol: %s.%s\n'
 
5364
                'Most likely it needs to be updated to support a'
 
5365
                ' "timeout" parameter (added in bzr 2.5.0)'
 
5366
                % (e, protocol.__module__, protocol),
 
5367
                DeprecationWarning)
 
5368
            protocol(t, host, port, inet)
5292
5369
 
5293
5370
 
5294
5371
class cmd_join(Command):
5781
5858
                    if isinstance(revno, tuple):
5782
5859
                        revno = '.'.join(map(str, revno))
5783
5860
                except (errors.NoSuchRevision,
5784
 
                        errors.GhostRevisionsHaveNoRevno):
 
5861
                        errors.GhostRevisionsHaveNoRevno,
 
5862
                        errors.UnsupportedOperation):
5785
5863
                    # Bad tag data/merges can lead to tagged revisions
5786
5864
                    # which are not in this branch. Fail gracefully ...
5787
5865
                    revno = '?'
5881
5959
    def run(self, location=None, bind_to=None, force=False,
5882
5960
            tree_type=None, repository_type=None, repository_trees=None,
5883
5961
            stacked_on=None, unstacked=None):
5884
 
        directory = bzrdir.BzrDir.open(location)
 
5962
        directory = controldir.ControlDir.open(location)
5885
5963
        if stacked_on and unstacked:
5886
5964
            raise errors.BzrCommandError(gettext("Can't use both --stacked-on and --unstacked"))
5887
5965
        elif stacked_on is not None:
5969
6047
        from bzrlib import switch
5970
6048
        tree_location = directory
5971
6049
        revision = _get_one_revision('switch', revision)
5972
 
        control_dir = bzrdir.BzrDir.open_containing(tree_location)[0]
 
6050
        control_dir = controldir.ControlDir.open_containing(tree_location)[0]
5973
6051
        if to_location is None:
5974
6052
            if revision is None:
5975
6053
                raise errors.BzrCommandError(gettext('You must supply either a'
6402
6480
        if path is not None:
6403
6481
            branchdir = path
6404
6482
        tree, branch, relpath =(
6405
 
            bzrdir.BzrDir.open_containing_tree_or_branch(branchdir))
 
6483
            controldir.ControlDir.open_containing_tree_or_branch(branchdir))
6406
6484
        if path is not None:
6407
6485
            path = relpath
6408
6486
        if tree is None:
6436
6514
    __doc__ = """Export command helps and error messages in po format."""
6437
6515
 
6438
6516
    hidden = True
 
6517
    takes_options = [Option('plugin', 
 
6518
                            help='Export help text from named command '\
 
6519
                                 '(defaults to all built in commands).',
 
6520
                            type=str)]
6439
6521
 
6440
 
    def run(self):
 
6522
    def run(self, plugin=None):
6441
6523
        from bzrlib.export_pot import export_pot
6442
 
        export_pot(self.outf)
 
6524
        export_pot(self.outf, plugin)
6443
6525
 
6444
6526
 
6445
6527
def _register_lazy_builtins():