~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Jonathan Riddell
  • Date: 2011-07-12 11:09:57 UTC
  • mfrom: (5935.2.2 bzr-log-author)
  • mto: This revision was merged to the branch mainline in revision 6024.
  • Revision ID: jriddell@canonical.com-20110712110957-fpyny7txd2ccocjo
mergeĀ ~arnetheduck/bzr/bzr-log-author

Show diffs side-by-side

added added

removed removed

Lines of Context:
2317
2317
 
2318
2318
    :Other filtering:
2319
2319
 
2320
 
      The --message option can be used for finding revisions that match a
2321
 
      regular expression in a commit message.
 
2320
      The --match option can be used for finding revisions that match a
 
2321
      regular expression in a commit message, committer, author or bug.
 
2322
      Specifying the option several times will match any of the supplied
 
2323
      expressions. --match-author, --match-bugs, --match-committer and
 
2324
      --match-message can be used to only match a specific field.
2322
2325
 
2323
2326
    :Tips & tricks:
2324
2327
 
2384
2387
                   argname='N',
2385
2388
                   type=_parse_levels),
2386
2389
            Option('message',
2387
 
                   short_name='m',
2388
2390
                   help='Show revisions whose message matches this '
2389
2391
                        'regular expression.',
2390
 
                   type=str),
 
2392
                   type=str,
 
2393
                   hidden=True),
2391
2394
            Option('limit',
2392
2395
                   short_name='l',
2393
2396
                   help='Limit the output to the first N revisions.',
2404
2407
                   ),
2405
2408
            Option('signatures',
2406
2409
                   help='Show digital signature validity'),
 
2410
            ListOption('match',
 
2411
                short_name='m',
 
2412
                help='Show revisions whose properties match this '
 
2413
                'expression.',
 
2414
                type=str),
 
2415
            ListOption('match-message',
 
2416
                   help='Show revisions whose message matches this '
 
2417
                   'expression.',
 
2418
                type=str),
 
2419
            ListOption('match-committer',
 
2420
                   help='Show revisions whose committer matches this '
 
2421
                   'expression.',
 
2422
                type=str),
 
2423
            ListOption('match-author',
 
2424
                   help='Show revisions whose authors match this '
 
2425
                   'expression.',
 
2426
                type=str),
 
2427
            ListOption('match-bugs',
 
2428
                   help='Show revisions whose bugs match this '
 
2429
                   'expression.',
 
2430
                type=str)
2407
2431
            ]
2408
2432
    encoding_type = 'replace'
2409
2433
 
2423
2447
            authors=None,
2424
2448
            exclude_common_ancestry=False,
2425
2449
            signatures=False,
 
2450
            match=None,
 
2451
            match_message=None,
 
2452
            match_committer=None,
 
2453
            match_author=None,
 
2454
            match_bugs=None,
2426
2455
            ):
2427
2456
        from bzrlib.log import (
2428
2457
            Logger,
2531
2560
        match_using_deltas = (len(file_ids) != 1 or filter_by_dir
2532
2561
            or delta_type or partial_history)
2533
2562
 
 
2563
        match_dict = {}
 
2564
        if match:
 
2565
            match_dict[''] = match
 
2566
        if match_message:
 
2567
            match_dict['message'] = match_message
 
2568
        if match_committer:
 
2569
            match_dict['committer'] = match_committer
 
2570
        if match_author:
 
2571
            match_dict['author'] = match_author
 
2572
        if match_bugs:
 
2573
            match_dict['bugs'] = match_bugs
 
2574
            
2534
2575
        # Build the LogRequest and execute it
2535
2576
        if len(file_ids) == 0:
2536
2577
            file_ids = None
2539
2580
            start_revision=rev1, end_revision=rev2, limit=limit,
2540
2581
            message_search=message, delta_type=delta_type,
2541
2582
            diff_type=diff_type, _match_using_deltas=match_using_deltas,
2542
 
            exclude_common_ancestry=exclude_common_ancestry,
 
2583
            exclude_common_ancestry=exclude_common_ancestry, match=match_dict,
2543
2584
            signature=signatures
2544
2585
            )
2545
2586
        Logger(b, rqst).show(lf)