~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_push.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-08-17 02:08:00 UTC
  • mfrom: (5998.1.5 bzrpushmessagesuppress)
  • Revision ID: pqm@pqm.ubuntu.com-20110817020800-z7oepdt2nxwjq5ue
(jr) bzr push -q now does not print name of pushed location
 (Jonathan Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
        transport.delete('branch_b/c')
105
105
        out, err = self.run_bzr('push', working_dir='branch_a')
106
106
        path = branch_a.get_push_location()
107
 
        self.assertEquals(out,
108
 
                          'Using saved push location: %s\n'
109
 
                          % urlutils.local_path_from_url(path))
110
107
        self.assertEqual(err,
 
108
                         'Using saved push location: %s\n'
111
109
                         'All changes applied successfully.\n'
112
 
                         'Pushed up to revision 2.\n')
 
110
                         'Pushed up to revision 2.\n'
 
111
                         % urlutils.local_path_from_url(path))
113
112
        self.assertEqual(path,
114
113
                         branch_b.bzrdir.root_transport.base)
115
114
        # test explicit --remember
149
148
        self.assertEqual('', out)
150
149
        self.assertEqual('Created new branch.\n', err)
151
150
 
 
151
    def test_push_quiet(self):
 
152
        # test that using -q makes output quiet
 
153
        t = self.make_branch_and_tree('tree')
 
154
        self.build_tree(['tree/file'])
 
155
        t.add('file')
 
156
        t.commit('commit 1')
 
157
        self.run_bzr('push -d tree pushed-to')
 
158
        path = t.branch.get_push_location()
 
159
        out, err = self.run_bzr('push', working_dir="tree")
 
160
        self.assertEqual('Using saved push location: %s\nNo new revisions to push.\n' % urlutils.local_path_from_url(path), err)
 
161
        out, err = self.run_bzr('push -q', working_dir="tree")
 
162
        self.assertEqual('', out)
 
163
        self.assertEqual('', err)
 
164
 
152
165
    def test_push_only_pushes_history(self):
153
166
        # Knit branches should only push the history for the current revision.
154
167
        format = bzrdir.BzrDirMetaFormat1()