~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_foreign.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008 Canonical Ltd
 
1
# Copyright (C) 2008, 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
103
103
    def is_compatible(source, target):
104
104
        return isinstance(target, DummyForeignVcsBranch)
105
105
 
 
106
    def push(self, overwrite=False, stop_revision=None):
 
107
        raise errors.NoRoundtrippingSupport(self.source, self.target)
 
108
 
106
109
    def lossy_push(self, stop_revision=None):
107
110
        result = branch.BranchPushResult()
108
111
        result.source_branch = self.source
351
354
        self.assertNotEquals("A Dummy VCS Dir",
352
355
                             newdir._format.get_format_string())
353
356
 
 
357
    def test_push_not_supported(self):
 
358
        source_tree = self.make_branch_and_tree("source")
 
359
        target_tree = self.make_branch_and_tree("target", 
 
360
            format=DummyForeignVcsDirFormat())
 
361
        self.assertRaises(errors.NoRoundtrippingSupport, 
 
362
            source_tree.branch.push, target_tree.branch)
 
363
 
354
364
    def test_lossy_push_empty(self):
355
365
        source_tree = self.make_branch_and_tree("source")
356
366
        target_tree = self.make_branch_and_tree("target",