~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2007, 2008, 2009 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
153
153
        conf.set_user_option('dpush_strict', value)
154
154
 
155
155
    _default_command = ['dpush', '../to']
 
156
    _default_pushed_revid = False # Doesn't aplly for dpush
 
157
 
 
158
    def assertPushSucceeds(self, args, pushed_revid=None):
 
159
        self.run_bzr(self._default_command + args,
 
160
                     working_dir=self._default_wd)
 
161
        if pushed_revid is None:
 
162
            # dpush change the revids, so we need to get back to it
 
163
            branch_from = branch.Branch.open(self._default_wd)
 
164
            pushed_revid = branch_from.last_revision()
 
165
        branch_to = branch.Branch.open('to')
 
166
        repo_to = branch_to.repository
 
167
        self.assertTrue(repo_to.has_revision(pushed_revid))
 
168
        self.assertEqual(branch_to.last_revision(), pushed_revid)
 
169
 
156
170
 
157
171
 
158
172
class TestDpushStrictWithoutChanges(TestDpushStrictMixin,