~debian-bazaar/bzr-grep/unstable

« back to all changes in this revision

Viewing changes to debian/patches/01_bzr_2.5_compat.diff

  • Committer: Andrew Starr-Bochicchio
  • Date: 2011-12-20 15:23:28 UTC
  • Revision ID: a.starr.b@gmail.com-20111220152328-9ifxube0ys35ca78
Cherrypick upstream rev 146: Cope with the fact that Feature
has moved to bzrlib.tests.features in bzr 2.5. Fixes FTBFS
in Sid (Closes: #652757).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Merge fix for features living in a new location in newer versions of bzr.
 
2
Origin: commit, revision id: jelmer@samba.org-20110816095410-9g7vtu8a46rfqulx
 
3
Author: Jelmer Vernooij <jelmer@samba.org>
 
4
Last-Update: 2011-08-16
 
5
X-Bzr-Revision-Id: jelmer@samba.org-20110816095410-9g7vtu8a46rfqulx
 
6
Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652757
 
7
 
 
8
=== modified file 'features.py'
 
9
--- old/features.py     2010-05-22 12:35:19 +0000
 
10
+++ new/features.py     2011-07-25 13:02:19 +0000
 
11
@@ -16,9 +16,13 @@
 
12
 """'Features' which are used to skip tests."""
 
13
 
 
14
 from bzrlib import tests
 
15
+try:
 
16
+    from bzrlib.tests.features import Feature
 
17
+except ImportError: # bzr < 2.5
 
18
+    from bzrlib.tests import Feature
 
19
 from termcolor import allow_color
 
20
 
 
21
-class _ColorFeature(tests.Feature):
 
22
+class _ColorFeature(Feature):
 
23
 
 
24
     def _probe(self):
 
25
         return allow_color()
 
26