~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010, 2011 Canonical Ltd
 
1
# Copyright (C) 2009-2012, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
19
19
 
20
20
 
21
21
from bzrlib import (
 
22
    branch,
22
23
    tests,
23
24
    )
24
25
from bzrlib.tests import (
52
53
        target_tree = self.make_branch_and_tree("dp")
53
54
        source_tree = self.make_branch_and_tree("dc")
54
55
        output, error = self.run_bzr("dpush -d dc dp", retcode=3)
55
 
        self.assertEquals("", output)
 
56
        self.assertEqual("", output)
56
57
        self.assertContainsRe(error,
57
58
            'in the same VCS, lossy push not necessary. Please use regular '
58
59
            'push.')
131
132
          [('modify', ('fooid', 'blie'))])
132
133
 
133
134
        output, error = self.run_bzr("dpush -d dc d", retcode=3)
134
 
        self.assertEquals(output, "")
 
135
        self.assertEqual(output, "")
135
136
        self.assertContainsRe(error, "have diverged")
136
137
 
137
138
 
144
145
            'to', format=test_foreign.DummyForeignVcsDirFormat())
145
146
 
146
147
    def set_config_push_strict(self, value):
147
 
        # set config var (any of bazaar.conf, locations.conf, branch.conf
148
 
        # should do)
149
 
        conf = self.tree.branch.get_config()
150
 
        conf.set_user_option('dpush_strict', value)
 
148
        br = branch.Branch.open('local')
 
149
        br.get_config_stack().set('dpush_strict', value)
151
150
 
152
151
    _default_command = ['dpush', '../to']
153
152