Merge lp:~jelmer/bzrtools/fix-bzr.dev-compat into lp:bzrtools

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: 777
Proposed branch: lp:~jelmer/bzrtools/fix-bzr.dev-compat
Merge into: lp:bzrtools
Diff against target: 62 lines (+21/-4)
3 files modified
tests/blackbox.py (+11/-2)
tests/test_link_tree.py (+6/-1)
tests/upstream_import.py (+4/-1)
To merge this branch: bzr merge lp:~jelmer/bzrtools/fix-bzr.dev-compat
Reviewer Review Type Date Requested Status
Aaron Bentley Approve
Jonathan Riddell (community) Approve
Review via email: mp+73156@code.launchpad.net

Description of the change

Cope with HardlinkFeature having moved to bzrlib.tests.features in bzr.dev.

To post a comment you must log in.
778. By Jelmer Vernooij

Fix deprecation warnings.

Revision history for this message
Jonathan Riddell (jr) wrote :

all good

review: Approve
Revision history for this message
Aaron Bentley (abentley) wrote :

Merged. Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/blackbox.py'
2--- tests/blackbox.py 2011-06-24 13:35:53 +0000
3+++ tests/blackbox.py 2011-08-29 17:05:30 +0000
4@@ -6,12 +6,21 @@
5 from bzrlib.config import LocationConfig
6 from bzrlib.transport import get_transport
7 from bzrlib.tests import (
8- HardlinkFeature,
9- ModuleAvailableFeature,
10 TestCaseWithTransport,
11 )
12 from bzrlib.plugins.bzrtools import command
13
14+try:
15+ from bzrlib.tests.features import (
16+ HardlinkFeature,
17+ ModuleAvailableFeature,
18+ )
19+except ImportError: # bzr < 2.5
20+ from bzrlib.tests import (
21+ HardlinkFeature,
22+ ModuleAvailableFeature,
23+ )
24+
25
26 LzmaFeature = ModuleAvailableFeature("lzma")
27
28
29=== modified file 'tests/test_link_tree.py'
30--- tests/test_link_tree.py 2010-02-25 04:15:18 +0000
31+++ tests/test_link_tree.py 2011-08-29 17:05:30 +0000
32@@ -17,7 +17,12 @@
33 import os
34
35 from bzrlib.transform import TreeTransform
36-from bzrlib.tests import TestCaseWithTransport, HardlinkFeature
37+from bzrlib.tests import TestCaseWithTransport
38+
39+try:
40+ from bzrlib.tests.features import HardlinkFeature
41+except ImportError: # bzr < 2.5
42+ from bzrlib.tests import HardlinkFeature
43
44 from bzrlib.plugins.bzrtools import command
45 from bzrlib.plugins.bzrtools.link_tree import link_tree
46
47=== modified file 'tests/upstream_import.py'
48--- tests/upstream_import.py 2011-07-13 19:35:00 +0000
49+++ tests/upstream_import.py 2011-08-29 17:05:30 +0000
50@@ -26,8 +26,11 @@
51 from bzrlib.tests import (
52 TestCaseInTempDir,
53 TestCaseWithTransport,
54- UnicodeFilenameFeature,
55 )
56+try:
57+ from bzrlib.tests.features import UnicodeFilenameFeature
58+except ImportError: # bzr < 2.5
59+ from bzrlib.tests import UnicodeFilenameFeature
60
61
62 def import_tar_broken(tree, tar_input):

Subscribers

People subscribed via source and target branches