~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

[patch] show number of revisions pushed/pulled/merged (Robey Pointer)

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
        br_from = Branch.open(location)
395
395
        try:
396
396
            old_rh = br_to.revision_history()
397
 
            br_to.working_tree().pull(br_from, overwrite)
 
397
            count = br_to.working_tree().pull(br_from, overwrite)
398
398
        except DivergedBranches:
399
399
            raise BzrCommandError("These branches have diverged."
400
400
                                  "  Try merge.")
401
401
        if br_to.get_parent() is None or remember:
402
402
            br_to.set_parent(location)
 
403
        note('%d revision(s) pulled.' % (count,))
403
404
 
404
405
        if verbose:
405
406
            new_rh = br_to.revision_history()
483
484
            br_to = Branch.initialize(location)
484
485
        try:
485
486
            old_rh = br_to.revision_history()
486
 
            br_to.pull(br_from, overwrite)
 
487
            count = br_to.pull(br_from, overwrite)
487
488
        except DivergedBranches:
488
489
            raise BzrCommandError("These branches have diverged."
489
490
                                  "  Try a merge then push with overwrite.")
490
491
        if br_from.get_push_location() is None or remember:
491
492
            br_from.set_push_location(location)
 
493
        note('%d revision(s) pushed.' % (count,))
492
494
 
493
495
        if verbose:
494
496
            new_rh = br_to.revision_history()
567
569
                rmtree(to_location)
568
570
                msg = "The branch %s cannot be used as a --basis"
569
571
                raise BzrCommandError(msg)
 
572
            branch = Branch.open(to_location)
570
573
            if name:
571
 
                branch = Branch.open(to_location)
572
574
                name = StringIO(name)
573
575
                branch.put_controlfile('branch-name', name)
 
576
            note('Branched %d revision(s).' % branch.revno())
574
577
        finally:
575
578
            br_from.unlock()
576
579
 
1254
1257
        except StrictCommitFailed:
1255
1258
            raise BzrCommandError("Commit refused because there are unknown "
1256
1259
                                  "files in the working tree.")
1257
 
 
 
1260
        note('Committed revision %d.' % (b.revno(),))
 
1261
        
1258
1262
 
1259
1263
class cmd_check(Command):
1260
1264
    """Validate consistency of branch history.