/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
  • Date: 2010-05-03 20:57:39 UTC
  • mto: This revision was merged to the branch mainline in revision 5204.
  • Revision ID: gzlist@googlemail.com-20100503205739-n326zdvevv0rmruh
Retain original stack and error message when translating to ValueError in bencode

Show diffs side-by-side

added added

removed removed

Lines of Context:
1132
1132
        else:
1133
1133
            revision_id = None
1134
1134
        if tree is not None and revision_id is None:
1135
 
            tree.warn_if_changed_or_out_of_date(
1136
 
                strict, 'push_strict', 'Use --no-strict to force the push.')
 
1135
            tree.check_changed_or_out_of_date(
 
1136
                strict, 'push_strict',
 
1137
                more_error='Use --no-strict to force the push.',
 
1138
                more_warning='Uncommitted changes will not be pushed.')
1137
1139
        # Get the stacked_on branch, if any
1138
1140
        if stacked_on is not None:
1139
1141
            stacked_on = urlutils.normalize_url(stacked_on)
2297
2299
                   help='Show changes made in each revision as a patch.'),
2298
2300
            Option('include-merges',
2299
2301
                   help='Show merged revisions like --levels 0 does.'),
 
2302
            Option('exclude-common-ancestry',
 
2303
                   help='Display only the revisions that are not part'
 
2304
                   ' of both ancestries (require -rX..Y)'
 
2305
                   )
2300
2306
            ]
2301
2307
    encoding_type = 'replace'
2302
2308
 
2312
2318
            message=None,
2313
2319
            limit=None,
2314
2320
            show_diff=False,
2315
 
            include_merges=False):
 
2321
            include_merges=False,
 
2322
            exclude_common_ancestry=False,
 
2323
            ):
2316
2324
        from bzrlib.log import (
2317
2325
            Logger,
2318
2326
            make_log_request_dict,
2319
2327
            _get_info_for_log_files,
2320
2328
            )
2321
2329
        direction = (forward and 'forward') or 'reverse'
 
2330
        if (exclude_common_ancestry
 
2331
            and (revision is None or len(revision) != 2)):
 
2332
            raise errors.BzrCommandError(
 
2333
                '--exclude-common-ancestry requires -r with two revisions')
2322
2334
        if include_merges:
2323
2335
            if levels is None:
2324
2336
                levels = 0
2417
2429
            direction=direction, specific_fileids=file_ids,
2418
2430
            start_revision=rev1, end_revision=rev2, limit=limit,
2419
2431
            message_search=message, delta_type=delta_type,
2420
 
            diff_type=diff_type, _match_using_deltas=match_using_deltas)
 
2432
            diff_type=diff_type, _match_using_deltas=match_using_deltas,
 
2433
            exclude_common_ancestry=exclude_common_ancestry,
 
2434
            )
2421
2435
        Logger(b, rqst).show(lf)
2422
2436
 
2423
2437
 
3059
3073
                         "the master branch until a normal commit "
3060
3074
                         "is performed."
3061
3075
                    ),
3062
 
             Option('show-diff',
 
3076
             Option('show-diff', short_name='p',
3063
3077
                    help='When no message is supplied, show the diff along'
3064
3078
                    ' with the status summary in the message editor.'),
3065
3079
             ]
4667
4681
 
4668
4682
class cmd_bind(Command):
4669
4683
    __doc__ = """Convert the current branch into a checkout of the supplied branch.
 
4684
    If no branch is supplied, rebind to the last bound location.
4670
4685
 
4671
4686
    Once converted into a checkout, commits must succeed on the master branch
4672
4687
    before they will be applied to the local branch.