~bzr/bzr/bzr-pull-verbose-shows-tip-before-pull

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2009-12-07 15:52:22 UTC
  • Revision ID: v.ladeuil+lp@free.fr-20091207155222-jk9xdb2endwrbs0u
Small tweaks and a NEWS entry.

* bzrlib/tests/blackbox/test_pull.py:
(TestPull.test_pull_verbose_prints_tip_before_pull,
TestPull.test_pull_verbose_does_not_print_tip_when_nothing_is_pulled):
Force the revids to simplify the tests.

* bzrlib/builtins.py:
(cmd_pull.run): Display both the revno and revid before pulling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
931
931
    _see_also = ['push', 'update', 'status-flags', 'send']
932
932
    takes_options = ['remember', 'overwrite', 'revision',
933
933
        custom_help('verbose',
934
 
            help='Show logs of pulled revisions, show destination branch\'s'
935
 
                    ' tip before pulling.'),
 
934
            help="Show logs of pulled revisions, show destination branch's"
 
935
                    " tip before pulling."),
936
936
        Option('directory',
937
937
            help='Branch to pull into, '
938
938
                 'rather than the one containing the working directory.',
962
962
        except errors.NoWorkingTree:
963
963
            tree_to = None
964
964
            branch_to = Branch.open_containing(directory)[0]
965
 
        
 
965
 
966
966
        if local and not branch_to.get_bound_location():
967
967
            raise errors.LocalRequiresBoundBranch()
968
968
 
969
 
        tip_before_pull_msg = "Tip revision before pull was: {%s}" % \
970
 
                              branch_to.last_revision()
 
969
        tip_before_pull_msg = ("Tip revision before pull was: %d, revid:%s"
 
970
                               % branch_to.last_revision_info())
971
971
        mutter(tip_before_pull_msg)
972
972
 
973
973
        possible_transports = []