Rev 5779: (jelmer) Skip tests for CommitBuilder.commit(exclude=...) for repositories in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Apr 11 03:30:36 UTC 2011
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 5779 [merge]
revision-id: pqm at pqm.ubuntu.com-20110411033021-k2a68wj7n1zfhxrn
parent: pqm at pqm.ubuntu.com-20110411020101-orzxkwkibj496n91
parent: jelmer at samba.org-20110409021916-h611iw7q28oclssv
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2011-04-11 03:30:21 +0000
message:
(jelmer) Skip tests for CommitBuilder.commit(exclude=...) for repositories
that don't support it. (Jelmer Vernooij)
modified:
bzrlib/tests/per_workingtree/test_commit.py test_commit.py-20060421013633-1610ec2331c8190f
=== modified file 'bzrlib/tests/per_workingtree/test_commit.py'
--- a/bzrlib/tests/per_workingtree/test_commit.py 2011-04-09 02:07:50 +0000
+++ b/bzrlib/tests/per_workingtree/test_commit.py 2011-04-09 02:19:16 +0000
@@ -25,6 +25,7 @@
mutabletree,
osutils,
revision as _mod_revision,
+ tests,
ui,
)
from bzrlib.tests.per_workingtree import TestCaseWithWorkingTree
@@ -146,8 +147,12 @@
wt2 = wt.bzrdir.sprout('to').open_workingtree()
wt2.commit('change_right')
wt.merge_from_branch(wt2.branch)
- self.assertRaises(errors.CannotCommitSelectedFileMerge,
- wt.commit, 'test', exclude=['foo'])
+ try:
+ self.assertRaises(errors.CannotCommitSelectedFileMerge,
+ wt.commit, 'test', exclude=['foo'])
+ except errors.ExcludesUnsupported:
+ raise tests.TestNotApplicable("excludes not supported by this "
+ "repository format")
def test_commit_exclude_exclude_changed_is_pointless(self):
tree = self.make_branch_and_tree('.')
@@ -155,14 +160,22 @@
tree.smart_add(['.'])
tree.commit('setup test')
self.build_tree_contents([('a', 'new contents for "a"\n')])
- self.assertRaises(errors.PointlessCommit, tree.commit, 'test',
- exclude=['a'], allow_pointless=False)
+ try:
+ self.assertRaises(errors.PointlessCommit, tree.commit, 'test',
+ exclude=['a'], allow_pointless=False)
+ except errors.ExcludesUnsupported:
+ raise tests.TestNotApplicable("excludes not supported by this "
+ "repository format")
def test_commit_exclude_excludes_modified_files(self):
tree = self.make_branch_and_tree('.')
self.build_tree(['a', 'b', 'c'])
tree.smart_add(['.'])
- tree.commit('test', exclude=['b', 'c'])
+ try:
+ tree.commit('test', exclude=['b', 'c'])
+ except errors.ExcludesUnsupported:
+ raise tests.TestNotApplicable("excludes not supported by this "
+ "repository format")
# If b was excluded it will still be 'added' in status.
tree.lock_read()
self.addCleanup(tree.unlock)
@@ -175,7 +188,11 @@
tree = self.make_branch_and_tree('.')
self.build_tree(['a/', 'a/b'])
tree.smart_add(['.'])
- tree.commit('test', specific_files=['a'], exclude=['a/b'])
+ try:
+ tree.commit('test', specific_files=['a'], exclude=['a/b'])
+ except errors.ExcludesUnsupported:
+ raise tests.TestNotApplicable("excludes not supported by this "
+ "repository format")
# If a/b was excluded it will still be 'added' in status.
tree.lock_read()
self.addCleanup(tree.unlock)
More information about the bazaar-commits
mailing list