~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2007, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2009, 2010 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
155
155
    _default_command = ['dpush', '../to']
156
156
    _default_pushed_revid = False # Doesn't aplly for dpush
157
157
 
158
 
    def assertPushSucceeds(self, args, pushed_revid=None):
 
158
    def assertPushSucceeds(self, args, pushed_revid=None, with_warning=False):
 
159
        if with_warning:
 
160
            error_regexes = self._default_errors
 
161
        else:
 
162
            error_regexes = []
159
163
        self.run_bzr(self._default_command + args,
160
 
                     working_dir=self._default_wd)
 
164
                     working_dir=self._default_wd, error_regexes=error_regexes)
161
165
        if pushed_revid is None:
162
166
            # dpush change the revids, so we need to get back to it
163
167
            branch_from = branch.Branch.open(self._default_wd)