~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-01-05 16:03:11 UTC
  • mfrom: (6432 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6433.
  • Revision ID: jelmer@samba.org-20120105160311-12o5p67kin1v3zps
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
200
200
        self.run_send([])
201
201
        self.run_bzr_error(('Unknown mail client: bogus',),
202
202
                           'send -f branch --mail-to jrandom@example.org')
203
 
        b.get_config().set_user_option('submit_to', 'jrandom@example.org')
 
203
        b.get_config_stack().set('submit_to', 'jrandom@example.org')
204
204
        self.run_bzr_error(('Unknown mail client: bogus',),
205
205
                           'send -f branch')
206
206
 
209
209
        b = branch.Branch.open('branch')
210
210
        b.get_config().set_user_option('mail_client', 'bogus')
211
211
        parent = branch.Branch.open('parent')
212
 
        parent.get_config().set_user_option('child_submit_to',
213
 
                           'somebody@example.org')
214
 
        self.run_bzr_error(('Unknown mail client: bogus',),
215
 
                           'send -f branch')
 
212
        parent.get_config_stack().set('child_submit_to', 'somebody@example.org')
 
213
        self.run_bzr_error(('Unknown mail client: bogus',), 'send -f branch')
216
214
 
217
215
    def test_format(self):
218
216
        md = self.get_MD(['--format=4'])
230
228
                            'send -f branch -o- --format=0.999')[0]
231
229
 
232
230
    def test_format_child_option(self):
233
 
        parent_config = branch.Branch.open('parent').get_config()
234
 
        parent_config.set_user_option('child_submit_format', '4')
 
231
        parent_config = branch.Branch.open('parent').get_config_stack()
 
232
        parent_config.set('child_submit_format', '4')
235
233
        md = self.get_MD([])
236
234
        self.assertIs(merge_directive.MergeDirective2, md.__class__)
237
235
 
238
 
        parent_config.set_user_option('child_submit_format', '0.9')
 
236
        parent_config.set('child_submit_format', '0.9')
239
237
        md = self.get_MD([])
240
238
        self.assertFormatIs('# Bazaar revision bundle v0.9', md)
241
239
 
243
241
        self.assertFormatIs('# Bazaar revision bundle v0.9', md)
244
242
        self.assertIs(merge_directive.MergeDirective, md.__class__)
245
243
 
246
 
        parent_config.set_user_option('child_submit_format', '0.999')
 
244
        parent_config.set('child_submit_format', '0.999')
247
245
        self.run_bzr_error(["No such send format '0.999'"],
248
246
                            'send -f branch -o-')[0]
249
247
 
460
458
        # become necessary for this use case. Please do not adjust this number
461
459
        # upwards without agreement from bzr's network support maintainers.
462
460
        self.assertLength(9, self.hpss_calls)
 
461
        self.assertLength(1, self.hpss_connections)
463
462
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)