/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

Merge bzr.dev to resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
664
664
    _default_pushed_revid = 'modified'
665
665
 
666
666
    def assertPushFails(self, args):
667
 
        self.run_bzr_error(self._default_errors, self._default_command + args,
668
 
                           working_dir=self._default_wd, retcode=3)
 
667
        ret = self.run_bzr_error(self._default_errors,
 
668
                                 self._default_command + args,
 
669
                                 working_dir=self._default_wd, retcode=3)
669
670
 
670
 
    def assertPushSucceeds(self, args, pushed_revid=None):
671
 
        self.run_bzr(self._default_command + args,
672
 
                     working_dir=self._default_wd)
 
671
    def assertPushSucceeds(self, args, pushed_revid=None, with_warning=False):
 
672
        if with_warning:
 
673
            error_regexes = self._default_errors
 
674
        else:
 
675
            error_regexes = []
 
676
        ret = self.run_bzr(self._default_command + args,
 
677
                           working_dir=self._default_wd,
 
678
                           error_regexes=error_regexes)
673
679
        if pushed_revid is None:
674
680
            pushed_revid = self._default_pushed_revid
675
681
        tree_to = workingtree.WorkingTree.open('to')
745
751
        self._default_pushed_revid = 'modified-in-local'
746
752
 
747
753
    def test_push_default(self):
748
 
        self.assertPushFails([])
 
754
        self.assertPushSucceeds([], with_warning=True)
749
755
 
750
756
    def test_push_with_revision(self):
751
757
        self.assertPushSucceeds(['-r', 'revid:added'], pushed_revid='added')
762
768
 
763
769
    def test_push_bogus_config_var_ignored(self):
764
770
        self.set_config_push_strict("I don't want you to be strict")
765
 
        self.assertPushFails([])
 
771
        self.assertPushSucceeds([], with_warning=True)
766
772
 
767
773
    def test_push_no_strict_command_line_override_config(self):
768
774
        self.set_config_push_strict('yES')