/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: Aaron Bentley
  • Date: 2007-07-12 07:37:18 UTC
  • mfrom: (2603 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2606.
  • Revision ID: aaron.bentley@utoronto.ca-20070712073718-255ekb0xllut6jmb
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
169
169
    
170
170
    takes_args = ['file*']
171
171
    takes_options = ['show-ids', 'revision',
172
 
                     Option('short', help='Give short SVN-style status lines'),
173
 
                     Option('versioned', help='Only show versioned files')]
 
172
                     Option('short', help='Give short SVN-style status lines.'),
 
173
                     Option('versioned', help='Only show versioned files.')]
174
174
    aliases = ['st', 'stat']
175
175
 
176
176
    encoding_type = 'replace'
341
341
    takes_args = ['file*']
342
342
    takes_options = ['no-recurse', 'dry-run', 'verbose',
343
343
                     Option('file-ids-from', type=unicode,
344
 
                            help='Lookup file ids from here')]
 
344
                            help='Lookup file ids from this tree.')]
345
345
    encoding_type = 'replace'
346
346
    _see_also = ['remove']
347
347
 
507
507
    """
508
508
 
509
509
    takes_args = ['names*']
510
 
    takes_options = [Option("after", help="move only the bzr identifier"
511
 
        " of the file (file has already been moved). Use this flag if"
512
 
        " bzr is not able to detect this itself.")]
 
510
    takes_options = [Option("after", help="Move only the bzr identifier"
 
511
        " of the file, because the file has already been moved."),
 
512
        ]
513
513
    aliases = ['move', 'rename']
514
514
    encoding_type = 'replace'
515
515
 
557
557
    _see_also = ['push', 'update', 'status-flags']
558
558
    takes_options = ['remember', 'overwrite', 'revision', 'verbose',
559
559
        Option('directory',
560
 
            help='branch to pull into, '
561
 
                 'rather than the one containing the working directory',
 
560
            help='Branch to pull into, '
 
561
                 'rather than the one containing the working directory.',
562
562
            short_name='d',
563
563
            type=unicode,
564
564
            ),
665
665
    takes_options = ['remember', 'overwrite', 'verbose',
666
666
        Option('create-prefix',
667
667
               help='Create the path leading up to the branch '
668
 
                    'if it does not already exist'),
 
668
                    'if it does not already exist.'),
669
669
        Option('directory',
670
 
            help='branch to push from, '
671
 
                 'rather than the one containing the working directory',
 
670
            help='Branch to push from, '
 
671
                 'rather than the one containing the working directory.',
672
672
            short_name='d',
673
673
            type=unicode,
674
674
            ),
675
675
        Option('use-existing-dir',
676
676
               help='By default push will fail if the target'
677
677
                    ' directory exists, but does not already'
678
 
                    ' have a control directory. This flag will'
 
678
                    ' have a control directory.  This flag will'
679
679
                    ' allow push to proceed.'),
680
680
        ]
681
681
    takes_args = ['location?']
908
908
    takes_args = ['branch_location?', 'to_location?']
909
909
    takes_options = ['revision',
910
910
                     Option('lightweight',
911
 
                            help="perform a lightweight checkout. Lightweight "
 
911
                            help="Perform a lightweight checkout.  Lightweight "
912
912
                                 "checkouts depend on access to the branch for "
913
 
                                 "every operation. Normal checkouts can perform "
 
913
                                 "every operation.  Normal checkouts can perform "
914
914
                                 "common operations like diff and status without "
915
915
                                 "such access, and also support local commits."
916
916
                            ),
1070
1070
    """
1071
1071
    takes_args = ['file*']
1072
1072
    takes_options = ['verbose',
1073
 
        Option('new', help='remove newly-added files'),
 
1073
        Option('new', help='Remove newly-added files.'),
1074
1074
        RegistryOption.from_kwargs('file-deletion-strategy',
1075
1075
            'The file deletion mode to be used',
1076
1076
            title='Deletion Strategy', value_switches=True, enum_switch=False,
1244
1244
    takes_options = [
1245
1245
        Option('create-prefix',
1246
1246
               help='Create the path leading up to the branch '
1247
 
                    'if it does not already exist'),
 
1247
                    'if it does not already exist.'),
1248
1248
         RegistryOption('format',
1249
1249
                help='Specify a format for this branch. '
1250
1250
                'See "help formats".',
1329
1329
    takes_args = ["location"]
1330
1330
    takes_options = [RegistryOption('format',
1331
1331
                            help='Specify a format for this repository. See'
1332
 
                                 ' "bzr help formats" for details',
 
1332
                                 ' "bzr help formats" for details.',
1333
1333
                            registry=bzrdir.format_registry,
1334
1334
                            converter=bzrdir.format_registry.make_bzrdir,
1335
1335
                            value_switches=True, title='Repository format'),
1336
1336
                     Option('no-trees',
1337
1337
                             help='Branches in the repository will default to'
1338
 
                                  ' not having a working tree'),
 
1338
                                  ' not having a working tree.'),
1339
1339
                    ]
1340
1340
    aliases = ["init-repo"]
1341
1341
 
1394
1394
        Option('prefix', type=str,
1395
1395
               short_name='p',
1396
1396
               help='Set prefixes to added to old and new filenames, as '
1397
 
                    'two values separated by a colon. (eg "old/:new/")'),
 
1397
                    'two values separated by a colon. (eg "old/:new/").'),
1398
1398
        ]
1399
1399
    aliases = ['di', 'dif']
1400
1400
    encoding_type = 'exact'
1585
1585
    # TODO: Make --revision support uuid: and hash: [future tag:] notation.
1586
1586
 
1587
1587
    takes_args = ['location?']
1588
 
    takes_options = [Option('forward', 
1589
 
                            help='show from oldest to newest'),
1590
 
                     'timezone', 
1591
 
                     Option('verbose', 
1592
 
                             short_name='v',
1593
 
                             help='show files changed in each revision'),
1594
 
                     'show-ids', 'revision',
1595
 
                     'log-format',
1596
 
                     Option('message',
1597
 
                            short_name='m',
1598
 
                            help='show revisions whose message matches this regexp',
1599
 
                            type=str),
1600
 
                     Option('limit', 
1601
 
                            help='limit the output to the first N revisions',
1602
 
                            type=_parse_limit),
1603
 
                     ]
 
1588
    takes_options = [
 
1589
            Option('forward',
 
1590
                   help='Show from oldest to newest.'),
 
1591
            'timezone',
 
1592
            Option('verbose',
 
1593
                   short_name='v',
 
1594
                   help='Show files changed in each revision.'),
 
1595
            'show-ids',
 
1596
            'revision',
 
1597
            'log-format',
 
1598
            Option('message',
 
1599
                   short_name='m',
 
1600
                   help='Show revisions whose message matches this '
 
1601
                        'regular expression.',
 
1602
                   type=str),
 
1603
            Option('limit',
 
1604
                   help='Limit the output to the first N revisions.',
 
1605
                   argname='N',
 
1606
                   type=_parse_limit),
 
1607
            ]
1604
1608
    encoding_type = 'replace'
1605
1609
 
1606
1610
    @display_command
1719
1723
    _see_also = ['status', 'cat']
1720
1724
    takes_args = ['path?']
1721
1725
    # TODO: Take a revision or remote path and list that tree instead.
1722
 
    takes_options = ['verbose', 'revision',
1723
 
                     Option('non-recursive',
1724
 
                            help='don\'t recurse into sub-directories'),
1725
 
                     Option('from-root',
1726
 
                            help='Print all paths from the root of the branch.'),
1727
 
                     Option('unknown', help='Print unknown files'),
1728
 
                     Option('versioned', help='Print versioned files'),
1729
 
                     Option('ignored', help='Print ignored files'),
1730
 
 
1731
 
                     Option('null', help='Null separate the files'),
1732
 
                     'kind', 'show-ids'
1733
 
                    ]
 
1726
    takes_options = [
 
1727
            'verbose',
 
1728
            'revision',
 
1729
            Option('non-recursive',
 
1730
                   help='Don\'t recurse into subdirectories.'),
 
1731
            Option('from-root',
 
1732
                   help='Print paths relative to the root of the branch.'),
 
1733
            Option('unknown', help='Print unknown files.'),
 
1734
            Option('versioned', help='Print versioned files.'),
 
1735
            Option('ignored', help='Print ignored files.'),
 
1736
            Option('null',
 
1737
                   help='Write an ascii NUL (\\0) separator '
 
1738
                   'between files rather than a newline.'),
 
1739
            'kind',
 
1740
            'show-ids',
 
1741
            ]
1734
1742
    @display_command
1735
1743
    def run(self, revision=None, verbose=False, 
1736
1744
            non_recursive=False, from_root=False,
1854
1862
    _see_also = ['status', 'ignored']
1855
1863
    takes_args = ['name_pattern*']
1856
1864
    takes_options = [
1857
 
                     Option('old-default-rules',
1858
 
                            help='Out the ignore rules bzr < 0.9 always used.')
1859
 
                     ]
 
1865
        Option('old-default-rules',
 
1866
               help='Write out the ignore rules bzr < 0.9 always used.')
 
1867
        ]
1860
1868
    
1861
1869
    def run(self, name_pattern_list=None, old_default_rules=None):
1862
1870
        from bzrlib.atomicfile import AtomicFile
2098
2106
 
2099
2107
    _see_also = ['bugs', 'uncommit']
2100
2108
    takes_args = ['selected*']
2101
 
    takes_options = ['message', 'verbose', 
2102
 
                     Option('unchanged',
2103
 
                            help='commit even if nothing has changed'),
2104
 
                     Option('file', type=str, 
2105
 
                            short_name='F',
2106
 
                            argname='msgfile',
2107
 
                            help='file containing commit message'),
2108
 
                     Option('strict',
2109
 
                            help="refuse to commit if there are unknown "
2110
 
                            "files in the working tree."),
2111
 
                     ListOption('fixes', type=str,
2112
 
                                help="mark a bug as being fixed by this "
2113
 
                                     "revision."),
2114
 
                     Option('local',
2115
 
                            help="perform a local only commit in a bound "
2116
 
                                 "branch. Such commits are not pushed to "
2117
 
                                 "the master branch until a normal commit "
2118
 
                                 "is performed."
2119
 
                            ),
2120
 
                     ]
 
2109
    takes_options = [
 
2110
            'message',
 
2111
            'verbose',
 
2112
             Option('unchanged',
 
2113
                    help='Commit even if nothing has changed.'),
 
2114
             Option('file', type=str,
 
2115
                    short_name='F',
 
2116
                    argname='msgfile',
 
2117
                    help='Take commit message from this file.'),
 
2118
             Option('strict',
 
2119
                    help="Refuse to commit if there are unknown "
 
2120
                    "files in the working tree."),
 
2121
             ListOption('fixes', type=str,
 
2122
                    help="Mark a bug as being fixed by this revision."),
 
2123
             Option('local',
 
2124
                    help="Perform a local commit in a bound "
 
2125
                         "branch.  Local commits are not pushed to "
 
2126
                         "the master branch until a normal commit "
 
2127
                         "is performed."
 
2128
                    ),
 
2129
             ]
2121
2130
    aliases = ['ci', 'checkin']
2122
2131
 
2123
2132
    def _get_bug_fix_properties(self, fixes, branch):
2254
2263
    takes_options = [
2255
2264
                    RegistryOption('format',
2256
2265
                        help='Upgrade to a specific format.  See "bzr help'
2257
 
                             ' formats" for details',
 
2266
                             ' formats" for details.',
2258
2267
                        registry=bzrdir.format_registry,
2259
2268
                        converter=bzrdir.format_registry.make_bzrdir,
2260
2269
                        value_switches=True, title='Branch format'),
2275
2284
        bzr whoami 'Frank Chu <fchu@example.com>'
2276
2285
    """
2277
2286
    takes_options = [ Option('email',
2278
 
                             help='display email address only'),
 
2287
                             help='Display email address only.'),
2279
2288
                      Option('branch',
2280
 
                             help='set identity for the current branch instead of '
2281
 
                                  'globally'),
 
2289
                             help='Set identity for the current branch instead of '
 
2290
                                  'globally.'),
2282
2291
                    ]
2283
2292
    takes_args = ['name?']
2284
2293
    encoding_type = 'replace'
2398
2407
    takes_args = ['testspecs*']
2399
2408
    takes_options = ['verbose',
2400
2409
                     Option('one',
2401
 
                             help='stop when one test fails',
 
2410
                             help='Stop when one test fails.',
2402
2411
                             short_name='1',
2403
2412
                             ),
2404
2413
                     Option('keep-output',
2405
 
                            help='keep output directories when tests fail'),
 
2414
                            help='Keep output directories when tests fail.'),
2406
2415
                     Option('transport',
2407
2416
                            help='Use a different transport by default '
2408
2417
                                 'throughout the test suite.',
2409
2418
                            type=get_transport_type),
2410
 
                     Option('benchmark', help='run the bzr benchmarks.'),
 
2419
                     Option('benchmark',
 
2420
                            help='Run the benchmarks rather than selftests.'),
2411
2421
                     Option('lsprof-timed',
2412
 
                            help='generate lsprof output for benchmarked'
 
2422
                            help='Generate lsprof output for benchmarked'
2413
2423
                                 ' sections of code.'),
2414
2424
                     Option('cache-dir', type=str,
2415
 
                            help='a directory to cache intermediate'
2416
 
                                 ' benchmark steps'),
 
2425
                            help='Cache intermediate benchmark output in this '
 
2426
                                 'directory.'),
2417
2427
                     Option('clean-output',
2418
 
                            help='clean temporary tests directories'
2419
 
                                 ' without running tests'),
 
2428
                            help='Clean temporary tests directories'
 
2429
                                 ' without running tests.'),
2420
2430
                     Option('first',
2421
 
                            help='run all tests, but run specified tests first',
 
2431
                            help='Run all tests, but run specified tests first.',
2422
2432
                            short_name='f',
2423
2433
                            ),
2424
2434
                     Option('numbered-dirs',
2425
 
                            help='use numbered dirs for TestCaseInTempDir'),
 
2435
                            help='Use numbered dirs for TestCaseInTempDir.'),
2426
2436
                     Option('list-only',
2427
 
                            help='list the tests instead of running them'),
 
2437
                            help='List the tests instead of running them.'),
2428
2438
                     Option('randomize', type=str, argname="SEED",
2429
 
                            help='randomize the order of tests using the given'
2430
 
                                 ' seed or "now" for the current time'),
 
2439
                            help='Randomize the order of tests using the given'
 
2440
                                 ' seed or "now" for the current time.'),
2431
2441
                     Option('exclude', type=str, argname="PATTERN",
2432
2442
                            short_name='x',
2433
 
                            help='exclude tests that match this regular'
2434
 
                                 ' expression'),
 
2443
                            help='Exclude tests that match this regular'
 
2444
                                 ' expression.'),
2435
2445
                     ]
2436
2446
    encoding_type = 'replace'
2437
2447
 
2591
2601
    takes_args = ['branch?']
2592
2602
    takes_options = ['revision', 'force', 'merge-type', 'reprocess', 'remember',
2593
2603
        Option('show-base', help="Show base revision text in "
2594
 
               "conflicts"),
 
2604
               "conflicts."),
2595
2605
        Option('uncommitted', help='Apply uncommitted changes'
2596
 
               ' from a working copy, instead of branch changes'),
 
2606
               ' from a working copy, instead of branch changes.'),
2597
2607
        Option('pull', help='If the destination is already'
2598
2608
                ' completely merged into the source, pull from the'
2599
 
                ' source rather than merging. When this happens,'
 
2609
                ' source rather than merging.  When this happens,'
2600
2610
                ' you do not need to commit the result.'),
2601
2611
        Option('directory',
2602
2612
            help='Branch to merge into, '
2603
 
                 'rather than the one containing the working directory',
 
2613
                 'rather than the one containing the working directory.',
2604
2614
            short_name='d',
2605
2615
            type=unicode,
2606
2616
            ),
2765
2775
        additional processing to reduce the size of conflict regions.
2766
2776
    """
2767
2777
    takes_args = ['file*']
2768
 
    takes_options = ['merge-type', 'reprocess',
2769
 
                     Option('show-base', help="Show base revision text in "
2770
 
                            "conflicts")]
 
2778
    takes_options = [
 
2779
            'merge-type',
 
2780
            'reprocess',
 
2781
            Option('show-base',
 
2782
                   help="Show base revision text in conflicts."),
 
2783
            ]
2771
2784
 
2772
2785
    def run(self, file_list=None, merge_type=None, show_base=False,
2773
2786
            reprocess=False):
2897
2910
    """
2898
2911
 
2899
2912
    _see_also = ['topics']
2900
 
    takes_options = [Option('long', 'show help on all commands')]
 
2913
    takes_options = [
 
2914
            Option('long', 'Show help on all commands.'),
 
2915
            ]
2901
2916
    takes_args = ['topic?']
2902
2917
    aliases = ['?', '--help', '-?', '-h']
2903
2918
    
2946
2961
 
2947
2962
    _see_also = ['merge', 'pull']
2948
2963
    takes_args = ['other_branch?']
2949
 
    takes_options = [Option('reverse', 'Reverse the order of revisions'),
2950
 
                     Option('mine-only', 
2951
 
                            'Display changes in the local branch only'),
2952
 
                     Option('this' , 'same as --mine-only'),
2953
 
                     Option('theirs-only', 
2954
 
                            'Display changes in the remote branch only'),
2955
 
                     Option('other', 'same as --theirs-only'),
2956
 
                     'log-format',
2957
 
                     'show-ids',
2958
 
                     'verbose'
2959
 
                     ]
 
2964
    takes_options = [
 
2965
            Option('reverse', 'Reverse the order of revisions.'),
 
2966
            Option('mine-only',
 
2967
                   'Display changes in the local branch only.'),
 
2968
            Option('this' , 'Same as --mine-only.'),
 
2969
            Option('theirs-only',
 
2970
                   'Display changes in the remote branch only.'),
 
2971
            Option('other', 'Same as --theirs-only.'),
 
2972
            'log-format',
 
2973
            'show-ids',
 
2974
            'verbose'
 
2975
            ]
2960
2976
    encoding_type = 'replace'
2961
2977
 
2962
2978
    @display_command
3057
3073
 
3058
3074
class cmd_testament(Command):
3059
3075
    """Show testament (signing-form) of a revision."""
3060
 
    takes_options = ['revision',
3061
 
                     Option('long', help='Produce long-format testament'), 
3062
 
                     Option('strict', help='Produce a strict-format'
3063
 
                            ' testament')]
 
3076
    takes_options = [
 
3077
            'revision',
 
3078
            Option('long', help='Produce long-format testament.'),
 
3079
            Option('strict',
 
3080
                   help='Produce a strict-format testament.')]
3064
3081
    takes_args = ['branch?']
3065
3082
    @display_command
3066
3083
    def run(self, branch=u'.', revision=None, long=False, strict=False):
3099
3116
    #       with new uncommitted lines marked
3100
3117
    aliases = ['ann', 'blame', 'praise']
3101
3118
    takes_args = ['filename']
3102
 
    takes_options = [Option('all', help='show annotations on all lines'),
3103
 
                     Option('long', help='show date in annotations'),
 
3119
    takes_options = [Option('all', help='Show annotations on all lines.'),
 
3120
                     Option('long', help='Show commit date in annotations.'),
3104
3121
                     'revision',
3105
3122
                     'show-ids',
3106
3123
                     ]
3236
3253
    # information in shared branches as well.
3237
3254
    _see_also = ['commit']
3238
3255
    takes_options = ['verbose', 'revision',
3239
 
                    Option('dry-run', help='Don\'t actually make changes'),
 
3256
                    Option('dry-run', help='Don\'t actually make changes.'),
3240
3257
                    Option('force', help='Say yes to all questions.')]
3241
3258
    takes_args = ['location?']
3242
3259
    aliases = []
3346
3363
 
3347
3364
    takes_options = [
3348
3365
        Option('inet',
3349
 
               help='serve on stdin/out for use from inetd or sshd'),
 
3366
               help='Serve on stdin/out for use from inetd or sshd.'),
3350
3367
        Option('port',
3351
 
               help='listen for connections on nominated port of the form '
3352
 
                    '[hostname:]portnumber. Passing 0 as the port number will '
3353
 
                    'result in a dynamically allocated port. Default port is '
 
3368
               help='Listen for connections on nominated port of the form '
 
3369
                    '[hostname:]portnumber.  Passing 0 as the port number will '
 
3370
                    'result in a dynamically allocated port.  The default port is '
3354
3371
                    '4155.',
3355
3372
               type=str),
3356
3373
        Option('directory',
3357
 
               help='serve contents of directory',
 
3374
               help='Serve contents of this directory.',
3358
3375
               type=unicode),
3359
3376
        Option('allow-writes',
3360
 
               help='By default the server is a readonly server. Supplying '
 
3377
               help='By default the server is a readonly server.  Supplying '
3361
3378
                    '--allow-writes enables write access to the contents of '
3362
 
                    'the served directory and below. '
 
3379
                    'the served directory and below.'
3363
3380
                ),
3364
3381
        ]
3365
3382
 
3425
3442
 
3426
3443
    _see_also = ['split']
3427
3444
    takes_args = ['tree']
3428
 
    takes_options = [Option('reference', 'join by reference')]
 
3445
    takes_options = [
 
3446
            Option('reference', help='Join by reference.'),
 
3447
            ]
3429
3448
    hidden = True
3430
3449
 
3431
3450
    def run(self, tree, reference=False):
3506
3525
    takes_options = [
3507
3526
        RegistryOption.from_kwargs('patch-type',
3508
3527
            'The type of patch to include in the directive',
3509
 
            title='Patch type', value_switches=True, enum_switch=False,
3510
 
            bundle='Bazaar revision bundle (default)',
3511
 
            diff='Normal unified diff',
3512
 
            plain='No patch, just directive'),
3513
 
        Option('sign', help='GPG-sign the directive'), 'revision',
 
3528
            title='Patch type',
 
3529
            value_switches=True,
 
3530
            enum_switch=False,
 
3531
            bundle='Bazaar revision bundle (default).',
 
3532
            diff='Normal unified diff.',
 
3533
            plain='No patch, just directive.'),
 
3534
        Option('sign', help='GPG-sign the directive.'), 'revision',
3514
3535
        Option('mail-to', type=str,
3515
 
            help='Instead of printing the directive, email to this address'),
 
3536
            help='Instead of printing the directive, email to this address.'),
3516
3537
        Option('message', type=str, short_name='m',
3517
 
            help='Message to use when committing this merge')
 
3538
            help='Message to use when committing this merge.')
3518
3539
        ]
3519
3540
 
3520
3541
    encoding_type = 'exact'
3597
3618
            type=unicode,
3598
3619
            ),
3599
3620
        Option('force',
3600
 
            help='Replace existing tags',
 
3621
            help='Replace existing tags.',
3601
3622
            ),
3602
3623
        'revision',
3603
3624
        ]
3640
3661
    _see_also = ['tag']
3641
3662
    takes_options = [
3642
3663
        Option('directory',
3643
 
            help='Branch whose tags should be displayed',
 
3664
            help='Branch whose tags should be displayed.',
3644
3665
            short_name='d',
3645
3666
            type=unicode,
3646
3667
            ),