=== modified file 'bzrlib/branch.py' --- bzrlib/branch.py +++ bzrlib/branch.py @@ -1170,12 +1170,15 @@ """See Branch.pull.""" source.lock_read() try: + old_count = len(self.revision_history()) try: self.update_revisions(source) except DivergedBranches: if not overwrite: raise self.set_revision_history(source.revision_history()) + new_count = len(self.revision_history()) + return new_count - old_count finally: source.unlock() === modified file 'bzrlib/builtins.py' --- bzrlib/builtins.py +++ bzrlib/builtins.py @@ -394,12 +394,13 @@ br_from = Branch.open(location) try: old_rh = br_to.revision_history() - br_to.working_tree().pull(br_from, overwrite) + count = br_to.working_tree().pull(br_from, overwrite) except DivergedBranches: raise BzrCommandError("These branches have diverged." " Try merge.") if br_to.get_parent() is None or remember: br_to.set_parent(location) + note('%d revision(s) pulled.' % (count,)) if verbose: new_rh = br_to.revision_history() @@ -483,12 +484,13 @@ br_to = Branch.initialize(location) try: old_rh = br_to.revision_history() - br_to.pull(br_from, overwrite) + count = br_to.pull(br_from, overwrite) except DivergedBranches: raise BzrCommandError("These branches have diverged." " Try a merge then push with overwrite.") if br_from.get_push_location() is None or remember: br_from.set_push_location(location) + note('%d revision(s) pushed.' % (count,)) if verbose: new_rh = br_to.revision_history() @@ -567,10 +569,11 @@ rmtree(to_location) msg = "The branch %s cannot be used as a --basis" raise BzrCommandError(msg) + branch = Branch.open(to_location) if name: - branch = Branch.open(to_location) name = StringIO(name) branch.put_controlfile('branch-name', name) + note('Branched %d revision(s).' % branch.revno()) finally: br_from.unlock() @@ -1254,7 +1257,8 @@ except StrictCommitFailed: raise BzrCommandError("Commit refused because there are unknown " "files in the working tree.") - + note('Committed revision %d.' % (b.revno(),)) + class cmd_check(Command): """Validate consistency of branch history. === modified file 'bzrlib/merge.py' --- bzrlib/merge.py +++ bzrlib/merge.py @@ -229,7 +229,7 @@ def finalize(self): if not self.ignore_zero: - note("%d conflicts encountered.\n", self.conflicts) + note("%d conflicts encountered." % self.conflicts) def get_tree(treespec, local_branch=None): location, revno = treespec === modified file 'bzrlib/workingtree.py' --- bzrlib/workingtree.py +++ bzrlib/workingtree.py @@ -383,7 +383,7 @@ source.lock_read() try: old_revision_history = self.branch.revision_history() - self.branch.pull(source, overwrite) + count = self.branch.pull(source, overwrite) new_revision_history = self.branch.revision_history() if new_revision_history != old_revision_history: if len(old_revision_history): @@ -393,6 +393,7 @@ merge_inner(self.branch, self.branch.basis_tree(), self.branch.revision_tree(other_revision)) + return count finally: source.unlock()