/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2010-04-28 07:03:38 UTC
  • mfrom: (5188 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5189.
  • Revision ID: mbp@sourcefrog.net-20100428070338-2af8y3takgfkrkyp
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
239
239
# opens the branch?)
240
240
 
241
241
class cmd_status(Command):
242
 
    """Display status summary.
 
242
    __doc__ = """Display status summary.
243
243
 
244
244
    This reports on versioned and unknown files, reporting them
245
245
    grouped by state.  Possible states are:
332
332
 
333
333
 
334
334
class cmd_cat_revision(Command):
335
 
    """Write out metadata for a revision.
 
335
    __doc__ = """Write out metadata for a revision.
336
336
 
337
337
    The revision to print can either be specified by a specific
338
338
    revision identifier, or you can use --revision.
390
390
        
391
391
 
392
392
class cmd_dump_btree(Command):
393
 
    """Dump the contents of a btree index file to stdout.
 
393
    __doc__ = """Dump the contents of a btree index file to stdout.
394
394
 
395
395
    PATH is a btree index file, it can be any URL. This includes things like
396
396
    .bzr/repository/pack-names, or .bzr/repository/indices/a34b3a...ca4a4.iix
471
471
 
472
472
 
473
473
class cmd_remove_tree(Command):
474
 
    """Remove the working tree from a given branch/checkout.
 
474
    __doc__ = """Remove the working tree from a given branch/checkout.
475
475
 
476
476
    Since a lightweight checkout is little more than a working tree
477
477
    this will refuse to run against one.
512
512
 
513
513
 
514
514
class cmd_revno(Command):
515
 
    """Show current revision number.
 
515
    __doc__ = """Show current revision number.
516
516
 
517
517
    This is equal to the number of revisions on this branch.
518
518
    """
548
548
 
549
549
 
550
550
class cmd_revision_info(Command):
551
 
    """Show revision number and revision id for a given revision identifier.
 
551
    __doc__ = """Show revision number and revision id for a given revision identifier.
552
552
    """
553
553
    hidden = True
554
554
    takes_args = ['revision_info*']
610
610
 
611
611
 
612
612
class cmd_add(Command):
613
 
    """Add specified files or directories.
 
613
    __doc__ = """Add specified files or directories.
614
614
 
615
615
    In non-recursive mode, all the named items are added, regardless
616
616
    of whether they were previously ignored.  A warning is given if
696
696
 
697
697
 
698
698
class cmd_mkdir(Command):
699
 
    """Create a new versioned directory.
 
699
    __doc__ = """Create a new versioned directory.
700
700
 
701
701
    This is equivalent to creating the directory and then adding it.
702
702
    """
718
718
 
719
719
 
720
720
class cmd_relpath(Command):
721
 
    """Show path of a file relative to root"""
 
721
    __doc__ = """Show path of a file relative to root"""
722
722
 
723
723
    takes_args = ['filename']
724
724
    hidden = True
733
733
 
734
734
 
735
735
class cmd_inventory(Command):
736
 
    """Show inventory of the current working copy or a revision.
 
736
    __doc__ = """Show inventory of the current working copy or a revision.
737
737
 
738
738
    It is possible to limit the output to a particular entry
739
739
    type using the --kind option.  For example: --kind file.
794
794
 
795
795
 
796
796
class cmd_mv(Command):
797
 
    """Move or rename a file.
 
797
    __doc__ = """Move or rename a file.
798
798
 
799
799
    :Usage:
800
800
        bzr mv OLDNAME NEWNAME
931
931
 
932
932
 
933
933
class cmd_pull(Command):
934
 
    """Turn this branch into a mirror of another branch.
 
934
    __doc__ = """Turn this branch into a mirror of another branch.
935
935
 
936
936
    By default, this command only works on branches that have not diverged.
937
937
    Branches are considered diverged if the destination branch's most recent 
1058
1058
 
1059
1059
 
1060
1060
class cmd_push(Command):
1061
 
    """Update a mirror of this branch.
 
1061
    __doc__ = """Update a mirror of this branch.
1062
1062
 
1063
1063
    The target branch will not have its working tree populated because this
1064
1064
    is both expensive, and is not supported on remote file systems.
1171
1171
 
1172
1172
 
1173
1173
class cmd_branch(Command):
1174
 
    """Create a new branch that is a copy of an existing branch.
 
1174
    __doc__ = """Create a new branch that is a copy of an existing branch.
1175
1175
 
1176
1176
    If the TO_LOCATION is omitted, the last component of the FROM_LOCATION will
1177
1177
    be used.  In other words, "branch ../foo/bar" will attempt to create ./bar.
1284
1284
 
1285
1285
 
1286
1286
class cmd_checkout(Command):
1287
 
    """Create a new checkout of an existing branch.
 
1287
    __doc__ = """Create a new checkout of an existing branch.
1288
1288
 
1289
1289
    If BRANCH_LOCATION is omitted, checkout will reconstitute a working tree for
1290
1290
    the branch found in '.'. This is useful if you have removed the working tree
1353
1353
 
1354
1354
 
1355
1355
class cmd_renames(Command):
1356
 
    """Show list of renamed files.
 
1356
    __doc__ = """Show list of renamed files.
1357
1357
    """
1358
1358
    # TODO: Option to show renames between two historical versions.
1359
1359
 
1385
1385
 
1386
1386
 
1387
1387
class cmd_update(Command):
1388
 
    """Update a tree to have the latest code committed to its branch.
 
1388
    __doc__ = """Update a tree to have the latest code committed to its branch.
1389
1389
 
1390
1390
    This will perform a merge into the working tree, and may generate
1391
1391
    conflicts. If you have any local changes, you will still
1471
1471
 
1472
1472
 
1473
1473
class cmd_info(Command):
1474
 
    """Show information about a working tree, branch or repository.
 
1474
    __doc__ = """Show information about a working tree, branch or repository.
1475
1475
 
1476
1476
    This command will show all known locations and formats associated to the
1477
1477
    tree, branch or repository.
1515
1515
 
1516
1516
 
1517
1517
class cmd_remove(Command):
1518
 
    """Remove files or directories.
 
1518
    __doc__ = """Remove files or directories.
1519
1519
 
1520
1520
    This makes bzr stop tracking changes to the specified files. bzr will delete
1521
1521
    them if they can easily be recovered using revert. If no options or
1569
1569
 
1570
1570
 
1571
1571
class cmd_file_id(Command):
1572
 
    """Print file_id of a particular file or directory.
 
1572
    __doc__ = """Print file_id of a particular file or directory.
1573
1573
 
1574
1574
    The file_id is assigned when the file is first added and remains the
1575
1575
    same through all revisions where the file exists, even when it is
1591
1591
 
1592
1592
 
1593
1593
class cmd_file_path(Command):
1594
 
    """Print path of file_ids to a file or directory.
 
1594
    __doc__ = """Print path of file_ids to a file or directory.
1595
1595
 
1596
1596
    This prints one line for each directory down to the target,
1597
1597
    starting at the branch root.
1613
1613
 
1614
1614
 
1615
1615
class cmd_reconcile(Command):
1616
 
    """Reconcile bzr metadata in a branch.
 
1616
    __doc__ = """Reconcile bzr metadata in a branch.
1617
1617
 
1618
1618
    This can correct data mismatches that may have been caused by
1619
1619
    previous ghost operations or bzr upgrades. You should only
1641
1641
 
1642
1642
 
1643
1643
class cmd_revision_history(Command):
1644
 
    """Display the list of revision ids on a branch."""
 
1644
    __doc__ = """Display the list of revision ids on a branch."""
1645
1645
 
1646
1646
    _see_also = ['log']
1647
1647
    takes_args = ['location?']
1657
1657
 
1658
1658
 
1659
1659
class cmd_ancestry(Command):
1660
 
    """List all revisions merged into this branch."""
 
1660
    __doc__ = """List all revisions merged into this branch."""
1661
1661
 
1662
1662
    _see_also = ['log', 'revision-history']
1663
1663
    takes_args = ['location?']
1682
1682
 
1683
1683
 
1684
1684
class cmd_init(Command):
1685
 
    """Make a directory into a versioned branch.
 
1685
    __doc__ = """Make a directory into a versioned branch.
1686
1686
 
1687
1687
    Use this to create an empty branch, or before importing an
1688
1688
    existing project.
1791
1791
 
1792
1792
 
1793
1793
class cmd_init_repository(Command):
1794
 
    """Create a shared repository for branches to share storage space.
 
1794
    __doc__ = """Create a shared repository for branches to share storage space.
1795
1795
 
1796
1796
    New branches created under the repository directory will store their
1797
1797
    revisions in the repository, not in the branch directory.  For branches
1851
1851
 
1852
1852
 
1853
1853
class cmd_diff(Command):
1854
 
    """Show differences in the working tree, between revisions or branches.
 
1854
    __doc__ = """Show differences in the working tree, between revisions or branches.
1855
1855
 
1856
1856
    If no arguments are given, all changes for the current tree are listed.
1857
1857
    If files are given, only the changes in those files are listed.
1992
1992
 
1993
1993
 
1994
1994
class cmd_deleted(Command):
1995
 
    """List files deleted in the working tree.
 
1995
    __doc__ = """List files deleted in the working tree.
1996
1996
    """
1997
1997
    # TODO: Show files deleted since a previous revision, or
1998
1998
    # between two revisions.
2021
2021
 
2022
2022
 
2023
2023
class cmd_modified(Command):
2024
 
    """List files modified in working tree.
 
2024
    __doc__ = """List files modified in working tree.
2025
2025
    """
2026
2026
 
2027
2027
    hidden = True
2044
2044
 
2045
2045
 
2046
2046
class cmd_added(Command):
2047
 
    """List files added in working tree.
 
2047
    __doc__ = """List files added in working tree.
2048
2048
    """
2049
2049
 
2050
2050
    hidden = True
2080
2080
 
2081
2081
 
2082
2082
class cmd_root(Command):
2083
 
    """Show the tree root directory.
 
2083
    __doc__ = """Show the tree root directory.
2084
2084
 
2085
2085
    The root is the nearest enclosing directory with a .bzr control
2086
2086
    directory."""
2110
2110
 
2111
2111
 
2112
2112
class cmd_log(Command):
2113
 
    """Show historical log for a branch or subset of a branch.
 
2113
    __doc__ = """Show historical log for a branch or subset of a branch.
2114
2114
 
2115
2115
    log is bzr's default tool for exploring the history of a branch.
2116
2116
    The branch to use is taken from the first parameter. If no parameters
2481
2481
 
2482
2482
 
2483
2483
class cmd_touching_revisions(Command):
2484
 
    """Return revision-ids which affected a particular file.
 
2484
    __doc__ = """Return revision-ids which affected a particular file.
2485
2485
 
2486
2486
    A more user-friendly interface is "bzr log FILE".
2487
2487
    """
2502
2502
 
2503
2503
 
2504
2504
class cmd_ls(Command):
2505
 
    """List files in a tree.
 
2505
    __doc__ = """List files in a tree.
2506
2506
    """
2507
2507
 
2508
2508
    _see_also = ['status', 'cat']
2619
2619
 
2620
2620
 
2621
2621
class cmd_unknowns(Command):
2622
 
    """List unknown files.
 
2622
    __doc__ = """List unknown files.
2623
2623
    """
2624
2624
 
2625
2625
    hidden = True
2632
2632
 
2633
2633
 
2634
2634
class cmd_ignore(Command):
2635
 
    """Ignore specified files or patterns.
 
2635
    __doc__ = """Ignore specified files or patterns.
2636
2636
 
2637
2637
    See ``bzr help patterns`` for details on the syntax of patterns.
2638
2638
 
2647
2647
    using this command or directly by using an editor, be sure to commit
2648
2648
    it.
2649
2649
    
 
2650
    Bazaar also supports a global ignore file ~/.bazaar/ignore. On Windows
 
2651
    the global ignore file can be found in the application data directory as
 
2652
    C:\\Documents and Settings\\<user>\\Application Data\\Bazaar\\2.0\\ignore.
 
2653
    Global ignores are not touched by this command. The global ignore file
 
2654
    can be edited directly using an editor.
 
2655
 
2650
2656
    Patterns prefixed with '!' are exceptions to ignore patterns and take
2651
2657
    precedence over regular ignores.  Such exceptions are used to specify
2652
2658
    files that should be versioned which would otherwise be ignored.
2693
2699
    _see_also = ['status', 'ignored', 'patterns']
2694
2700
    takes_args = ['name_pattern*']
2695
2701
    takes_options = [
2696
 
        Option('old-default-rules',
2697
 
               help='Write out the ignore rules bzr < 0.9 always used.')
 
2702
        Option('default-rules',
 
2703
               help='Display the default ignore rules that bzr uses.')
2698
2704
        ]
2699
2705
 
2700
 
    def run(self, name_pattern_list=None, old_default_rules=None):
 
2706
    def run(self, name_pattern_list=None, default_rules=None):
2701
2707
        from bzrlib import ignores
2702
 
        if old_default_rules is not None:
2703
 
            # dump the rules and exit
2704
 
            for pattern in ignores.OLD_DEFAULTS:
 
2708
        if default_rules is not None:
 
2709
            # dump the default rules and exit
 
2710
            for pattern in ignores.USER_DEFAULTS:
2705
2711
                self.outf.write("%s\n" % pattern)
2706
2712
            return
2707
2713
        if not name_pattern_list:
2708
2714
            raise errors.BzrCommandError("ignore requires at least one "
2709
 
                                  "NAME_PATTERN or --old-default-rules")
 
2715
                "NAME_PATTERN or --default-rules.")
2710
2716
        name_pattern_list = [globbing.normalize_pattern(p)
2711
2717
                             for p in name_pattern_list]
2712
2718
        for name_pattern in name_pattern_list:
2734
2740
 
2735
2741
 
2736
2742
class cmd_ignored(Command):
2737
 
    """List ignored files and the patterns that matched them.
 
2743
    __doc__ = """List ignored files and the patterns that matched them.
2738
2744
 
2739
2745
    List all the ignored files and the ignore pattern that caused the file to
2740
2746
    be ignored.
2761
2767
 
2762
2768
 
2763
2769
class cmd_lookup_revision(Command):
2764
 
    """Lookup the revision-id from a revision-number
 
2770
    __doc__ = """Lookup the revision-id from a revision-number
2765
2771
 
2766
2772
    :Examples:
2767
2773
        bzr lookup-revision 33
2781
2787
 
2782
2788
 
2783
2789
class cmd_export(Command):
2784
 
    """Export current or past revision to a destination directory or archive.
 
2790
    __doc__ = """Export current or past revision to a destination directory or archive.
2785
2791
 
2786
2792
    If no revision is specified this exports the last committed revision.
2787
2793
 
2844
2850
 
2845
2851
 
2846
2852
class cmd_cat(Command):
2847
 
    """Write the contents of a file as of a given revision to standard output.
 
2853
    __doc__ = """Write the contents of a file as of a given revision to standard output.
2848
2854
 
2849
2855
    If no revision is nominated, the last revision is used.
2850
2856
 
2930
2936
 
2931
2937
 
2932
2938
class cmd_local_time_offset(Command):
2933
 
    """Show the offset in seconds from GMT to local time."""
 
2939
    __doc__ = """Show the offset in seconds from GMT to local time."""
2934
2940
    hidden = True
2935
2941
    @display_command
2936
2942
    def run(self):
2939
2945
 
2940
2946
 
2941
2947
class cmd_commit(Command):
2942
 
    """Commit changes into a new revision.
 
2948
    __doc__ = """Commit changes into a new revision.
2943
2949
 
2944
2950
    An explanatory message needs to be given for each commit. This is
2945
2951
    often done by using the --message option (getting the message from the
3205
3211
 
3206
3212
 
3207
3213
class cmd_check(Command):
3208
 
    """Validate working tree structure, branch consistency and repository history.
 
3214
    __doc__ = """Validate working tree structure, branch consistency and repository history.
3209
3215
 
3210
3216
    This command checks various invariants about branch and repository storage
3211
3217
    to detect data corruption or bzr bugs.
3275
3281
 
3276
3282
 
3277
3283
class cmd_upgrade(Command):
3278
 
    """Upgrade branch storage to current format.
 
3284
    __doc__ = """Upgrade branch storage to current format.
3279
3285
 
3280
3286
    The check command or bzr developers may sometimes advise you to run
3281
3287
    this command. When the default format has changed you may also be warned
3299
3305
 
3300
3306
 
3301
3307
class cmd_whoami(Command):
3302
 
    """Show or set bzr user id.
 
3308
    __doc__ = """Show or set bzr user id.
3303
3309
 
3304
3310
    :Examples:
3305
3311
        Show the email of the current user::
3349
3355
 
3350
3356
 
3351
3357
class cmd_nick(Command):
3352
 
    """Print or set the branch nickname.
 
3358
    __doc__ = """Print or set the branch nickname.
3353
3359
 
3354
3360
    If unset, the tree root directory name is used as the nickname.
3355
3361
    To print the current nickname, execute with no argument.
3373
3379
 
3374
3380
 
3375
3381
class cmd_alias(Command):
3376
 
    """Set/unset and display aliases.
 
3382
    __doc__ = """Set/unset and display aliases.
3377
3383
 
3378
3384
    :Examples:
3379
3385
        Show the current aliases::
3443
3449
 
3444
3450
 
3445
3451
class cmd_selftest(Command):
3446
 
    """Run internal test suite.
 
3452
    __doc__ = """Run internal test suite.
3447
3453
 
3448
3454
    If arguments are given, they are regular expressions that say which tests
3449
3455
    should run.  Tests matching any expression are run, and other tests are
3590
3596
                raise errors.BzrCommandError("subunit not available. subunit "
3591
3597
                    "needs to be installed to use --subunit.")
3592
3598
            self.additional_selftest_args['runner_class'] = SubUnitBzrRunner
 
3599
            # On Windows, disable automatic conversion of '\n' to '\r\n' in
 
3600
            # stdout, which would corrupt the subunit stream. 
 
3601
            if sys.platform == "win32" and sys.stdout.fileno() >= 0:
 
3602
                import msvcrt
 
3603
                msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
3593
3604
        if parallel:
3594
3605
            self.additional_selftest_args.setdefault(
3595
3606
                'suite_decorators', []).append(parallel)
3626
3637
 
3627
3638
 
3628
3639
class cmd_version(Command):
3629
 
    """Show version of bzr."""
 
3640
    __doc__ = """Show version of bzr."""
3630
3641
 
3631
3642
    encoding_type = 'replace'
3632
3643
    takes_options = [
3643
3654
 
3644
3655
 
3645
3656
class cmd_rocks(Command):
3646
 
    """Statement of optimism."""
 
3657
    __doc__ = """Statement of optimism."""
3647
3658
 
3648
3659
    hidden = True
3649
3660
 
3653
3664
 
3654
3665
 
3655
3666
class cmd_find_merge_base(Command):
3656
 
    """Find and print a base revision for merging two branches."""
 
3667
    __doc__ = """Find and print a base revision for merging two branches."""
3657
3668
    # TODO: Options to specify revisions on either side, as if
3658
3669
    #       merging only part of the history.
3659
3670
    takes_args = ['branch', 'other']
3679
3690
 
3680
3691
 
3681
3692
class cmd_merge(Command):
3682
 
    """Perform a three-way merge.
 
3693
    __doc__ = """Perform a three-way merge.
3683
3694
 
3684
3695
    The source of the merge can be specified either in the form of a branch,
3685
3696
    or in the form of a path to a file containing a merge directive generated
4040
4051
 
4041
4052
 
4042
4053
class cmd_remerge(Command):
4043
 
    """Redo a merge.
 
4054
    __doc__ = """Redo a merge.
4044
4055
 
4045
4056
    Use this if you want to try a different merge technique while resolving
4046
4057
    conflicts.  Some merge techniques are better than others, and remerge
4135
4146
 
4136
4147
 
4137
4148
class cmd_revert(Command):
4138
 
    """Revert files to a previous revision.
 
4149
    __doc__ = """Revert files to a previous revision.
4139
4150
 
4140
4151
    Giving a list of files will revert only those files.  Otherwise, all files
4141
4152
    will be reverted.  If the revision is not specified with '--revision', the
4192
4203
    def run(self, revision=None, no_backup=False, file_list=None,
4193
4204
            forget_merges=None):
4194
4205
        tree, file_list = tree_files(file_list)
4195
 
        tree.lock_write()
 
4206
        tree.lock_tree_write()
4196
4207
        self.add_cleanup(tree.unlock)
4197
4208
        if forget_merges:
4198
4209
            tree.set_parent_ids(tree.get_parent_ids()[:1])
4207
4218
 
4208
4219
 
4209
4220
class cmd_assert_fail(Command):
4210
 
    """Test reporting of assertion failures"""
 
4221
    __doc__ = """Test reporting of assertion failures"""
4211
4222
    # intended just for use in testing
4212
4223
 
4213
4224
    hidden = True
4217
4228
 
4218
4229
 
4219
4230
class cmd_help(Command):
4220
 
    """Show help on a command or other topic.
 
4231
    __doc__ = """Show help on a command or other topic.
4221
4232
    """
4222
4233
 
4223
4234
    _see_also = ['topics']
4236
4247
 
4237
4248
 
4238
4249
class cmd_shell_complete(Command):
4239
 
    """Show appropriate completions for context.
 
4250
    __doc__ = """Show appropriate completions for context.
4240
4251
 
4241
4252
    For a list of all available commands, say 'bzr shell-complete'.
4242
4253
    """
4251
4262
 
4252
4263
 
4253
4264
class cmd_missing(Command):
4254
 
    """Show unmerged/unpulled revisions between two branches.
 
4265
    __doc__ = """Show unmerged/unpulled revisions between two branches.
4255
4266
 
4256
4267
    OTHER_BRANCH may be local or remote.
4257
4268
 
4424
4435
 
4425
4436
 
4426
4437
class cmd_pack(Command):
4427
 
    """Compress the data within a repository."""
 
4438
    __doc__ = """Compress the data within a repository.
 
4439
 
 
4440
    This operation compresses the data within a bazaar repository. As
 
4441
    bazaar supports automatic packing of repository, this operation is
 
4442
    normally not required to be done manually.
 
4443
 
 
4444
    During the pack operation, bazaar takes a backup of existing repository
 
4445
    data, i.e. pack files. This backup is eventually removed by bazaar
 
4446
    automatically when it is safe to do so. To save disk space by removing
 
4447
    the backed up pack files, the --clean-obsolete-packs option may be
 
4448
    used.
 
4449
 
 
4450
    Warning: If you use --clean-obsolete-packs and your machine crashes
 
4451
    during or immediately after repacking, you may be left with a state
 
4452
    where the deletion has been written to disk but the new packs have not
 
4453
    been. In this case the repository may be unusable.
 
4454
    """
4428
4455
 
4429
4456
    _see_also = ['repositories']
4430
4457
    takes_args = ['branch_or_repo?']
 
4458
    takes_options = [
 
4459
        Option('clean-obsolete-packs', 'Delete obsolete packs to save disk space.'),
 
4460
        ]
4431
4461
 
4432
 
    def run(self, branch_or_repo='.'):
 
4462
    def run(self, branch_or_repo='.', clean_obsolete_packs=False):
4433
4463
        dir = bzrdir.BzrDir.open_containing(branch_or_repo)[0]
4434
4464
        try:
4435
4465
            branch = dir.open_branch()
4436
4466
            repository = branch.repository
4437
4467
        except errors.NotBranchError:
4438
4468
            repository = dir.open_repository()
4439
 
        repository.pack()
 
4469
        repository.pack(clean_obsolete_packs=clean_obsolete_packs)
4440
4470
 
4441
4471
 
4442
4472
class cmd_plugins(Command):
4443
 
    """List the installed plugins.
 
4473
    __doc__ = """List the installed plugins.
4444
4474
 
4445
4475
    This command displays the list of installed plugins including
4446
4476
    version of plugin and a short description of each.
4485
4515
 
4486
4516
 
4487
4517
class cmd_testament(Command):
4488
 
    """Show testament (signing-form) of a revision."""
 
4518
    __doc__ = """Show testament (signing-form) of a revision."""
4489
4519
    takes_options = [
4490
4520
            'revision',
4491
4521
            Option('long', help='Produce long-format testament.'),
4517
4547
 
4518
4548
 
4519
4549
class cmd_annotate(Command):
4520
 
    """Show the origin of each line in a file.
 
4550
    __doc__ = """Show the origin of each line in a file.
4521
4551
 
4522
4552
    This prints out the given file with an annotation on the left side
4523
4553
    indicating which revision, author and date introduced the change.
4570
4600
 
4571
4601
 
4572
4602
class cmd_re_sign(Command):
4573
 
    """Create a digital signature for an existing revision."""
 
4603
    __doc__ = """Create a digital signature for an existing revision."""
4574
4604
    # TODO be able to replace existing ones.
4575
4605
 
4576
4606
    hidden = True # is this right ?
4636
4666
 
4637
4667
 
4638
4668
class cmd_bind(Command):
4639
 
    """Convert the current branch into a checkout of the supplied branch.
 
4669
    __doc__ = """Convert the current branch into a checkout of the supplied branch.
4640
4670
 
4641
4671
    Once converted into a checkout, commits must succeed on the master branch
4642
4672
    before they will be applied to the local branch.
4676
4706
 
4677
4707
 
4678
4708
class cmd_unbind(Command):
4679
 
    """Convert the current checkout into a regular branch.
 
4709
    __doc__ = """Convert the current checkout into a regular branch.
4680
4710
 
4681
4711
    After unbinding, the local branch is considered independent and subsequent
4682
4712
    commits will be local only.
4693
4723
 
4694
4724
 
4695
4725
class cmd_uncommit(Command):
4696
 
    """Remove the last committed revision.
 
4726
    __doc__ = """Remove the last committed revision.
4697
4727
 
4698
4728
    --verbose will print out what is being removed.
4699
4729
    --dry-run will go through all the motions, but not actually
4801
4831
 
4802
4832
 
4803
4833
class cmd_break_lock(Command):
4804
 
    """Break a dead lock on a repository, branch or working directory.
 
4834
    __doc__ = """Break a dead lock on a repository, branch or working directory.
4805
4835
 
4806
4836
    CAUTION: Locks should only be broken when you are sure that the process
4807
4837
    holding the lock has been stopped.
4826
4856
 
4827
4857
 
4828
4858
class cmd_wait_until_signalled(Command):
4829
 
    """Test helper for test_start_and_stop_bzr_subprocess_send_signal.
 
4859
    __doc__ = """Test helper for test_start_and_stop_bzr_subprocess_send_signal.
4830
4860
 
4831
4861
    This just prints a line to signal when it is ready, then blocks on stdin.
4832
4862
    """
4840
4870
 
4841
4871
 
4842
4872
class cmd_serve(Command):
4843
 
    """Run the bzr server."""
 
4873
    __doc__ = """Run the bzr server."""
4844
4874
 
4845
4875
    aliases = ['server']
4846
4876
 
4906
4936
 
4907
4937
 
4908
4938
class cmd_join(Command):
4909
 
    """Combine a tree into its containing tree.
 
4939
    __doc__ = """Combine a tree into its containing tree.
4910
4940
 
4911
4941
    This command requires the target tree to be in a rich-root format.
4912
4942
 
4952
4982
 
4953
4983
 
4954
4984
class cmd_split(Command):
4955
 
    """Split a subdirectory of a tree into a separate tree.
 
4985
    __doc__ = """Split a subdirectory of a tree into a separate tree.
4956
4986
 
4957
4987
    This command will produce a target tree in a format that supports
4958
4988
    rich roots, like 'rich-root' or 'rich-root-pack'.  These formats cannot be
4978
5008
 
4979
5009
 
4980
5010
class cmd_merge_directive(Command):
4981
 
    """Generate a merge directive for auto-merge tools.
 
5011
    __doc__ = """Generate a merge directive for auto-merge tools.
4982
5012
 
4983
5013
    A directive requests a merge to be performed, and also provides all the
4984
5014
    information necessary to do so.  This means it must either include a
5077
5107
 
5078
5108
 
5079
5109
class cmd_send(Command):
5080
 
    """Mail or create a merge-directive for submitting changes.
 
5110
    __doc__ = """Mail or create a merge-directive for submitting changes.
5081
5111
 
5082
5112
    A merge directive provides many things needed for requesting merges:
5083
5113
 
5194
5224
 
5195
5225
 
5196
5226
class cmd_bundle_revisions(cmd_send):
5197
 
    """Create a merge-directive for submitting changes.
 
5227
    __doc__ = """Create a merge-directive for submitting changes.
5198
5228
 
5199
5229
    A merge directive provides many things needed for requesting merges:
5200
5230
 
5267
5297
 
5268
5298
 
5269
5299
class cmd_tag(Command):
5270
 
    """Create, remove or modify a tag naming a revision.
 
5300
    __doc__ = """Create, remove or modify a tag naming a revision.
5271
5301
 
5272
5302
    Tags give human-meaningful names to revisions.  Commands that take a -r
5273
5303
    (--revision) option can be given -rtag:X, where X is any previously
5340
5370
 
5341
5371
 
5342
5372
class cmd_tags(Command):
5343
 
    """List tags.
 
5373
    __doc__ = """List tags.
5344
5374
 
5345
5375
    This command shows a table of tag names and the revisions they reference.
5346
5376
    """
5414
5444
 
5415
5445
 
5416
5446
class cmd_reconfigure(Command):
5417
 
    """Reconfigure the type of a bzr directory.
 
5447
    __doc__ = """Reconfigure the type of a bzr directory.
5418
5448
 
5419
5449
    A target configuration must be specified.
5420
5450
 
5505
5535
 
5506
5536
 
5507
5537
class cmd_switch(Command):
5508
 
    """Set the branch of a checkout and update.
 
5538
    __doc__ = """Set the branch of a checkout and update.
5509
5539
 
5510
5540
    For lightweight checkouts, this changes the branch being referenced.
5511
5541
    For heavyweight checkouts, this checks that there are no local commits
5601
5631
 
5602
5632
 
5603
5633
class cmd_view(Command):
5604
 
    """Manage filtered views.
 
5634
    __doc__ = """Manage filtered views.
5605
5635
 
5606
5636
    Views provide a mask over the tree so that users can focus on
5607
5637
    a subset of a tree when doing their work. After creating a view,
5755
5785
 
5756
5786
 
5757
5787
class cmd_hooks(Command):
5758
 
    """Show hooks."""
 
5788
    __doc__ = """Show hooks."""
5759
5789
 
5760
5790
    hidden = True
5761
5791
 
5775
5805
 
5776
5806
 
5777
5807
class cmd_remove_branch(Command):
5778
 
    """Remove a branch.
 
5808
    __doc__ = """Remove a branch.
5779
5809
 
5780
5810
    This will remove the branch from the specified location but 
5781
5811
    will keep any working tree or repository in place.
5800
5830
        
5801
5831
 
5802
5832
class cmd_shelve(Command):
5803
 
    """Temporarily set aside some changes from the current tree.
 
5833
    __doc__ = """Temporarily set aside some changes from the current tree.
5804
5834
 
5805
5835
    Shelve allows you to temporarily put changes you've made "on the shelf",
5806
5836
    ie. out of the way, until a later time when you can bring them back from
5875
5905
 
5876
5906
 
5877
5907
class cmd_unshelve(Command):
5878
 
    """Restore shelved changes.
 
5908
    __doc__ = """Restore shelved changes.
5879
5909
 
5880
5910
    By default, the most recently shelved changes are restored. However if you
5881
5911
    specify a shelf by id those changes will be restored instead.  This works
5907
5937
 
5908
5938
 
5909
5939
class cmd_clean_tree(Command):
5910
 
    """Remove unwanted files from working tree.
 
5940
    __doc__ = """Remove unwanted files from working tree.
5911
5941
 
5912
5942
    By default, only unknown files, not ignored files, are deleted.  Versioned
5913
5943
    files are never deleted.
5941
5971
 
5942
5972
 
5943
5973
class cmd_reference(Command):
5944
 
    """list, view and set branch locations for nested trees.
 
5974
    __doc__ = """list, view and set branch locations for nested trees.
5945
5975
 
5946
5976
    If no arguments are provided, lists the branch locations for nested trees.
5947
5977
    If one argument is provided, display the branch location for that tree.