~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

Merge in bzr.dev 3801, resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
3441
3441
            show_ids=False, verbose=False, this=False, other=False,
3442
3442
            include_merges=False):
3443
3443
        from bzrlib.missing import find_unmerged, iter_log_revisions
 
3444
        def message(s):
 
3445
            if not is_quiet():
 
3446
                self.outf.write(s)
3444
3447
 
3445
3448
        if this:
3446
3449
            mine_only = this
3464
3467
                                             " or specified.")
3465
3468
            display_url = urlutils.unescape_for_display(parent,
3466
3469
                                                        self.outf.encoding)
3467
 
            self.outf.write("Using saved parent location: "
 
3470
            message("Using saved parent location: "
3468
3471
                    + display_url + "\n")
3469
3472
 
3470
3473
        remote_branch = Branch.open(other_branch)
3488
3491
 
3489
3492
                status_code = 0
3490
3493
                if local_extra and not theirs_only:
3491
 
                    self.outf.write("You have %d extra revision(s):\n" %
3492
 
                                    len(local_extra))
 
3494
                    message("You have %d extra revision(s):\n" %
 
3495
                        len(local_extra))
3493
3496
                    for revision in iter_log_revisions(local_extra,
3494
3497
                                        local_branch.repository,
3495
3498
                                        verbose):
3501
3504
 
3502
3505
                if remote_extra and not mine_only:
3503
3506
                    if printed_local is True:
3504
 
                        self.outf.write("\n\n\n")
3505
 
                    self.outf.write("You are missing %d revision(s):\n" %
3506
 
                                    len(remote_extra))
 
3507
                        message("\n\n\n")
 
3508
                    message("You are missing %d revision(s):\n" %
 
3509
                        len(remote_extra))
3507
3510
                    for revision in iter_log_revisions(remote_extra,
3508
3511
                                        remote_branch.repository,
3509
3512
                                        verbose):
3512
3515
 
3513
3516
                if mine_only and not local_extra:
3514
3517
                    # We checked local, and found nothing extra
3515
 
                    self.outf.write('This branch is up to date.\n')
 
3518
                    message('This branch is up to date.\n')
3516
3519
                elif theirs_only and not remote_extra:
3517
3520
                    # We checked remote, and found nothing extra
3518
 
                    self.outf.write('Other branch is up to date.\n')
 
3521
                    message('Other branch is up to date.\n')
3519
3522
                elif not (mine_only or theirs_only or local_extra or
3520
3523
                          remote_extra):
3521
3524
                    # We checked both branches, and neither one had extra
3522
3525
                    # revisions
3523
 
                    self.outf.write("Branches are up to date.\n")
 
3526
                    message("Branches are up to date.\n")
3524
3527
            finally:
3525
3528
                remote_branch.unlock()
3526
3529
        finally: