~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Abbreviate pack_stat struct format to '>6L'

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\n'
 
161
                         'No new revisions or tags to push.\n' %
 
162
                         urlutils.local_path_from_url(path), err)
 
163
        out, err = self.run_bzr('push -q', working_dir="tree")
 
164
        self.assertEqual('', out)
 
165
        self.assertEqual('', err)
 
166
 
152
167
    def test_push_only_pushes_history(self):
153
168
        # Knit branches should only push the history for the current revision.
154
169
        format = bzrdir.BzrDirMetaFormat1()
661
676
    def set_config_push_strict(self, value):
662
677
        # set config var (any of bazaar.conf, locations.conf, branch.conf
663
678
        # should do)
664
 
        conf = self.tree.branch.get_config()
665
 
        conf.set_user_option('push_strict', value)
 
679
        conf = self.tree.branch.get_config_stack()
 
680
        conf.set('push_strict', value)
666
681
 
667
682
    _default_command = ['push', '../to']
668
683
    _default_wd = 'local'