Merge lp:~jelmer/brz/deprecation into lp:brz
- deprecation
- Merge into trunk
Proposed by
Jelmer Vernooij
Status: | Merged |
---|---|
Approved by: | Jelmer Vernooij |
Approved revision: | no longer in the source branch. |
Merge reported by: | The Breezy Bot |
Merged at revision: | not available |
Proposed branch: | lp:~jelmer/brz/deprecation |
Merge into: | lp:brz |
Diff against target: |
2854 lines (+96/-1292) 64 files modified
breezy/atomicfile.py (+0/-1) breezy/branch.py (+0/-17) breezy/builtins.py (+7/-37) breezy/bundle/bundle_data.py (+3/-3) breezy/bzrdir.py (+0/-4) breezy/commit.py (+6/-32) breezy/config.py (+3/-162) breezy/conflicts.py (+11/-7) breezy/filters/__init__.py (+0/-31) breezy/gpg.py (+0/-95) breezy/hooks.py (+0/-1) breezy/inventory.py (+0/-4) breezy/lru_cache.py (+0/-11) breezy/merge.py (+0/-4) breezy/missing.py (+1/-11) breezy/mutabletree.py (+1/-3) breezy/osutils.py (+11/-60) breezy/plugins/weave_fmt/bzrdir.py (+2/-9) breezy/plugins/weave_fmt/repository.py (+0/-13) breezy/remote.py (+0/-12) breezy/repofmt/knitrepo.py (+0/-1) breezy/repository.py (+1/-16) breezy/revision.py (+7/-11) breezy/revisionspec.py (+9/-46) breezy/tag.py (+0/-26) breezy/tests/__init__.py (+2/-45) breezy/tests/blackbox/__init__.py (+0/-12) breezy/tests/blackbox/test_log.py (+0/-18) breezy/tests/per_branch/test_branch.py (+0/-19) breezy/tests/per_branch/test_check.py (+0/-1) breezy/tests/per_branch/test_get_revision_id_to_revno_map.py (+0/-1) breezy/tests/per_branch/test_hooks.py (+0/-1) breezy/tests/per_branch/test_push.py (+0/-1) breezy/tests/per_interbranch/test_push.py (+0/-1) breezy/tests/per_interrepository/test_interrepository.py (+0/-6) breezy/tests/per_inventory/basics.py (+0/-4) breezy/tests/per_repository/test_repository.py (+1/-8) breezy/tests/per_repository_vf/test_repository.py (+0/-1) breezy/tests/per_tree/test_tree.py (+0/-19) breezy/tests/per_workingtree/test_workingtree.py (+0/-1) breezy/tests/test_annotate.py (+0/-1) breezy/tests/test_atomicfile.py (+0/-1) breezy/tests/test_commit.py (+4/-11) breezy/tests/test_config.py (+8/-329) breezy/tests/test_hooks.py (+0/-3) breezy/tests/test_lru_cache.py (+0/-8) breezy/tests/test_osutils.py (+7/-43) breezy/tests/test_remote.py (+0/-1) breezy/tests/test_repository.py (+0/-1) breezy/tests/test_revisionspec.py (+0/-13) breezy/tests/test_selftest.py (+0/-13) breezy/tests/test_smart_add.py (+2/-3) breezy/tests/test_transform.py (+0/-1) breezy/transform.py (+0/-11) breezy/transport/__init__.py (+2/-19) breezy/transport/ftp/__init__.py (+0/-6) breezy/transport/gio_transport.py (+0/-6) breezy/transport/local.py (+0/-1) breezy/tree.py (+0/-23) breezy/vf_repository.py (+0/-15) breezy/weave.py (+0/-1) breezy/workingtree.py (+5/-9) breezy/workingtree_4.py (+0/-18) doc/en/release-notes/brz-3.0.txt (+3/-0) |
To merge this branch: | bzr merge lp:~jelmer/brz/deprecation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Packman | Approve | ||
Review via email: mp+324814@code.launchpad.net |
This proposal supersedes a proposal from 2017-05-30.
Commit message
Remove all deprecated arguments, functions and methods.
Description of the change
Remove all deprecated arguments, functions and methods.
To post a comment you must log in.
Revision history for this message
The Breezy Bot (the-breezy-bot) wrote : | # |
Merging failed
http://
lp:~jelmer/brz/deprecation
updated
- 6639. By Jelmer Vernooij
-
Remove all deprecated arguments, functions and methods.
Merged from https:/
/code.launchpad .net/~jelmer/ brz/deprecation /+merge/ 324814
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'breezy/atomicfile.py' | |||
2 | --- breezy/atomicfile.py 2017-05-22 00:56:52 +0000 | |||
3 | +++ breezy/atomicfile.py 2017-05-30 21:16:02 +0000 | |||
4 | @@ -26,7 +26,6 @@ | |||
5 | 26 | from breezy import ( | 26 | from breezy import ( |
6 | 27 | errors, | 27 | errors, |
7 | 28 | osutils, | 28 | osutils, |
8 | 29 | symbol_versioning, | ||
9 | 30 | ) | 29 | ) |
10 | 31 | """) | 30 | """) |
11 | 32 | 31 | ||
12 | 33 | 32 | ||
13 | === modified file 'breezy/branch.py' | |||
14 | --- breezy/branch.py 2017-05-25 01:35:55 +0000 | |||
15 | +++ breezy/branch.py 2017-05-30 21:16:02 +0000 | |||
16 | @@ -67,10 +67,6 @@ | |||
17 | 67 | from .sixish import ( | 67 | from .sixish import ( |
18 | 68 | BytesIO, | 68 | BytesIO, |
19 | 69 | ) | 69 | ) |
20 | 70 | from .symbol_versioning import ( | ||
21 | 71 | deprecated_in, | ||
22 | 72 | deprecated_method, | ||
23 | 73 | ) | ||
24 | 74 | from .trace import mutter, mutter_callsite, note, is_quiet | 70 | from .trace import mutter, mutter_callsite, note, is_quiet |
25 | 75 | 71 | ||
26 | 76 | 72 | ||
27 | @@ -759,19 +755,6 @@ | |||
28 | 759 | """ | 755 | """ |
29 | 760 | return None | 756 | return None |
30 | 761 | 757 | ||
31 | 762 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
32 | 763 | def get_revision_delta(self, revno): | ||
33 | 764 | """Return the delta for one revision. | ||
34 | 765 | |||
35 | 766 | The delta is relative to its mainline predecessor, or the | ||
36 | 767 | empty tree for revision 1. | ||
37 | 768 | """ | ||
38 | 769 | try: | ||
39 | 770 | revid = self.get_rev_id(revno) | ||
40 | 771 | except errors.NoSuchRevision: | ||
41 | 772 | raise errors.InvalidRevisionNumber(revno) | ||
42 | 773 | return self.repository.get_revision_delta(revid) | ||
43 | 774 | |||
44 | 775 | def get_stacked_on_url(self): | 758 | def get_stacked_on_url(self): |
45 | 776 | """Get the URL this branch is stacked against. | 759 | """Get the URL this branch is stacked against. |
46 | 777 | 760 | ||
47 | 778 | 761 | ||
48 | === modified file 'breezy/builtins.py' | |||
49 | --- breezy/builtins.py 2017-05-25 01:35:55 +0000 | |||
50 | +++ breezy/builtins.py 2017-05-30 21:16:02 +0000 | |||
51 | @@ -33,6 +33,7 @@ | |||
52 | 33 | bugtracker, | 33 | bugtracker, |
53 | 34 | bundle, | 34 | bundle, |
54 | 35 | btree_index, | 35 | btree_index, |
55 | 36 | cache_utf8, | ||
56 | 36 | controldir, | 37 | controldir, |
57 | 37 | directory_service, | 38 | directory_service, |
58 | 38 | delta, | 39 | delta, |
59 | @@ -48,6 +49,7 @@ | |||
60 | 48 | rename_map, | 49 | rename_map, |
61 | 49 | revision as _mod_revision, | 50 | revision as _mod_revision, |
62 | 50 | static_tuple, | 51 | static_tuple, |
63 | 52 | symbol_versioning, | ||
64 | 51 | timestamp, | 53 | timestamp, |
65 | 52 | transport, | 54 | transport, |
66 | 53 | ui, | 55 | ui, |
67 | @@ -81,9 +83,6 @@ | |||
68 | 81 | text_type, | 83 | text_type, |
69 | 82 | ) | 84 | ) |
70 | 83 | from .trace import mutter, note, warning, is_quiet, get_verbosity_level | 85 | from .trace import mutter, note, warning, is_quiet, get_verbosity_level |
71 | 84 | from . import ( | ||
72 | 85 | symbol_versioning, | ||
73 | 86 | ) | ||
74 | 87 | 86 | ||
75 | 88 | 87 | ||
76 | 89 | def _get_branch_location(control_dir, possible_transports=None): | 88 | def _get_branch_location(control_dir, possible_transports=None): |
77 | @@ -458,7 +457,7 @@ | |||
78 | 458 | try: | 457 | try: |
79 | 459 | # TODO: jam 20060112 should cat-revision always output utf-8? | 458 | # TODO: jam 20060112 should cat-revision always output utf-8? |
80 | 460 | if revision_id is not None: | 459 | if revision_id is not None: |
82 | 461 | revision_id = osutils.safe_revision_id(revision_id, warn=False) | 460 | revision_id = cache_utf8.encode(revision_id) |
83 | 462 | try: | 461 | try: |
84 | 463 | self.print_revision(revisions, revision_id) | 462 | self.print_revision(revisions, revision_id) |
85 | 464 | except errors.NoSuchRevision: | 463 | except errors.NoSuchRevision: |
86 | @@ -1444,7 +1443,6 @@ | |||
87 | 1444 | use_existing_dir=False, switch=False, bind=False, | 1443 | use_existing_dir=False, switch=False, bind=False, |
88 | 1445 | files_from=None): | 1444 | files_from=None): |
89 | 1446 | from breezy import switch as _mod_switch | 1445 | from breezy import switch as _mod_switch |
90 | 1447 | from .tag import _merge_tags_if_possible | ||
91 | 1448 | if self.invoked_as in ['get', 'clone']: | 1446 | if self.invoked_as in ['get', 'clone']: |
92 | 1449 | ui.ui_factory.show_user_warning( | 1447 | ui.ui_factory.show_user_warning( |
93 | 1450 | 'deprecated_command', | 1448 | 'deprecated_command', |
94 | @@ -1523,7 +1521,8 @@ | |||
95 | 1523 | to_repo = to_dir.create_repository() | 1521 | to_repo = to_dir.create_repository() |
96 | 1524 | to_repo.fetch(br_from.repository, revision_id=revision_id) | 1522 | to_repo.fetch(br_from.repository, revision_id=revision_id) |
97 | 1525 | branch = br_from.sprout(to_dir, revision_id=revision_id) | 1523 | branch = br_from.sprout(to_dir, revision_id=revision_id) |
99 | 1526 | _merge_tags_if_possible(br_from, branch) | 1524 | br_from.tags.merge_to(branch.tags) |
100 | 1525 | |||
101 | 1527 | # If the source branch is stacked, the new branch may | 1526 | # If the source branch is stacked, the new branch may |
102 | 1528 | # be stacked whether we asked for that explicitly or not. | 1527 | # be stacked whether we asked for that explicitly or not. |
103 | 1529 | # We therefore need a try/except here and not just 'if stacked:' | 1528 | # We therefore need a try/except here and not just 'if stacked:' |
104 | @@ -2744,7 +2743,6 @@ | |||
105 | 2744 | match_author=None, | 2743 | match_author=None, |
106 | 2745 | match_bugs=None, | 2744 | match_bugs=None, |
107 | 2746 | omit_merges=False, | 2745 | omit_merges=False, |
108 | 2747 | include_merges=symbol_versioning.DEPRECATED_PARAMETER, | ||
109 | 2748 | ): | 2746 | ): |
110 | 2749 | from .log import ( | 2747 | from .log import ( |
111 | 2750 | Logger, | 2748 | Logger, |
112 | @@ -2752,19 +2750,6 @@ | |||
113 | 2752 | _get_info_for_log_files, | 2750 | _get_info_for_log_files, |
114 | 2753 | ) | 2751 | ) |
115 | 2754 | direction = (forward and 'forward') or 'reverse' | 2752 | direction = (forward and 'forward') or 'reverse' |
116 | 2755 | if symbol_versioning.deprecated_passed(include_merges): | ||
117 | 2756 | ui.ui_factory.show_user_warning( | ||
118 | 2757 | 'deprecated_command_option', | ||
119 | 2758 | deprecated_name='--include-merges', | ||
120 | 2759 | recommended_name='--include-merged', | ||
121 | 2760 | deprecated_in_version='2.5', | ||
122 | 2761 | command=self.invoked_as) | ||
123 | 2762 | if include_merged is None: | ||
124 | 2763 | include_merged = include_merges | ||
125 | 2764 | else: | ||
126 | 2765 | raise errors.BzrCommandError(gettext( | ||
127 | 2766 | '{0} and {1} are mutually exclusive').format( | ||
128 | 2767 | '--include-merges', '--include-merged')) | ||
129 | 2768 | if include_merged is None: | 2753 | if include_merged is None: |
130 | 2769 | include_merged = False | 2754 | include_merged = False |
131 | 2770 | if (exclude_common_ancestry | 2755 | if (exclude_common_ancestry |
132 | @@ -4540,7 +4525,6 @@ | |||
133 | 4540 | def _get_merger_from_branch(self, tree, location, revision, remember, | 4525 | def _get_merger_from_branch(self, tree, location, revision, remember, |
134 | 4541 | possible_transports, pb): | 4526 | possible_transports, pb): |
135 | 4542 | """Produce a merger from a location, assuming it refers to a branch.""" | 4527 | """Produce a merger from a location, assuming it refers to a branch.""" |
136 | 4543 | from .tag import _merge_tags_if_possible | ||
137 | 4544 | # find the branch locations | 4528 | # find the branch locations |
138 | 4545 | other_loc, user_location = self._select_branch_location(tree, location, | 4529 | other_loc, user_location = self._select_branch_location(tree, location, |
139 | 4546 | revision, -1) | 4530 | revision, -1) |
140 | @@ -4580,7 +4564,7 @@ | |||
141 | 4580 | tree.branch.set_submit_branch(other_branch.base) | 4564 | tree.branch.set_submit_branch(other_branch.base) |
142 | 4581 | # Merge tags (but don't set them in the master branch yet, the user | 4565 | # Merge tags (but don't set them in the master branch yet, the user |
143 | 4582 | # might revert this merge). Commit will propagate them. | 4566 | # might revert this merge). Commit will propagate them. |
145 | 4583 | _merge_tags_if_possible(other_branch, tree.branch, ignore_master=True) | 4567 | other_branch.tags.merge_to(tree.branch.tags, ignore_master=True) |
146 | 4584 | merger = _mod_merge.Merger.from_revision_ids(pb, tree, | 4568 | merger = _mod_merge.Merger.from_revision_ids(pb, tree, |
147 | 4585 | other_revision_id, base_revision_id, other_branch, base_branch) | 4569 | other_revision_id, base_revision_id, other_branch, base_branch) |
148 | 4586 | if other_path != '': | 4570 | if other_path != '': |
149 | @@ -4939,26 +4923,12 @@ | |||
150 | 4939 | log_format=None, long=False, short=False, line=False, | 4923 | log_format=None, long=False, short=False, line=False, |
151 | 4940 | show_ids=False, verbose=False, this=False, other=False, | 4924 | show_ids=False, verbose=False, this=False, other=False, |
152 | 4941 | include_merged=None, revision=None, my_revision=None, | 4925 | include_merged=None, revision=None, my_revision=None, |
155 | 4942 | directory=u'.', | 4926 | directory=u'.'): |
154 | 4943 | include_merges=symbol_versioning.DEPRECATED_PARAMETER): | ||
156 | 4944 | from breezy.missing import find_unmerged, iter_log_revisions | 4927 | from breezy.missing import find_unmerged, iter_log_revisions |
157 | 4945 | def message(s): | 4928 | def message(s): |
158 | 4946 | if not is_quiet(): | 4929 | if not is_quiet(): |
159 | 4947 | self.outf.write(s) | 4930 | self.outf.write(s) |
160 | 4948 | 4931 | ||
161 | 4949 | if symbol_versioning.deprecated_passed(include_merges): | ||
162 | 4950 | ui.ui_factory.show_user_warning( | ||
163 | 4951 | 'deprecated_command_option', | ||
164 | 4952 | deprecated_name='--include-merges', | ||
165 | 4953 | recommended_name='--include-merged', | ||
166 | 4954 | deprecated_in_version='2.5', | ||
167 | 4955 | command=self.invoked_as) | ||
168 | 4956 | if include_merged is None: | ||
169 | 4957 | include_merged = include_merges | ||
170 | 4958 | else: | ||
171 | 4959 | raise errors.BzrCommandError(gettext( | ||
172 | 4960 | '{0} and {1} are mutually exclusive').format( | ||
173 | 4961 | '--include-merges', '--include-merged')) | ||
174 | 4962 | if include_merged is None: | 4932 | if include_merged is None: |
175 | 4963 | include_merged = False | 4933 | include_merged = False |
176 | 4964 | if this: | 4934 | if this: |
177 | 4965 | 4935 | ||
178 | === modified file 'breezy/bundle/bundle_data.py' | |||
179 | --- breezy/bundle/bundle_data.py 2017-05-25 01:35:55 +0000 | |||
180 | +++ breezy/bundle/bundle_data.py 2017-05-30 21:16:02 +0000 | |||
181 | @@ -23,6 +23,7 @@ | |||
182 | 23 | import pprint | 23 | import pprint |
183 | 24 | 24 | ||
184 | 25 | from .. import ( | 25 | from .. import ( |
185 | 26 | cache_utf8, | ||
186 | 26 | osutils, | 27 | osutils, |
187 | 27 | timestamp, | 28 | timestamp, |
188 | 28 | ) | 29 | ) |
189 | @@ -323,8 +324,7 @@ | |||
190 | 323 | if last_changed is not None: | 324 | if last_changed is not None: |
191 | 324 | # last_changed will be a Unicode string because of how it was | 325 | # last_changed will be a Unicode string because of how it was |
192 | 325 | # read. Convert it back to utf8. | 326 | # read. Convert it back to utf8. |
195 | 326 | changed_revision_id = osutils.safe_revision_id(last_changed, | 327 | changed_revision_id = cache_utf8.encode(last_changed) |
194 | 327 | warn=False) | ||
196 | 328 | else: | 328 | else: |
197 | 329 | changed_revision_id = revision_id | 329 | changed_revision_id = revision_id |
198 | 330 | bundle_tree.note_last_changed(path, changed_revision_id) | 330 | bundle_tree.note_last_changed(path, changed_revision_id) |
199 | @@ -399,7 +399,7 @@ | |||
200 | 399 | ': %r' % extra) | 399 | ': %r' % extra) |
201 | 400 | # This will be Unicode because of how the stream is read. Turn it | 400 | # This will be Unicode because of how the stream is read. Turn it |
202 | 401 | # back into a utf8 file_id | 401 | # back into a utf8 file_id |
204 | 402 | file_id = osutils.safe_file_id(info[1][8:], warn=False) | 402 | file_id = cache_utf8.encode(info[1][8:]) |
205 | 403 | 403 | ||
206 | 404 | bundle_tree.note_id(file_id, path, kind) | 404 | bundle_tree.note_id(file_id, path, kind) |
207 | 405 | # this will be overridden in extra_info if executable is specified. | 405 | # this will be overridden in extra_info if executable is specified. |
208 | 406 | 406 | ||
209 | === modified file 'breezy/bzrdir.py' | |||
210 | --- breezy/bzrdir.py 2017-05-22 00:56:52 +0000 | |||
211 | +++ breezy/bzrdir.py 2017-05-30 21:16:02 +0000 | |||
212 | @@ -72,10 +72,6 @@ | |||
213 | 72 | controldir, | 72 | controldir, |
214 | 73 | registry, | 73 | registry, |
215 | 74 | ) | 74 | ) |
216 | 75 | from .symbol_versioning import ( | ||
217 | 76 | deprecated_in, | ||
218 | 77 | deprecated_method, | ||
219 | 78 | ) | ||
220 | 79 | 75 | ||
221 | 80 | 76 | ||
222 | 81 | class BzrDir(controldir.ControlDir): | 77 | class BzrDir(controldir.ControlDir): |
223 | 82 | 78 | ||
224 | === modified file 'breezy/commit.py' | |||
225 | --- breezy/commit.py 2017-05-22 00:56:52 +0000 | |||
226 | +++ breezy/commit.py 2017-05-30 21:16:02 +0000 | |||
227 | @@ -71,7 +71,6 @@ | |||
228 | 71 | ) | 71 | ) |
229 | 72 | from .trace import mutter, note, is_quiet | 72 | from .trace import mutter, note, is_quiet |
230 | 73 | from .inventory import Inventory, InventoryEntry, make_entry | 73 | from .inventory import Inventory, InventoryEntry, make_entry |
231 | 74 | from . import symbol_versioning | ||
232 | 75 | from .urlutils import unescape_for_display | 74 | from .urlutils import unescape_for_display |
233 | 76 | from .i18n import gettext | 75 | from .i18n import gettext |
234 | 77 | 76 | ||
235 | @@ -79,11 +78,7 @@ | |||
236 | 79 | class NullCommitReporter(object): | 78 | class NullCommitReporter(object): |
237 | 80 | """I report on progress of a commit.""" | 79 | """I report on progress of a commit.""" |
238 | 81 | 80 | ||
244 | 82 | def started(self, revno, revid, location=None): | 81 | def started(self, revno, revid, location): |
240 | 83 | if location is None: | ||
241 | 84 | symbol_versioning.warn("As of bzr 1.0 you must pass a location " | ||
242 | 85 | "to started.", DeprecationWarning, | ||
243 | 86 | stacklevel=2) | ||
245 | 87 | pass | 82 | pass |
246 | 88 | 83 | ||
247 | 89 | def snapshot_change(self, change, path): | 84 | def snapshot_change(self, change, path): |
248 | @@ -119,17 +114,10 @@ | |||
249 | 119 | return | 114 | return |
250 | 120 | self._note("%s %s", change, path) | 115 | self._note("%s %s", change, path) |
251 | 121 | 116 | ||
263 | 122 | def started(self, revno, rev_id, location=None): | 117 | def started(self, revno, rev_id, location): |
264 | 123 | if location is not None: | 118 | self._note( |
265 | 124 | location = ' to: ' + unescape_for_display(location, 'utf-8') | 119 | gettext('Committing to: %s'), |
266 | 125 | else: | 120 | unescape_for_display(location, 'utf-8')) |
256 | 126 | # When started was added, location was only made optional by | ||
257 | 127 | # accident. Matt Nordhoff 20071129 | ||
258 | 128 | symbol_versioning.warn("As of bzr 1.0 you must pass a location " | ||
259 | 129 | "to started.", DeprecationWarning, | ||
260 | 130 | stacklevel=2) | ||
261 | 131 | location = '' | ||
262 | 132 | self._note(gettext('Committing%s'), location) | ||
267 | 133 | 121 | ||
268 | 134 | def completed(self, revno, rev_id): | 122 | def completed(self, revno, rev_id): |
269 | 135 | self._note(gettext('Committed revision %d.'), revno) | 123 | self._note(gettext('Committed revision %d.'), revno) |
270 | @@ -176,7 +164,7 @@ | |||
271 | 176 | self.config_stack = config_stack | 164 | self.config_stack = config_stack |
272 | 177 | 165 | ||
273 | 178 | @staticmethod | 166 | @staticmethod |
275 | 179 | def update_revprops(revprops, branch, authors=None, author=None, | 167 | def update_revprops(revprops, branch, authors=None, |
276 | 180 | local=False, possible_master_transports=None): | 168 | local=False, possible_master_transports=None): |
277 | 181 | if revprops is None: | 169 | if revprops is None: |
278 | 182 | revprops = {} | 170 | revprops = {} |
279 | @@ -187,9 +175,6 @@ | |||
280 | 187 | local, | 175 | local, |
281 | 188 | possible_master_transports) | 176 | possible_master_transports) |
282 | 189 | if authors is not None: | 177 | if authors is not None: |
283 | 190 | if author is not None: | ||
284 | 191 | raise AssertionError('Specifying both author and authors ' | ||
285 | 192 | 'is not allowed. Specify just authors instead') | ||
286 | 193 | if 'author' in revprops or 'authors' in revprops: | 178 | if 'author' in revprops or 'authors' in revprops: |
287 | 194 | # XXX: maybe we should just accept one of them? | 179 | # XXX: maybe we should just accept one of them? |
288 | 195 | raise AssertionError('author property given twice') | 180 | raise AssertionError('author property given twice') |
289 | @@ -199,17 +184,6 @@ | |||
290 | 199 | raise AssertionError('\\n is not a valid character ' | 184 | raise AssertionError('\\n is not a valid character ' |
291 | 200 | 'in an author identity') | 185 | 'in an author identity') |
292 | 201 | revprops['authors'] = '\n'.join(authors) | 186 | revprops['authors'] = '\n'.join(authors) |
293 | 202 | if author is not None: | ||
294 | 203 | symbol_versioning.warn('The parameter author was deprecated' | ||
295 | 204 | ' in version 1.13. Use authors instead', | ||
296 | 205 | DeprecationWarning) | ||
297 | 206 | if 'author' in revprops or 'authors' in revprops: | ||
298 | 207 | # XXX: maybe we should just accept one of them? | ||
299 | 208 | raise AssertionError('author property given twice') | ||
300 | 209 | if '\n' in author: | ||
301 | 210 | raise AssertionError('\\n is not a valid character ' | ||
302 | 211 | 'in an author identity') | ||
303 | 212 | revprops['authors'] = author | ||
304 | 213 | return revprops | 187 | return revprops |
305 | 214 | 188 | ||
306 | 215 | def commit(self, | 189 | def commit(self, |
307 | 216 | 190 | ||
308 | === modified file 'breezy/config.py' | |||
309 | --- breezy/config.py 2017-05-25 01:35:55 +0000 | |||
310 | +++ breezy/config.py 2017-05-30 21:16:02 +0000 | |||
311 | @@ -97,7 +97,6 @@ | |||
312 | 97 | lockdir, | 97 | lockdir, |
313 | 98 | mergetools, | 98 | mergetools, |
314 | 99 | osutils, | 99 | osutils, |
315 | 100 | symbol_versioning, | ||
316 | 101 | trace, | 100 | trace, |
317 | 102 | transport, | 101 | transport, |
318 | 103 | ui, | 102 | ui, |
319 | @@ -118,10 +117,6 @@ | |||
320 | 118 | text_type, | 117 | text_type, |
321 | 119 | string_types, | 118 | string_types, |
322 | 120 | ) | 119 | ) |
323 | 121 | from .symbol_versioning import ( | ||
324 | 122 | deprecated_in, | ||
325 | 123 | deprecated_method, | ||
326 | 124 | ) | ||
327 | 125 | 120 | ||
328 | 126 | 121 | ||
329 | 127 | CHECK_IF_POSSIBLE=0 | 122 | CHECK_IF_POSSIBLE=0 |
330 | @@ -445,65 +440,6 @@ | |||
331 | 445 | l = [l] | 440 | l = [l] |
332 | 446 | return l | 441 | return l |
333 | 447 | 442 | ||
334 | 448 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
335 | 449 | def get_user_option_as_int_from_SI(self, option_name, default=None): | ||
336 | 450 | """Get a generic option from a human readable size in SI units, e.g 10MB | ||
337 | 451 | |||
338 | 452 | Accepted suffixes are K,M,G. It is case-insensitive and may be followed | ||
339 | 453 | by a trailing b (i.e. Kb, MB). This is intended to be practical and not | ||
340 | 454 | pedantic. | ||
341 | 455 | |||
342 | 456 | :return Integer, expanded to its base-10 value if a proper SI unit is | ||
343 | 457 | found. If the option doesn't exist, or isn't a value in | ||
344 | 458 | SI units, return default (which defaults to None) | ||
345 | 459 | """ | ||
346 | 460 | val = self.get_user_option(option_name) | ||
347 | 461 | if isinstance(val, list): | ||
348 | 462 | val = val[0] | ||
349 | 463 | if val is None: | ||
350 | 464 | val = default | ||
351 | 465 | else: | ||
352 | 466 | p = re.compile("^(\d+)([kmg])*b*$", re.IGNORECASE) | ||
353 | 467 | try: | ||
354 | 468 | m = p.match(val) | ||
355 | 469 | if m is not None: | ||
356 | 470 | val = int(m.group(1)) | ||
357 | 471 | if m.group(2) is not None: | ||
358 | 472 | if m.group(2).lower() == 'k': | ||
359 | 473 | val *= 10**3 | ||
360 | 474 | elif m.group(2).lower() == 'm': | ||
361 | 475 | val *= 10**6 | ||
362 | 476 | elif m.group(2).lower() == 'g': | ||
363 | 477 | val *= 10**9 | ||
364 | 478 | else: | ||
365 | 479 | ui.ui_factory.show_warning(gettext('Invalid config value for "{0}" ' | ||
366 | 480 | ' value {1!r} is not an SI unit.').format( | ||
367 | 481 | option_name, val)) | ||
368 | 482 | val = default | ||
369 | 483 | except TypeError: | ||
370 | 484 | val = default | ||
371 | 485 | return val | ||
372 | 486 | |||
373 | 487 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
374 | 488 | def gpg_signing_command(self): | ||
375 | 489 | """What program should be used to sign signatures?""" | ||
376 | 490 | result = self._gpg_signing_command() | ||
377 | 491 | if result is None: | ||
378 | 492 | result = "gpg" | ||
379 | 493 | return result | ||
380 | 494 | |||
381 | 495 | def _gpg_signing_command(self): | ||
382 | 496 | """See gpg_signing_command().""" | ||
383 | 497 | return None | ||
384 | 498 | |||
385 | 499 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
386 | 500 | def log_format(self): | ||
387 | 501 | """What log format should be used""" | ||
388 | 502 | result = self._log_format() | ||
389 | 503 | if result is None: | ||
390 | 504 | result = "long" | ||
391 | 505 | return result | ||
392 | 506 | |||
393 | 507 | def _log_format(self): | 443 | def _log_format(self): |
394 | 508 | """See log_format().""" | 444 | """See log_format().""" |
395 | 509 | return None | 445 | return None |
396 | @@ -521,25 +457,6 @@ | |||
397 | 521 | """See validate_signatures_in_log().""" | 457 | """See validate_signatures_in_log().""" |
398 | 522 | return None | 458 | return None |
399 | 523 | 459 | ||
400 | 524 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
401 | 525 | def acceptable_keys(self): | ||
402 | 526 | """Comma separated list of key patterns acceptable to | ||
403 | 527 | verify-signatures command""" | ||
404 | 528 | result = self._acceptable_keys() | ||
405 | 529 | return result | ||
406 | 530 | |||
407 | 531 | def _acceptable_keys(self): | ||
408 | 532 | """See acceptable_keys().""" | ||
409 | 533 | return None | ||
410 | 534 | |||
411 | 535 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
412 | 536 | def post_commit(self): | ||
413 | 537 | """An ordered list of python functions to call. | ||
414 | 538 | |||
415 | 539 | Each function takes branch, rev_id as parameters. | ||
416 | 540 | """ | ||
417 | 541 | return self._post_commit() | ||
418 | 542 | |||
419 | 543 | def _post_commit(self): | 460 | def _post_commit(self): |
420 | 544 | """See Config.post_commit.""" | 461 | """See Config.post_commit.""" |
421 | 545 | return None | 462 | return None |
422 | @@ -573,46 +490,6 @@ | |||
423 | 573 | """ | 490 | """ |
424 | 574 | self.username() | 491 | self.username() |
425 | 575 | 492 | ||
426 | 576 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
427 | 577 | def signature_checking(self): | ||
428 | 578 | """What is the current policy for signature checking?.""" | ||
429 | 579 | policy = self._get_signature_checking() | ||
430 | 580 | if policy is not None: | ||
431 | 581 | return policy | ||
432 | 582 | return CHECK_IF_POSSIBLE | ||
433 | 583 | |||
434 | 584 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
435 | 585 | def signing_policy(self): | ||
436 | 586 | """What is the current policy for signature checking?.""" | ||
437 | 587 | policy = self._get_signing_policy() | ||
438 | 588 | if policy is not None: | ||
439 | 589 | return policy | ||
440 | 590 | return SIGN_WHEN_REQUIRED | ||
441 | 591 | |||
442 | 592 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
443 | 593 | def signature_needed(self): | ||
444 | 594 | """Is a signature needed when committing ?.""" | ||
445 | 595 | policy = self._get_signing_policy() | ||
446 | 596 | if policy is None: | ||
447 | 597 | policy = self._get_signature_checking() | ||
448 | 598 | if policy is not None: | ||
449 | 599 | #this warning should go away once check_signatures is | ||
450 | 600 | #implemented (if not before) | ||
451 | 601 | trace.warning("Please use create_signatures," | ||
452 | 602 | " not check_signatures to set signing policy.") | ||
453 | 603 | elif policy == SIGN_ALWAYS: | ||
454 | 604 | return True | ||
455 | 605 | return False | ||
456 | 606 | |||
457 | 607 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
458 | 608 | def gpg_signing_key(self): | ||
459 | 609 | """GPG user-id to sign commits""" | ||
460 | 610 | key = self.get_user_option('gpg_signing_key') | ||
461 | 611 | if key == "default" or key == None: | ||
462 | 612 | return self.user_email() | ||
463 | 613 | else: | ||
464 | 614 | return key | ||
465 | 615 | |||
466 | 616 | def get_alias(self, value): | 493 | def get_alias(self, value): |
467 | 617 | return self._get_alias(value) | 494 | return self._get_alias(value) |
468 | 618 | 495 | ||
469 | @@ -740,24 +617,14 @@ | |||
470 | 740 | class IniBasedConfig(Config): | 617 | class IniBasedConfig(Config): |
471 | 741 | """A configuration policy that draws from ini files.""" | 618 | """A configuration policy that draws from ini files.""" |
472 | 742 | 619 | ||
475 | 743 | def __init__(self, get_filename=symbol_versioning.DEPRECATED_PARAMETER, | 620 | def __init__(self, file_name=None): |
474 | 744 | file_name=None): | ||
476 | 745 | """Base class for configuration files using an ini-like syntax. | 621 | """Base class for configuration files using an ini-like syntax. |
477 | 746 | 622 | ||
478 | 747 | :param file_name: The configuration file path. | 623 | :param file_name: The configuration file path. |
479 | 748 | """ | 624 | """ |
480 | 749 | super(IniBasedConfig, self).__init__() | 625 | super(IniBasedConfig, self).__init__() |
481 | 750 | self.file_name = file_name | 626 | self.file_name = file_name |
492 | 751 | if symbol_versioning.deprecated_passed(get_filename): | 627 | self.file_name = file_name |
483 | 752 | symbol_versioning.warn( | ||
484 | 753 | 'IniBasedConfig.__init__(get_filename) was deprecated in 2.3.' | ||
485 | 754 | ' Use file_name instead.', | ||
486 | 755 | DeprecationWarning, | ||
487 | 756 | stacklevel=2) | ||
488 | 757 | if get_filename is not None: | ||
489 | 758 | self.file_name = get_filename() | ||
490 | 759 | else: | ||
491 | 760 | self.file_name = file_name | ||
493 | 761 | self._content = None | 628 | self._content = None |
494 | 762 | self._parser = None | 629 | self._parser = None |
495 | 763 | 630 | ||
496 | @@ -783,15 +650,9 @@ | |||
497 | 783 | if save: | 650 | if save: |
498 | 784 | self._write_config_file() | 651 | self._write_config_file() |
499 | 785 | 652 | ||
501 | 786 | def _get_parser(self, file=symbol_versioning.DEPRECATED_PARAMETER): | 653 | def _get_parser(self): |
502 | 787 | if self._parser is not None: | 654 | if self._parser is not None: |
503 | 788 | return self._parser | 655 | return self._parser |
504 | 789 | if symbol_versioning.deprecated_passed(file): | ||
505 | 790 | symbol_versioning.warn( | ||
506 | 791 | 'IniBasedConfig._get_parser(file=xxx) was deprecated in 2.3.' | ||
507 | 792 | ' Use IniBasedConfig(_content=xxx) instead.', | ||
508 | 793 | DeprecationWarning, | ||
509 | 794 | stacklevel=2) | ||
510 | 795 | if self._content is not None: | 656 | if self._content is not None: |
511 | 796 | co_input = self._content | 657 | co_input = self._content |
512 | 797 | elif self.file_name is None: | 658 | elif self.file_name is None: |
513 | @@ -1277,26 +1138,6 @@ | |||
514 | 1277 | 1138 | ||
515 | 1278 | def _set_option_policy(self, section, option_name, option_policy): | 1139 | def _set_option_policy(self, section, option_name, option_policy): |
516 | 1279 | """Set the policy for the given option name in the given section.""" | 1140 | """Set the policy for the given option name in the given section.""" |
517 | 1280 | # The old recurse=False option affects all options in the | ||
518 | 1281 | # section. To handle multiple policies in the section, we | ||
519 | 1282 | # need to convert it to a policy_norecurse key. | ||
520 | 1283 | try: | ||
521 | 1284 | recurse = self._get_parser()[section].as_bool('recurse') | ||
522 | 1285 | except KeyError: | ||
523 | 1286 | pass | ||
524 | 1287 | else: | ||
525 | 1288 | symbol_versioning.warn( | ||
526 | 1289 | 'The recurse option is deprecated as of 0.14. ' | ||
527 | 1290 | 'The section "%s" has been converted to use policies.' | ||
528 | 1291 | % section, | ||
529 | 1292 | DeprecationWarning) | ||
530 | 1293 | del self._get_parser()[section]['recurse'] | ||
531 | 1294 | if not recurse: | ||
532 | 1295 | for key in self._get_parser()[section].keys(): | ||
533 | 1296 | if not key.endswith(':policy'): | ||
534 | 1297 | self._get_parser()[section][key + | ||
535 | 1298 | ':policy'] = 'norecurse' | ||
536 | 1299 | |||
537 | 1300 | policy_key = option_name + ':policy' | 1141 | policy_key = option_name + ':policy' |
538 | 1301 | policy_name = _policy_name[option_policy] | 1142 | policy_name = _policy_name[option_policy] |
539 | 1302 | if policy_name is not None: | 1143 | if policy_name is not None: |
540 | 1303 | 1144 | ||
541 | === modified file 'breezy/conflicts.py' | |||
542 | --- breezy/conflicts.py 2017-05-22 00:56:52 +0000 | |||
543 | +++ breezy/conflicts.py 2017-05-30 21:16:02 +0000 | |||
544 | @@ -37,6 +37,7 @@ | |||
545 | 37 | from breezy.i18n import gettext, ngettext | 37 | from breezy.i18n import gettext, ngettext |
546 | 38 | """) | 38 | """) |
547 | 39 | from . import ( | 39 | from . import ( |
548 | 40 | cache_utf8, | ||
549 | 40 | commands, | 41 | commands, |
550 | 41 | option, | 42 | option, |
551 | 42 | registry, | 43 | registry, |
552 | @@ -368,9 +369,11 @@ | |||
553 | 368 | 369 | ||
554 | 369 | def __init__(self, path, file_id=None): | 370 | def __init__(self, path, file_id=None): |
555 | 370 | self.path = path | 371 | self.path = path |
559 | 371 | # warn turned off, because the factory blindly transfers the Stanza | 372 | # the factory blindly transfers the Stanza values to __init__ and |
560 | 372 | # values to __init__ and Stanza is purely a Unicode api. | 373 | # Stanza is purely a Unicode api. |
561 | 373 | self.file_id = osutils.safe_file_id(file_id, warn=False) | 374 | if isinstance(file_id, unicode): |
562 | 375 | file_id = cache_utf8.encode(file_id) | ||
563 | 376 | self.file_id = osutils.safe_file_id(file_id) | ||
564 | 374 | 377 | ||
565 | 375 | def as_stanza(self): | 378 | def as_stanza(self): |
566 | 376 | s = rio.Stanza(type=self.typestring, path=self.path) | 379 | s = rio.Stanza(type=self.typestring, path=self.path) |
567 | @@ -711,10 +714,11 @@ | |||
568 | 711 | conflict_file_id=None): | 714 | conflict_file_id=None): |
569 | 712 | HandledConflict.__init__(self, action, path, file_id) | 715 | HandledConflict.__init__(self, action, path, file_id) |
570 | 713 | self.conflict_path = conflict_path | 716 | self.conflict_path = conflict_path |
575 | 714 | # warn turned off, because the factory blindly transfers the Stanza | 717 | # the factory blindly transfers the Stanza values to __init__, |
576 | 715 | # values to __init__. | 718 | # so they can be unicode. |
577 | 716 | self.conflict_file_id = osutils.safe_file_id(conflict_file_id, | 719 | if isinstance(conflict_file_id, unicode): |
578 | 717 | warn=False) | 720 | conflict_file_id = cache_utf8.encode(conflict_file_id) |
579 | 721 | self.conflict_file_id = osutils.safe_file_id(conflict_file_id) | ||
580 | 718 | 722 | ||
581 | 719 | def _cmp_list(self): | 723 | def _cmp_list(self): |
582 | 720 | return HandledConflict._cmp_list(self) + [self.conflict_path, | 724 | return HandledConflict._cmp_list(self) + [self.conflict_path, |
583 | 721 | 725 | ||
584 | === modified file 'breezy/filters/__init__.py' | |||
585 | --- breezy/filters/__init__.py 2017-05-22 00:56:52 +0000 | |||
586 | +++ breezy/filters/__init__.py 2017-05-30 21:16:02 +0000 | |||
587 | @@ -52,10 +52,6 @@ | |||
588 | 52 | from ..sixish import ( | 52 | from ..sixish import ( |
589 | 53 | BytesIO, | 53 | BytesIO, |
590 | 54 | ) | 54 | ) |
591 | 55 | from ..symbol_versioning import ( | ||
592 | 56 | deprecated_function, | ||
593 | 57 | deprecated_in, | ||
594 | 58 | ) | ||
595 | 59 | 55 | ||
596 | 60 | 56 | ||
597 | 61 | class ContentFilter(object): | 57 | class ContentFilter(object): |
598 | @@ -190,33 +186,6 @@ | |||
599 | 190 | _stack_cache = {} | 186 | _stack_cache = {} |
600 | 191 | 187 | ||
601 | 192 | 188 | ||
602 | 193 | # XXX: This function doesn't have any tests. JRV 2012-03-29 | ||
603 | 194 | @deprecated_function(deprecated_in((2, 6, 0))) | ||
604 | 195 | def register_filter_stack_map(name, stack_map_lookup): | ||
605 | 196 | """Register the filter stacks to use for various preference values. | ||
606 | 197 | |||
607 | 198 | :param name: the preference/filter-stack name | ||
608 | 199 | :param stack_map_lookup: a callable where | ||
609 | 200 | the parameter is the preference value to match and | ||
610 | 201 | the result is the matching stack of filters to use, | ||
611 | 202 | or None if none. | ||
612 | 203 | """ | ||
613 | 204 | filter_stacks_registry.register(name, stack_map_lookup) | ||
614 | 205 | |||
615 | 206 | |||
616 | 207 | # XXX: This function doesn't have any tests. JRV 2012-03-29 | ||
617 | 208 | @deprecated_function(deprecated_in((2, 6, 0))) | ||
618 | 209 | def lazy_register_filter_stack_map(name, module_name, member_name): | ||
619 | 210 | """Lazily register the filter stacks to use for various preference values. | ||
620 | 211 | |||
621 | 212 | :param name: the preference/filter-stack name | ||
622 | 213 | :param module_name: The python path to the module of the filter stack map. | ||
623 | 214 | :param member_name: The name of the stack_map_lookup callable | ||
624 | 215 | in the module. | ||
625 | 216 | """ | ||
626 | 217 | filter_stacks_registry.register_lazy(name, module_name, member_name) | ||
627 | 218 | |||
628 | 219 | |||
629 | 220 | def _get_registered_names(): | 189 | def _get_registered_names(): |
630 | 221 | """Get the list of names with filters registered.""" | 190 | """Get the list of names with filters registered.""" |
631 | 222 | # Note: We may want to intelligently order these later. | 191 | # Note: We may want to intelligently order these later. |
632 | 223 | 192 | ||
633 | === modified file 'breezy/gpg.py' | |||
634 | --- breezy/gpg.py 2017-05-22 00:56:52 +0000 | |||
635 | +++ breezy/gpg.py 2017-05-30 21:16:02 +0000 | |||
636 | @@ -42,10 +42,6 @@ | |||
637 | 42 | from .sixish import ( | 42 | from .sixish import ( |
638 | 43 | BytesIO, | 43 | BytesIO, |
639 | 44 | ) | 44 | ) |
640 | 45 | from .symbol_versioning import ( | ||
641 | 46 | deprecated_in, | ||
642 | 47 | deprecated_method, | ||
643 | 48 | ) | ||
644 | 49 | 45 | ||
645 | 50 | #verification results | 46 | #verification results |
646 | 51 | SIGNATURE_VALID = 0 | 47 | SIGNATURE_VALID = 0 |
647 | @@ -144,30 +140,6 @@ | |||
648 | 144 | else: | 140 | else: |
649 | 145 | self.acceptable_keys.append(pattern) | 141 | self.acceptable_keys.append(pattern) |
650 | 146 | 142 | ||
651 | 147 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
652 | 148 | def do_verifications(self, revisions, repository): | ||
653 | 149 | return bulk_verify_signatures(repository, revisions, self) | ||
654 | 150 | |||
655 | 151 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
656 | 152 | def valid_commits_message(self, count): | ||
657 | 153 | return valid_commits_message(count) | ||
658 | 154 | |||
659 | 155 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
660 | 156 | def unknown_key_message(self, count): | ||
661 | 157 | return unknown_key_message(count) | ||
662 | 158 | |||
663 | 159 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
664 | 160 | def commit_not_valid_message(self, count): | ||
665 | 161 | return commit_not_valid_message(count) | ||
666 | 162 | |||
667 | 163 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
668 | 164 | def commit_not_signed_message(self, count): | ||
669 | 165 | return commit_not_signed_message(count) | ||
670 | 166 | |||
671 | 167 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
672 | 168 | def expired_commit_message(self, count): | ||
673 | 169 | return expired_commit_message(count) | ||
674 | 170 | |||
675 | 171 | 143 | ||
676 | 172 | def _set_gpg_tty(): | 144 | def _set_gpg_tty(): |
677 | 173 | tty = os.environ.get('TTY') | 145 | tty = os.environ.get('TTY') |
678 | @@ -360,73 +332,6 @@ | |||
679 | 360 | "No GnuPG key results for pattern: {0}" | 332 | "No GnuPG key results for pattern: {0}" |
680 | 361 | ).format(pattern)) | 333 | ).format(pattern)) |
681 | 362 | 334 | ||
682 | 363 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
683 | 364 | def do_verifications(self, revisions, repository, | ||
684 | 365 | process_events_callback=None): | ||
685 | 366 | """do verifications on a set of revisions | ||
686 | 367 | |||
687 | 368 | :param revisions: list of revision ids to verify | ||
688 | 369 | :param repository: repository object | ||
689 | 370 | :param process_events_callback: method to call for GUI frontends that | ||
690 | 371 | want to keep their UI refreshed | ||
691 | 372 | |||
692 | 373 | :return: count dictionary of results of each type, | ||
693 | 374 | result list for each revision, | ||
694 | 375 | boolean True if all results are verified successfully | ||
695 | 376 | """ | ||
696 | 377 | return bulk_verify_signatures(repository, revisions, self, | ||
697 | 378 | process_events_callback) | ||
698 | 379 | |||
699 | 380 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
700 | 381 | def verbose_valid_message(self, result): | ||
701 | 382 | """takes a verify result and returns list of signed commits strings""" | ||
702 | 383 | return verbose_valid_message(result) | ||
703 | 384 | |||
704 | 385 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
705 | 386 | def verbose_not_valid_message(self, result, repo): | ||
706 | 387 | """takes a verify result and returns list of not valid commit info""" | ||
707 | 388 | return verbose_not_valid_message(result, repo) | ||
708 | 389 | |||
709 | 390 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
710 | 391 | def verbose_not_signed_message(self, result, repo): | ||
711 | 392 | """takes a verify result and returns list of not signed commit info""" | ||
712 | 393 | return verbose_not_valid_message(result, repo) | ||
713 | 394 | |||
714 | 395 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
715 | 396 | def verbose_missing_key_message(self, result): | ||
716 | 397 | """takes a verify result and returns list of missing key info""" | ||
717 | 398 | return verbose_missing_key_message(result) | ||
718 | 399 | |||
719 | 400 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
720 | 401 | def verbose_expired_key_message(self, result, repo): | ||
721 | 402 | """takes a verify result and returns list of expired key info""" | ||
722 | 403 | return verbose_expired_key_message(result, repo) | ||
723 | 404 | |||
724 | 405 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
725 | 406 | def valid_commits_message(self, count): | ||
726 | 407 | """returns message for number of commits""" | ||
727 | 408 | return valid_commits_message(count) | ||
728 | 409 | |||
729 | 410 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
730 | 411 | def unknown_key_message(self, count): | ||
731 | 412 | """returns message for number of commits""" | ||
732 | 413 | return unknown_key_message(count) | ||
733 | 414 | |||
734 | 415 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
735 | 416 | def commit_not_valid_message(self, count): | ||
736 | 417 | """returns message for number of commits""" | ||
737 | 418 | return commit_not_valid_message(count) | ||
738 | 419 | |||
739 | 420 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
740 | 421 | def commit_not_signed_message(self, count): | ||
741 | 422 | """returns message for number of commits""" | ||
742 | 423 | return commit_not_signed_message(count) | ||
743 | 424 | |||
744 | 425 | @deprecated_method(deprecated_in((2, 6, 0))) | ||
745 | 426 | def expired_commit_message(self, count): | ||
746 | 427 | """returns message for number of commits""" | ||
747 | 428 | return expired_commit_message(count) | ||
748 | 429 | |||
749 | 430 | 335 | ||
750 | 431 | def valid_commits_message(count): | 336 | def valid_commits_message(count): |
751 | 432 | """returns message for number of commits""" | 337 | """returns message for number of commits""" |
752 | 433 | 338 | ||
753 | === modified file 'breezy/hooks.py' | |||
754 | --- breezy/hooks.py 2017-05-22 00:56:52 +0000 | |||
755 | +++ breezy/hooks.py 2017-05-30 21:16:02 +0000 | |||
756 | @@ -20,7 +20,6 @@ | |||
757 | 20 | 20 | ||
758 | 21 | from . import ( | 21 | from . import ( |
759 | 22 | registry, | 22 | registry, |
760 | 23 | symbol_versioning, | ||
761 | 24 | ) | 23 | ) |
762 | 25 | from .lazy_import import lazy_import | 24 | from .lazy_import import lazy_import |
763 | 26 | lazy_import(globals(), """ | 25 | lazy_import(globals(), """ |
764 | 27 | 26 | ||
765 | === modified file 'breezy/inventory.py' | |||
766 | --- breezy/inventory.py 2017-05-22 00:56:52 +0000 | |||
767 | +++ breezy/inventory.py 2017-05-30 21:16:02 +0000 | |||
768 | @@ -50,10 +50,6 @@ | |||
769 | 50 | ) | 50 | ) |
770 | 51 | 51 | ||
771 | 52 | from .static_tuple import StaticTuple | 52 | from .static_tuple import StaticTuple |
772 | 53 | from .symbol_versioning import ( | ||
773 | 54 | deprecated_in, | ||
774 | 55 | deprecated_method, | ||
775 | 56 | ) | ||
776 | 57 | 53 | ||
777 | 58 | 54 | ||
778 | 59 | class InventoryEntry(object): | 55 | class InventoryEntry(object): |
779 | 60 | 56 | ||
780 | === modified file 'breezy/lru_cache.py' | |||
781 | --- breezy/lru_cache.py 2017-05-22 00:56:52 +0000 | |||
782 | +++ breezy/lru_cache.py 2017-05-30 21:16:02 +0000 | |||
783 | @@ -19,7 +19,6 @@ | |||
784 | 19 | from __future__ import absolute_import | 19 | from __future__ import absolute_import |
785 | 20 | 20 | ||
786 | 21 | from . import ( | 21 | from . import ( |
787 | 22 | symbol_versioning, | ||
788 | 23 | trace, | 22 | trace, |
789 | 24 | ) | 23 | ) |
790 | 25 | 24 | ||
791 | @@ -93,13 +92,6 @@ | |||
792 | 93 | def __len__(self): | 92 | def __len__(self): |
793 | 94 | return len(self._cache) | 93 | return len(self._cache) |
794 | 95 | 94 | ||
795 | 96 | @symbol_versioning.deprecated_method( | ||
796 | 97 | symbol_versioning.deprecated_in((2, 5, 0))) | ||
797 | 98 | def add(self, key, value, cleanup=None): | ||
798 | 99 | if cleanup is not None: | ||
799 | 100 | raise ValueError("Per-node cleanup functions no longer supported") | ||
800 | 101 | return self.__setitem__(key, value) | ||
801 | 102 | |||
802 | 103 | def __setitem__(self, key, value): | 95 | def __setitem__(self, key, value): |
803 | 104 | """Add a new value to the cache""" | 96 | """Add a new value to the cache""" |
804 | 105 | if key is _null_key: | 97 | if key is _null_key: |
805 | @@ -143,9 +135,6 @@ | |||
806 | 143 | """Get a new dict with the same key:value pairs as the cache""" | 135 | """Get a new dict with the same key:value pairs as the cache""" |
807 | 144 | return dict((k, n.value) for k, n in self._cache.iteritems()) | 136 | return dict((k, n.value) for k, n in self._cache.iteritems()) |
808 | 145 | 137 | ||
809 | 146 | items = symbol_versioning.deprecated_method( | ||
810 | 147 | symbol_versioning.deprecated_in((2, 5, 0)))(as_dict) | ||
811 | 148 | |||
812 | 149 | def cleanup(self): | 138 | def cleanup(self): |
813 | 150 | """Clear the cache until it shrinks to the requested size. | 139 | """Clear the cache until it shrinks to the requested size. |
814 | 151 | 140 | ||
815 | 152 | 141 | ||
816 | === modified file 'breezy/merge.py' | |||
817 | --- breezy/merge.py 2017-05-22 00:56:52 +0000 | |||
818 | +++ breezy/merge.py 2017-05-30 21:16:02 +0000 | |||
819 | @@ -48,10 +48,6 @@ | |||
820 | 48 | hooks, | 48 | hooks, |
821 | 49 | registry, | 49 | registry, |
822 | 50 | ) | 50 | ) |
823 | 51 | from .symbol_versioning import ( | ||
824 | 52 | deprecated_in, | ||
825 | 53 | deprecated_method, | ||
826 | 54 | ) | ||
827 | 55 | # TODO: Report back as changes are merged in | 51 | # TODO: Report back as changes are merged in |
828 | 56 | 52 | ||
829 | 57 | 53 | ||
830 | 58 | 54 | ||
831 | === modified file 'breezy/missing.py' | |||
832 | --- breezy/missing.py 2017-05-22 00:56:52 +0000 | |||
833 | +++ breezy/missing.py 2017-05-30 21:16:02 +0000 | |||
834 | @@ -20,7 +20,6 @@ | |||
835 | 20 | 20 | ||
836 | 21 | from . import ( | 21 | from . import ( |
837 | 22 | log, | 22 | log, |
838 | 23 | symbol_versioning, | ||
839 | 24 | ) | 23 | ) |
840 | 25 | from . import revision as _mod_revision | 24 | from . import revision as _mod_revision |
841 | 26 | 25 | ||
842 | @@ -50,8 +49,7 @@ | |||
843 | 50 | 49 | ||
844 | 51 | def find_unmerged(local_branch, remote_branch, restrict='all', | 50 | def find_unmerged(local_branch, remote_branch, restrict='all', |
845 | 52 | include_merged=None, backward=False, | 51 | include_merged=None, backward=False, |
848 | 53 | local_revid_range=None, remote_revid_range=None, | 52 | local_revid_range=None, remote_revid_range=None): |
847 | 54 | include_merges=symbol_versioning.DEPRECATED_PARAMETER): | ||
849 | 55 | """Find revisions from each side that have not been merged. | 53 | """Find revisions from each side that have not been merged. |
850 | 56 | 54 | ||
851 | 57 | :param local_branch: Compare the history of local_branch | 55 | :param local_branch: Compare the history of local_branch |
852 | @@ -69,18 +67,10 @@ | |||
853 | 69 | revisions (lower bound, upper bound) | 67 | revisions (lower bound, upper bound) |
854 | 70 | :param remote_revid_range: Revision-id range for filtering remote_branch | 68 | :param remote_revid_range: Revision-id range for filtering remote_branch |
855 | 71 | revisions (lower bound, upper bound) | 69 | revisions (lower bound, upper bound) |
856 | 72 | :param include_merges: Deprecated historical alias for include_merged | ||
857 | 73 | 70 | ||
858 | 74 | :return: A list of [(revno, revision_id)] for the mainline revisions on | 71 | :return: A list of [(revno, revision_id)] for the mainline revisions on |
859 | 75 | each side. | 72 | each side. |
860 | 76 | """ | 73 | """ |
861 | 77 | if symbol_versioning.deprecated_passed(include_merges): | ||
862 | 78 | symbol_versioning.warn( | ||
863 | 79 | 'include_merges was deprecated in 2.5.' | ||
864 | 80 | ' Use include_merged instead.', | ||
865 | 81 | DeprecationWarning, stacklevel=2) | ||
866 | 82 | if include_merged is None: | ||
867 | 83 | include_merged = include_merges | ||
868 | 84 | if include_merged is None: | 74 | if include_merged is None: |
869 | 85 | include_merged = False | 75 | include_merged = False |
870 | 86 | local_branch.lock_read() | 76 | local_branch.lock_read() |
871 | 87 | 77 | ||
872 | === modified file 'breezy/mutabletree.py' | |||
873 | --- breezy/mutabletree.py 2017-05-25 01:35:55 +0000 | |||
874 | +++ breezy/mutabletree.py 2017-05-30 21:16:02 +0000 | |||
875 | @@ -189,8 +189,7 @@ | |||
876 | 189 | raise NotImplementedError(self.apply_inventory_delta) | 189 | raise NotImplementedError(self.apply_inventory_delta) |
877 | 190 | 190 | ||
878 | 191 | @needs_write_lock | 191 | @needs_write_lock |
881 | 192 | def commit(self, message=None, revprops=None, *args, | 192 | def commit(self, message=None, revprops=None, *args, **kwargs): |
880 | 193 | **kwargs): | ||
882 | 194 | # avoid circular imports | 193 | # avoid circular imports |
883 | 195 | from breezy import commit | 194 | from breezy import commit |
884 | 196 | possible_master_transports=[] | 195 | possible_master_transports=[] |
885 | @@ -198,7 +197,6 @@ | |||
886 | 198 | revprops, | 197 | revprops, |
887 | 199 | self.branch, | 198 | self.branch, |
888 | 200 | kwargs.pop('authors', None), | 199 | kwargs.pop('authors', None), |
889 | 201 | kwargs.pop('author', None), | ||
890 | 202 | kwargs.get('local', False), | 200 | kwargs.get('local', False), |
891 | 203 | possible_master_transports) | 201 | possible_master_transports) |
892 | 204 | # args for wt.commit start at message from the Commit.commit method, | 202 | # args for wt.commit start at message from the Commit.commit method, |
893 | 205 | 203 | ||
894 | === modified file 'breezy/osutils.py' | |||
895 | --- breezy/osutils.py 2017-05-30 19:39:52 +0000 | |||
896 | +++ breezy/osutils.py 2017-05-30 21:16:02 +0000 | |||
897 | @@ -46,7 +46,6 @@ | |||
898 | 46 | import unicodedata | 46 | import unicodedata |
899 | 47 | 47 | ||
900 | 48 | from breezy import ( | 48 | from breezy import ( |
901 | 49 | cache_utf8, | ||
902 | 50 | config, | 49 | config, |
903 | 51 | errors, | 50 | errors, |
904 | 52 | trace, | 51 | trace, |
905 | @@ -59,13 +58,6 @@ | |||
906 | 59 | PY3, | 58 | PY3, |
907 | 60 | text_type, | 59 | text_type, |
908 | 61 | ) | 60 | ) |
909 | 62 | from .symbol_versioning import ( | ||
910 | 63 | DEPRECATED_PARAMETER, | ||
911 | 64 | deprecated_function, | ||
912 | 65 | deprecated_in, | ||
913 | 66 | deprecated_passed, | ||
914 | 67 | warn as warn_deprecated, | ||
915 | 68 | ) | ||
916 | 69 | 61 | ||
917 | 70 | from hashlib import ( | 62 | from hashlib import ( |
918 | 71 | md5, | 63 | md5, |
919 | @@ -74,7 +66,7 @@ | |||
920 | 74 | 66 | ||
921 | 75 | 67 | ||
922 | 76 | import breezy | 68 | import breezy |
924 | 77 | from . import symbol_versioning, _fs_enc | 69 | from . import _fs_enc |
925 | 78 | 70 | ||
926 | 79 | 71 | ||
927 | 80 | # Cross platform wall-clock time functionality with decent resolution. | 72 | # Cross platform wall-clock time functionality with decent resolution. |
928 | @@ -1415,33 +1407,22 @@ | |||
929 | 1415 | return unicode_or_utf8_string.encode('utf-8') | 1407 | return unicode_or_utf8_string.encode('utf-8') |
930 | 1416 | 1408 | ||
931 | 1417 | 1409 | ||
938 | 1418 | _revision_id_warning = ('Unicode revision ids were deprecated in bzr 0.15.' | 1410 | def safe_revision_id(unicode_or_utf8_string): |
933 | 1419 | ' Revision id generators should be creating utf8' | ||
934 | 1420 | ' revision ids.') | ||
935 | 1421 | |||
936 | 1422 | |||
937 | 1423 | def safe_revision_id(unicode_or_utf8_string, warn=True): | ||
939 | 1424 | """Revision ids should now be utf8, but at one point they were unicode. | 1411 | """Revision ids should now be utf8, but at one point they were unicode. |
940 | 1425 | 1412 | ||
941 | 1426 | :param unicode_or_utf8_string: A possibly Unicode revision_id. (can also be | 1413 | :param unicode_or_utf8_string: A possibly Unicode revision_id. (can also be |
942 | 1427 | utf8 or None). | 1414 | utf8 or None). |
943 | 1428 | :param warn: Functions that are sanitizing user data can set warn=False | ||
944 | 1429 | :return: None or a utf8 revision id. | 1415 | :return: None or a utf8 revision id. |
945 | 1430 | """ | 1416 | """ |
946 | 1431 | if (unicode_or_utf8_string is None | 1417 | if (unicode_or_utf8_string is None |
947 | 1432 | or unicode_or_utf8_string.__class__ == str): | 1418 | or unicode_or_utf8_string.__class__ == str): |
948 | 1433 | return unicode_or_utf8_string | 1419 | return unicode_or_utf8_string |
960 | 1434 | if warn: | 1420 | raise TypeError('Unicode revision ids are no longer supported. ' |
961 | 1435 | symbol_versioning.warn(_revision_id_warning, DeprecationWarning, | 1421 | 'Revision id generators should be creating utf8 revision ' |
962 | 1436 | stacklevel=2) | 1422 | 'ids.') |
963 | 1437 | return cache_utf8.encode(unicode_or_utf8_string) | 1423 | |
964 | 1438 | 1424 | ||
965 | 1439 | 1425 | def safe_file_id(unicode_or_utf8_string): | |
955 | 1440 | _file_id_warning = ('Unicode file ids were deprecated in bzr 0.15. File id' | ||
956 | 1441 | ' generators should be creating utf8 file ids.') | ||
957 | 1442 | |||
958 | 1443 | |||
959 | 1444 | def safe_file_id(unicode_or_utf8_string, warn=True): | ||
966 | 1445 | """File ids should now be utf8, but at one point they were unicode. | 1426 | """File ids should now be utf8, but at one point they were unicode. |
967 | 1446 | 1427 | ||
968 | 1447 | This is the same as safe_utf8, except it uses the cached encode functions | 1428 | This is the same as safe_utf8, except it uses the cached encode functions |
969 | @@ -1449,16 +1430,13 @@ | |||
970 | 1449 | 1430 | ||
971 | 1450 | :param unicode_or_utf8_string: A possibly Unicode file_id. (can also be | 1431 | :param unicode_or_utf8_string: A possibly Unicode file_id. (can also be |
972 | 1451 | utf8 or None). | 1432 | utf8 or None). |
973 | 1452 | :param warn: Functions that are sanitizing user data can set warn=False | ||
974 | 1453 | :return: None or a utf8 file id. | 1433 | :return: None or a utf8 file id. |
975 | 1454 | """ | 1434 | """ |
976 | 1455 | if (unicode_or_utf8_string is None | 1435 | if (unicode_or_utf8_string is None |
977 | 1456 | or unicode_or_utf8_string.__class__ == str): | 1436 | or unicode_or_utf8_string.__class__ == str): |
978 | 1457 | return unicode_or_utf8_string | 1437 | return unicode_or_utf8_string |
983 | 1458 | if warn: | 1438 | raise TypeError('Unicode file ids are no longer supported. ' |
984 | 1459 | symbol_versioning.warn(_file_id_warning, DeprecationWarning, | 1439 | 'File id generators should be creating utf8 file ids.') |
981 | 1460 | stacklevel=2) | ||
982 | 1461 | return cache_utf8.encode(unicode_or_utf8_string) | ||
985 | 1462 | 1440 | ||
986 | 1463 | 1441 | ||
987 | 1464 | _platform_normalizes_filenames = False | 1442 | _platform_normalizes_filenames = False |
988 | @@ -2034,7 +2012,7 @@ | |||
989 | 2034 | _cached_user_encoding = None | 2012 | _cached_user_encoding = None |
990 | 2035 | 2013 | ||
991 | 2036 | 2014 | ||
993 | 2037 | def get_user_encoding(use_cache=DEPRECATED_PARAMETER): | 2015 | def get_user_encoding(): |
994 | 2038 | """Find out what the preferred user encoding is. | 2016 | """Find out what the preferred user encoding is. |
995 | 2039 | 2017 | ||
996 | 2040 | This is generally the encoding that is used for command line parameters | 2018 | This is generally the encoding that is used for command line parameters |
997 | @@ -2044,9 +2022,6 @@ | |||
998 | 2044 | :return: A string defining the preferred user encoding | 2022 | :return: A string defining the preferred user encoding |
999 | 2045 | """ | 2023 | """ |
1000 | 2046 | global _cached_user_encoding | 2024 | global _cached_user_encoding |
1001 | 2047 | if deprecated_passed(use_cache): | ||
1002 | 2048 | warn_deprecated("use_cache should only have been used for tests", | ||
1003 | 2049 | DeprecationWarning, stacklevel=2) | ||
1004 | 2050 | if _cached_user_encoding is not None: | 2025 | if _cached_user_encoding is not None: |
1005 | 2051 | return _cached_user_encoding | 2026 | return _cached_user_encoding |
1006 | 2052 | 2027 | ||
1007 | @@ -2319,30 +2294,6 @@ | |||
1008 | 2319 | raise | 2294 | raise |
1009 | 2320 | 2295 | ||
1010 | 2321 | 2296 | ||
1011 | 2322 | @deprecated_function(deprecated_in((2, 2, 0))) | ||
1012 | 2323 | def re_compile_checked(re_string, flags=0, where=""): | ||
1013 | 2324 | """Return a compiled re, or raise a sensible error. | ||
1014 | 2325 | |||
1015 | 2326 | This should only be used when compiling user-supplied REs. | ||
1016 | 2327 | |||
1017 | 2328 | :param re_string: Text form of regular expression. | ||
1018 | 2329 | :param flags: eg re.IGNORECASE | ||
1019 | 2330 | :param where: Message explaining to the user the context where | ||
1020 | 2331 | it occurred, eg 'log search filter'. | ||
1021 | 2332 | """ | ||
1022 | 2333 | # from https://bugs.launchpad.net/bzr/+bug/251352 | ||
1023 | 2334 | try: | ||
1024 | 2335 | re_obj = re.compile(re_string, flags) | ||
1025 | 2336 | re_obj.search("") | ||
1026 | 2337 | return re_obj | ||
1027 | 2338 | except errors.InvalidPattern as e: | ||
1028 | 2339 | if where: | ||
1029 | 2340 | where = ' in ' + where | ||
1030 | 2341 | # despite the name 'error' is a type | ||
1031 | 2342 | raise errors.BzrCommandError('Invalid regular expression%s: %s' | ||
1032 | 2343 | % (where, e.msg)) | ||
1033 | 2344 | |||
1034 | 2345 | |||
1035 | 2346 | if sys.platform == "win32": | 2297 | if sys.platform == "win32": |
1036 | 2347 | def getchar(): | 2298 | def getchar(): |
1037 | 2348 | import msvcrt | 2299 | import msvcrt |
1038 | 2349 | 2300 | ||
1039 | === modified file 'breezy/plugins/weave_fmt/bzrdir.py' | |||
1040 | --- breezy/plugins/weave_fmt/bzrdir.py 2017-05-25 01:35:55 +0000 | |||
1041 | +++ breezy/plugins/weave_fmt/bzrdir.py 2017-05-30 21:16:02 +0000 | |||
1042 | @@ -874,14 +874,10 @@ | |||
1043 | 874 | return self.transport | 874 | return self.transport |
1044 | 875 | raise errors.IncompatibleFormat(workingtree_format, self._format) | 875 | raise errors.IncompatibleFormat(workingtree_format, self._format) |
1045 | 876 | 876 | ||
1047 | 877 | def needs_format_conversion(self, format=None): | 877 | def needs_format_conversion(self, format): |
1048 | 878 | """See ControlDir.needs_format_conversion().""" | 878 | """See ControlDir.needs_format_conversion().""" |
1049 | 879 | # if the format is not the same as the system default, | 879 | # if the format is not the same as the system default, |
1050 | 880 | # an upgrade is needed. | 880 | # an upgrade is needed. |
1051 | 881 | if format is None: | ||
1052 | 882 | symbol_versioning.warn(symbol_versioning.deprecated_in((1, 13, 0)) | ||
1053 | 883 | % 'needs_format_conversion(format=None)') | ||
1054 | 884 | format = BzrDirFormat.get_default_format() | ||
1055 | 885 | return not isinstance(self._format, format.__class__) | 881 | return not isinstance(self._format, format.__class__) |
1056 | 886 | 882 | ||
1057 | 887 | def open_branch(self, name=None, unsupported=False, | 883 | def open_branch(self, name=None, unsupported=False, |
1058 | @@ -945,11 +941,8 @@ | |||
1059 | 945 | """See ControlDir.create_repository.""" | 941 | """See ControlDir.create_repository.""" |
1060 | 946 | return self._format.repository_format.initialize(self, shared) | 942 | return self._format.repository_format.initialize(self, shared) |
1061 | 947 | 943 | ||
1063 | 948 | def needs_format_conversion(self, format=None): | 944 | def needs_format_conversion(self, format): |
1064 | 949 | """Format 4 dirs are always in need of conversion.""" | 945 | """Format 4 dirs are always in need of conversion.""" |
1065 | 950 | if format is None: | ||
1066 | 951 | symbol_versioning.warn(symbol_versioning.deprecated_in((1, 13, 0)) | ||
1067 | 952 | % 'needs_format_conversion(format=None)') | ||
1068 | 953 | return True | 946 | return True |
1069 | 954 | 947 | ||
1070 | 955 | def open_repository(self): | 948 | def open_repository(self): |
1071 | 956 | 949 | ||
1072 | === modified file 'breezy/plugins/weave_fmt/repository.py' | |||
1073 | --- breezy/plugins/weave_fmt/repository.py 2017-05-22 00:56:52 +0000 | |||
1074 | +++ breezy/plugins/weave_fmt/repository.py 2017-05-30 21:16:02 +0000 | |||
1075 | @@ -41,7 +41,6 @@ | |||
1076 | 41 | lockable_files, | 41 | lockable_files, |
1077 | 42 | lockdir, | 42 | lockdir, |
1078 | 43 | osutils, | 43 | osutils, |
1079 | 44 | symbol_versioning, | ||
1080 | 45 | trace, | 44 | trace, |
1081 | 46 | tuned_gzip, | 45 | tuned_gzip, |
1082 | 47 | urlutils, | 46 | urlutils, |
1083 | @@ -822,7 +821,6 @@ | |||
1084 | 822 | 821 | ||
1085 | 823 | @needs_read_lock | 822 | @needs_read_lock |
1086 | 824 | def search_missing_revision_ids(self, | 823 | def search_missing_revision_ids(self, |
1087 | 825 | revision_id=symbol_versioning.DEPRECATED_PARAMETER, | ||
1088 | 826 | find_ghosts=True, revision_ids=None, if_present_ids=None, | 824 | find_ghosts=True, revision_ids=None, if_present_ids=None, |
1089 | 827 | limit=None): | 825 | limit=None): |
1090 | 828 | """See InterRepository.search_missing_revision_ids().""" | 826 | """See InterRepository.search_missing_revision_ids().""" |
1091 | @@ -837,17 +835,6 @@ | |||
1092 | 837 | # disk format scales terribly for push anyway due to rewriting | 835 | # disk format scales terribly for push anyway due to rewriting |
1093 | 838 | # inventory.weave, this is considered acceptable. | 836 | # inventory.weave, this is considered acceptable. |
1094 | 839 | # - RBC 20060209 | 837 | # - RBC 20060209 |
1095 | 840 | if symbol_versioning.deprecated_passed(revision_id): | ||
1096 | 841 | symbol_versioning.warn( | ||
1097 | 842 | 'search_missing_revision_ids(revision_id=...) was ' | ||
1098 | 843 | 'deprecated in 2.4. Use revision_ids=[...] instead.', | ||
1099 | 844 | DeprecationWarning, stacklevel=2) | ||
1100 | 845 | if revision_ids is not None: | ||
1101 | 846 | raise AssertionError( | ||
1102 | 847 | 'revision_ids is mutually exclusive with revision_id') | ||
1103 | 848 | if revision_id is not None: | ||
1104 | 849 | revision_ids = [revision_id] | ||
1105 | 850 | del revision_id | ||
1106 | 851 | source_ids_set = self._present_source_revisions_for( | 838 | source_ids_set = self._present_source_revisions_for( |
1107 | 852 | revision_ids, if_present_ids) | 839 | revision_ids, if_present_ids) |
1108 | 853 | # source_ids is the worst possible case we may need to pull. | 840 | # source_ids is the worst possible case we may need to pull. |
1109 | 854 | 841 | ||
1110 | === modified file 'breezy/remote.py' | |||
1111 | --- breezy/remote.py 2017-05-25 01:35:55 +0000 | |||
1112 | +++ breezy/remote.py 2017-05-30 21:16:02 +0000 | |||
1113 | @@ -37,7 +37,6 @@ | |||
1114 | 37 | repository as _mod_repository, | 37 | repository as _mod_repository, |
1115 | 38 | revision as _mod_revision, | 38 | revision as _mod_revision, |
1116 | 39 | static_tuple, | 39 | static_tuple, |
1117 | 40 | symbol_versioning, | ||
1118 | 41 | testament as _mod_testament, | 40 | testament as _mod_testament, |
1119 | 42 | urlutils, | 41 | urlutils, |
1120 | 43 | vf_repository, | 42 | vf_repository, |
1121 | @@ -2101,7 +2100,6 @@ | |||
1122 | 2101 | 2100 | ||
1123 | 2102 | @needs_read_lock | 2101 | @needs_read_lock |
1124 | 2103 | def search_missing_revision_ids(self, other, | 2102 | def search_missing_revision_ids(self, other, |
1125 | 2104 | revision_id=symbol_versioning.DEPRECATED_PARAMETER, | ||
1126 | 2105 | find_ghosts=True, revision_ids=None, if_present_ids=None, | 2103 | find_ghosts=True, revision_ids=None, if_present_ids=None, |
1127 | 2106 | limit=None): | 2104 | limit=None): |
1128 | 2107 | """Return the revision ids that other has that this does not. | 2105 | """Return the revision ids that other has that this does not. |
1129 | @@ -2110,16 +2108,6 @@ | |||
1130 | 2110 | 2108 | ||
1131 | 2111 | revision_id: only return revision ids included by revision_id. | 2109 | revision_id: only return revision ids included by revision_id. |
1132 | 2112 | """ | 2110 | """ |
1133 | 2113 | if symbol_versioning.deprecated_passed(revision_id): | ||
1134 | 2114 | symbol_versioning.warn( | ||
1135 | 2115 | 'search_missing_revision_ids(revision_id=...) was ' | ||
1136 | 2116 | 'deprecated in 2.4. Use revision_ids=[...] instead.', | ||
1137 | 2117 | DeprecationWarning, stacklevel=2) | ||
1138 | 2118 | if revision_ids is not None: | ||
1139 | 2119 | raise AssertionError( | ||
1140 | 2120 | 'revision_ids is mutually exclusive with revision_id') | ||
1141 | 2121 | if revision_id is not None: | ||
1142 | 2122 | revision_ids = [revision_id] | ||
1143 | 2123 | inter_repo = _mod_repository.InterRepository.get(other, self) | 2111 | inter_repo = _mod_repository.InterRepository.get(other, self) |
1144 | 2124 | return inter_repo.search_missing_revision_ids( | 2112 | return inter_repo.search_missing_revision_ids( |
1145 | 2125 | find_ghosts=find_ghosts, revision_ids=revision_ids, | 2113 | find_ghosts=find_ghosts, revision_ids=revision_ids, |
1146 | 2126 | 2114 | ||
1147 | === modified file 'breezy/repofmt/knitrepo.py' | |||
1148 | --- breezy/repofmt/knitrepo.py 2017-05-22 00:56:52 +0000 | |||
1149 | +++ breezy/repofmt/knitrepo.py 2017-05-30 21:16:02 +0000 | |||
1150 | @@ -49,7 +49,6 @@ | |||
1151 | 49 | VersionedFileCommitBuilder, | 49 | VersionedFileCommitBuilder, |
1152 | 50 | VersionedFileRootCommitBuilder, | 50 | VersionedFileRootCommitBuilder, |
1153 | 51 | ) | 51 | ) |
1154 | 52 | from .. import symbol_versioning | ||
1155 | 53 | 52 | ||
1156 | 54 | 53 | ||
1157 | 55 | class _KnitParentsProvider(object): | 54 | class _KnitParentsProvider(object): |
1158 | 56 | 55 | ||
1159 | === modified file 'breezy/repository.py' | |||
1160 | --- breezy/repository.py 2017-05-25 01:35:55 +0000 | |||
1161 | +++ breezy/repository.py 2017-05-30 21:16:02 +0000 | |||
1162 | @@ -43,7 +43,6 @@ | |||
1163 | 43 | bzrdir, | 43 | bzrdir, |
1164 | 44 | errors, | 44 | errors, |
1165 | 45 | registry, | 45 | registry, |
1166 | 46 | symbol_versioning, | ||
1167 | 47 | ui, | 46 | ui, |
1168 | 48 | ) | 47 | ) |
1169 | 49 | from .decorators import needs_read_lock, needs_write_lock, only_raises | 48 | from .decorators import needs_read_lock, needs_write_lock, only_raises |
1170 | @@ -577,25 +576,14 @@ | |||
1171 | 577 | 576 | ||
1172 | 578 | @needs_read_lock | 577 | @needs_read_lock |
1173 | 579 | def search_missing_revision_ids(self, other, | 578 | def search_missing_revision_ids(self, other, |
1174 | 580 | revision_id=symbol_versioning.DEPRECATED_PARAMETER, | ||
1175 | 581 | find_ghosts=True, revision_ids=None, if_present_ids=None, | 579 | find_ghosts=True, revision_ids=None, if_present_ids=None, |
1176 | 582 | limit=None): | 580 | limit=None): |
1177 | 583 | """Return the revision ids that other has that this does not. | 581 | """Return the revision ids that other has that this does not. |
1178 | 584 | 582 | ||
1179 | 585 | These are returned in topological order. | 583 | These are returned in topological order. |
1180 | 586 | 584 | ||
1182 | 587 | revision_id: only return revision ids included by revision_id. | 585 | revision_ids: only return revision ids included by revision_id. |
1183 | 588 | """ | 586 | """ |
1184 | 589 | if symbol_versioning.deprecated_passed(revision_id): | ||
1185 | 590 | symbol_versioning.warn( | ||
1186 | 591 | 'search_missing_revision_ids(revision_id=...) was ' | ||
1187 | 592 | 'deprecated in 2.4. Use revision_ids=[...] instead.', | ||
1188 | 593 | DeprecationWarning, stacklevel=3) | ||
1189 | 594 | if revision_ids is not None: | ||
1190 | 595 | raise AssertionError( | ||
1191 | 596 | 'revision_ids is mutually exclusive with revision_id') | ||
1192 | 597 | if revision_id is not None: | ||
1193 | 598 | revision_ids = [revision_id] | ||
1194 | 599 | return InterRepository.get(other, self).search_missing_revision_ids( | 587 | return InterRepository.get(other, self).search_missing_revision_ids( |
1195 | 600 | find_ghosts=find_ghosts, revision_ids=revision_ids, | 588 | find_ghosts=find_ghosts, revision_ids=revision_ids, |
1196 | 601 | if_present_ids=if_present_ids, limit=limit) | 589 | if_present_ids=if_present_ids, limit=limit) |
1197 | @@ -1662,13 +1650,10 @@ | |||
1198 | 1662 | 1650 | ||
1199 | 1663 | @needs_read_lock | 1651 | @needs_read_lock |
1200 | 1664 | def search_missing_revision_ids(self, | 1652 | def search_missing_revision_ids(self, |
1201 | 1665 | revision_id=symbol_versioning.DEPRECATED_PARAMETER, | ||
1202 | 1666 | find_ghosts=True, revision_ids=None, if_present_ids=None, | 1653 | find_ghosts=True, revision_ids=None, if_present_ids=None, |
1203 | 1667 | limit=None): | 1654 | limit=None): |
1204 | 1668 | """Return the revision ids that source has that target does not. | 1655 | """Return the revision ids that source has that target does not. |
1205 | 1669 | 1656 | ||
1206 | 1670 | :param revision_id: only return revision ids included by this | ||
1207 | 1671 | revision_id. | ||
1208 | 1672 | :param revision_ids: return revision ids included by these | 1657 | :param revision_ids: return revision ids included by these |
1209 | 1673 | revision_ids. NoSuchRevision will be raised if any of these | 1658 | revision_ids. NoSuchRevision will be raised if any of these |
1210 | 1674 | revisions are not present. | 1659 | revisions are not present. |
1211 | 1675 | 1660 | ||
1212 | === modified file 'breezy/revision.py' | |||
1213 | --- breezy/revision.py 2017-05-22 00:56:52 +0000 | |||
1214 | +++ breezy/revision.py 2017-05-30 21:16:02 +0000 | |||
1215 | @@ -26,7 +26,6 @@ | |||
1216 | 26 | """) | 26 | """) |
1217 | 27 | from . import ( | 27 | from . import ( |
1218 | 28 | errors, | 28 | errors, |
1219 | 29 | symbol_versioning, | ||
1220 | 30 | ) | 29 | ) |
1221 | 31 | from .osutils import contains_whitespace | 30 | from .osutils import contains_whitespace |
1222 | 32 | 31 | ||
1223 | @@ -218,17 +217,14 @@ | |||
1224 | 218 | def ensure_null(revision_id): | 217 | def ensure_null(revision_id): |
1225 | 219 | """Ensure only NULL_REVISION is used to represent the null revision""" | 218 | """Ensure only NULL_REVISION is used to represent the null revision""" |
1226 | 220 | if revision_id is None: | 219 | if revision_id is None: |
1233 | 221 | symbol_versioning.warn('NULL_REVISION should be used for the null' | 220 | raise ValueError( |
1234 | 222 | ' revision instead of None, as of bzr 0.91.', | 221 | 'NULL_REVISION should be used for the null' |
1235 | 223 | DeprecationWarning, stacklevel=2) | 222 | ' revision instead of None.') |
1236 | 224 | return NULL_REVISION | 223 | return revision_id |
1231 | 225 | else: | ||
1232 | 226 | return revision_id | ||
1237 | 227 | 224 | ||
1238 | 228 | 225 | ||
1239 | 229 | def is_null(revision_id): | 226 | def is_null(revision_id): |
1240 | 230 | if revision_id is None: | 227 | if revision_id is None: |
1245 | 231 | symbol_versioning.warn('NULL_REVISION should be used for the null' | 228 | raise ValueError('NULL_REVISION should be used for the null' |
1246 | 232 | ' revision instead of None, as of bzr 0.90.', | 229 | ' revision instead of None.') |
1247 | 233 | DeprecationWarning, stacklevel=2) | 230 | return (revision_id == NULL_REVISION) |
1244 | 234 | return revision_id in (None, NULL_REVISION) | ||
1248 | 235 | 231 | ||
1249 | === modified file 'breezy/revisionspec.py' | |||
1250 | --- breezy/revisionspec.py 2017-05-22 00:56:52 +0000 | |||
1251 | +++ breezy/revisionspec.py 2017-05-30 21:16:02 +0000 | |||
1252 | @@ -24,9 +24,9 @@ | |||
1253 | 24 | 24 | ||
1254 | 25 | from breezy import ( | 25 | from breezy import ( |
1255 | 26 | branch as _mod_branch, | 26 | branch as _mod_branch, |
1256 | 27 | cache_utf8, | ||
1257 | 27 | osutils, | 28 | osutils, |
1258 | 28 | revision, | 29 | revision, |
1259 | 29 | symbol_versioning, | ||
1260 | 30 | workingtree, | 30 | workingtree, |
1261 | 31 | ) | 31 | ) |
1262 | 32 | from breezy.i18n import gettext | 32 | from breezy.i18n import gettext |
1263 | @@ -109,16 +109,11 @@ | |||
1264 | 109 | self.revno, self.rev_id, self.branch) | 109 | self.revno, self.rev_id, self.branch) |
1265 | 110 | 110 | ||
1266 | 111 | @staticmethod | 111 | @staticmethod |
1268 | 112 | def from_revision_id(branch, revision_id, revs=symbol_versioning.DEPRECATED_PARAMETER): | 112 | def from_revision_id(branch, revision_id): |
1269 | 113 | """Construct a RevisionInfo given just the id. | 113 | """Construct a RevisionInfo given just the id. |
1270 | 114 | 114 | ||
1271 | 115 | Use this if you don't know or care what the revno is. | 115 | Use this if you don't know or care what the revno is. |
1272 | 116 | """ | 116 | """ |
1273 | 117 | if symbol_versioning.deprecated_passed(revs): | ||
1274 | 118 | symbol_versioning.warn( | ||
1275 | 119 | 'RevisionInfo.from_revision_id(revs) was deprecated in 2.5.', | ||
1276 | 120 | DeprecationWarning, | ||
1277 | 121 | stacklevel=2) | ||
1278 | 122 | return RevisionInfo(branch, revno=None, rev_id=revision_id) | 117 | return RevisionInfo(branch, revno=None, rev_id=revision_id) |
1279 | 123 | 118 | ||
1280 | 124 | 119 | ||
1281 | @@ -142,8 +137,6 @@ | |||
1282 | 142 | """ | 137 | """ |
1283 | 143 | 138 | ||
1284 | 144 | prefix = None | 139 | prefix = None |
1285 | 145 | # wants_revision_history has been deprecated in 2.5. | ||
1286 | 146 | wants_revision_history = False | ||
1287 | 147 | dwim_catchable_exceptions = (errors.InvalidRevisionSpec,) | 140 | dwim_catchable_exceptions = (errors.InvalidRevisionSpec,) |
1288 | 148 | """Exceptions that RevisionSpec_dwim._match_on will catch. | 141 | """Exceptions that RevisionSpec_dwim._match_on will catch. |
1289 | 149 | 142 | ||
1290 | @@ -185,11 +178,9 @@ | |||
1291 | 185 | called directly. Only from RevisionSpec.from_string() | 178 | called directly. Only from RevisionSpec.from_string() |
1292 | 186 | """ | 179 | """ |
1293 | 187 | if not _internal: | 180 | if not _internal: |
1299 | 188 | symbol_versioning.warn('Creating a RevisionSpec directly has' | 181 | raise AssertionError( |
1300 | 189 | ' been deprecated in version 0.11. Use' | 182 | 'Creating a RevisionSpec directly is not supported. ' |
1301 | 190 | ' RevisionSpec.from_string()' | 183 | 'Use RevisionSpec.from_string() instead.') |
1297 | 191 | ' instead.', | ||
1298 | 192 | DeprecationWarning, stacklevel=2) | ||
1302 | 193 | self.user_spec = spec | 184 | self.user_spec = spec |
1303 | 194 | if self.prefix and spec.startswith(self.prefix): | 185 | if self.prefix and spec.startswith(self.prefix): |
1304 | 195 | spec = spec[len(self.prefix):] | 186 | spec = spec[len(self.prefix):] |
1305 | @@ -212,27 +203,7 @@ | |||
1306 | 212 | raise errors.InvalidRevisionSpec(self.spec, branch) | 203 | raise errors.InvalidRevisionSpec(self.spec, branch) |
1307 | 213 | 204 | ||
1308 | 214 | def in_history(self, branch): | 205 | def in_history(self, branch): |
1330 | 215 | if branch: | 206 | return self._match_on_and_check(branch, revs=None) |
1310 | 216 | if self.wants_revision_history: | ||
1311 | 217 | symbol_versioning.warn( | ||
1312 | 218 | "RevisionSpec.wants_revision_history was " | ||
1313 | 219 | "deprecated in 2.5 (%s)." % self.__class__.__name__, | ||
1314 | 220 | DeprecationWarning) | ||
1315 | 221 | branch.lock_read() | ||
1316 | 222 | try: | ||
1317 | 223 | graph = branch.repository.get_graph() | ||
1318 | 224 | revs = list(graph.iter_lefthand_ancestry( | ||
1319 | 225 | branch.last_revision(), [revision.NULL_REVISION])) | ||
1320 | 226 | finally: | ||
1321 | 227 | branch.unlock() | ||
1322 | 228 | revs.reverse() | ||
1323 | 229 | else: | ||
1324 | 230 | revs = None | ||
1325 | 231 | else: | ||
1326 | 232 | # this should never trigger. | ||
1327 | 233 | # TODO: make it a deprecated code path. RBC 20060928 | ||
1328 | 234 | revs = None | ||
1329 | 235 | return self._match_on_and_check(branch, revs) | ||
1331 | 236 | 207 | ||
1332 | 237 | # FIXME: in_history is somewhat broken, | 208 | # FIXME: in_history is somewhat broken, |
1333 | 238 | # it will return non-history revisions in many | 209 | # it will return non-history revisions in many |
1334 | @@ -341,13 +312,6 @@ | |||
1335 | 341 | except rs_class.dwim_catchable_exceptions: | 312 | except rs_class.dwim_catchable_exceptions: |
1336 | 342 | pass | 313 | pass |
1337 | 343 | 314 | ||
1338 | 344 | # Try the old (deprecated) dwim list: | ||
1339 | 345 | for rs_class in dwim_revspecs: | ||
1340 | 346 | try: | ||
1341 | 347 | return self._try_spectype(rs_class, branch) | ||
1342 | 348 | except rs_class.dwim_catchable_exceptions: | ||
1343 | 349 | pass | ||
1344 | 350 | |||
1345 | 351 | # Well, I dunno what it is. Note that we don't try to keep track of the | 315 | # Well, I dunno what it is. Note that we don't try to keep track of the |
1346 | 352 | # first of last exception raised during the DWIM tries as none seems | 316 | # first of last exception raised during the DWIM tries as none seems |
1347 | 353 | # really relevant. | 317 | # really relevant. |
1348 | @@ -502,7 +466,9 @@ | |||
1349 | 502 | # self.spec comes straight from parsing the command line arguments, | 466 | # self.spec comes straight from parsing the command line arguments, |
1350 | 503 | # so we expect it to be a Unicode string. Switch it to the internal | 467 | # so we expect it to be a Unicode string. Switch it to the internal |
1351 | 504 | # representation. | 468 | # representation. |
1353 | 505 | return osutils.safe_revision_id(self.spec, warn=False) | 469 | if isinstance(self.spec, unicode): |
1354 | 470 | return cache_utf8.encode(self.spec) | ||
1355 | 471 | return self.spec | ||
1356 | 506 | 472 | ||
1357 | 507 | 473 | ||
1358 | 508 | 474 | ||
1359 | @@ -986,9 +952,6 @@ | |||
1360 | 986 | # The order in which we want to DWIM a revision spec without any prefix. | 952 | # The order in which we want to DWIM a revision spec without any prefix. |
1361 | 987 | # revno is always tried first and isn't listed here, this is used by | 953 | # revno is always tried first and isn't listed here, this is used by |
1362 | 988 | # RevisionSpec_dwim._match_on | 954 | # RevisionSpec_dwim._match_on |
1363 | 989 | dwim_revspecs = symbol_versioning.deprecated_list( | ||
1364 | 990 | symbol_versioning.deprecated_in((2, 4, 0)), "dwim_revspecs", []) | ||
1365 | 991 | |||
1366 | 992 | RevisionSpec_dwim.append_possible_revspec(RevisionSpec_tag) | 955 | RevisionSpec_dwim.append_possible_revspec(RevisionSpec_tag) |
1367 | 993 | RevisionSpec_dwim.append_possible_revspec(RevisionSpec_revid) | 956 | RevisionSpec_dwim.append_possible_revspec(RevisionSpec_revid) |
1368 | 994 | RevisionSpec_dwim.append_possible_revspec(RevisionSpec_date) | 957 | RevisionSpec_dwim.append_possible_revspec(RevisionSpec_date) |
1369 | 995 | 958 | ||
1370 | === modified file 'breezy/tag.py' | |||
1371 | --- breezy/tag.py 2017-05-22 00:56:52 +0000 | |||
1372 | +++ breezy/tag.py 2017-05-30 21:16:02 +0000 | |||
1373 | @@ -38,7 +38,6 @@ | |||
1374 | 38 | bencode, | 38 | bencode, |
1375 | 39 | cleanup, | 39 | cleanup, |
1376 | 40 | errors, | 40 | errors, |
1377 | 41 | symbol_versioning, | ||
1378 | 42 | trace, | 41 | trace, |
1379 | 43 | ) | 42 | ) |
1380 | 44 | """) | 43 | """) |
1381 | @@ -356,31 +355,6 @@ | |||
1382 | 356 | return result, updates, conflicts | 355 | return result, updates, conflicts |
1383 | 357 | 356 | ||
1384 | 358 | 357 | ||
1385 | 359 | def _merge_tags_if_possible(from_branch, to_branch, ignore_master=False): | ||
1386 | 360 | # Try hard to support merge_to implementations that don't expect | ||
1387 | 361 | # 'ignore_master' (new in bzr 2.3). First, if the flag isn't set then we | ||
1388 | 362 | # can safely avoid passing ignore_master at all. | ||
1389 | 363 | if not ignore_master: | ||
1390 | 364 | from_branch.tags.merge_to(to_branch.tags) | ||
1391 | 365 | return | ||
1392 | 366 | # If the flag is set, try to pass it, but be ready to catch TypeError. | ||
1393 | 367 | try: | ||
1394 | 368 | from_branch.tags.merge_to(to_branch.tags, ignore_master=ignore_master) | ||
1395 | 369 | except TypeError: | ||
1396 | 370 | # Probably this implementation of 'merge_to' is from a plugin that | ||
1397 | 371 | # doesn't expect the 'ignore_master' keyword argument (e.g. bzr-svn | ||
1398 | 372 | # 1.0.4). There's a small risk that the TypeError is actually caused | ||
1399 | 373 | # by a completely different problem (which is why we don't catch it for | ||
1400 | 374 | # the ignore_master=False case), but even then there's probably no harm | ||
1401 | 375 | # in calling a second time. | ||
1402 | 376 | symbol_versioning.warn( | ||
1403 | 377 | symbol_versioning.deprecated_in((2,3)) % ( | ||
1404 | 378 | "Tags.merge_to (of %r) that doesn't accept ignore_master kwarg" | ||
1405 | 379 | % (from_branch.tags,),), | ||
1406 | 380 | DeprecationWarning) | ||
1407 | 381 | from_branch.tags.merge_to(to_branch.tags) | ||
1408 | 382 | |||
1409 | 383 | |||
1410 | 384 | def sort_natural(branch, tags): | 358 | def sort_natural(branch, tags): |
1411 | 385 | """Sort tags, with numeric substrings as numbers. | 359 | """Sort tags, with numeric substrings as numbers. |
1412 | 386 | 360 | ||
1413 | 387 | 361 | ||
1414 | === modified file 'breezy/tests/__init__.py' | |||
1415 | --- breezy/tests/__init__.py 2017-05-24 16:33:08 +0000 | |||
1416 | +++ breezy/tests/__init__.py 2017-05-30 21:16:02 +0000 | |||
1417 | @@ -93,19 +93,10 @@ | |||
1418 | 93 | text_type, | 93 | text_type, |
1419 | 94 | ) | 94 | ) |
1420 | 95 | from ..smart import client, request | 95 | from ..smart import client, request |
1421 | 96 | from ..symbol_versioning import ( | ||
1422 | 97 | deprecated_function, | ||
1423 | 98 | deprecated_in, | ||
1424 | 99 | deprecated_method, | ||
1425 | 100 | ) | ||
1426 | 101 | from ..transport import ( | 96 | from ..transport import ( |
1427 | 102 | memory, | 97 | memory, |
1428 | 103 | pathfilter, | 98 | pathfilter, |
1429 | 104 | ) | 99 | ) |
1430 | 105 | from ..symbol_versioning import ( | ||
1431 | 106 | deprecated_function, | ||
1432 | 107 | deprecated_in, | ||
1433 | 108 | ) | ||
1434 | 109 | from ..tests import ( | 100 | from ..tests import ( |
1435 | 110 | fixtures, | 101 | fixtures, |
1436 | 111 | test_server, | 102 | test_server, |
1437 | @@ -899,7 +890,8 @@ | |||
1438 | 899 | 890 | ||
1439 | 900 | class StringIOWrapper(ui_testing.BytesIOWithEncoding): | 891 | class StringIOWrapper(ui_testing.BytesIOWithEncoding): |
1440 | 901 | 892 | ||
1442 | 902 | @deprecated_method(deprecated_in((3, 0))) | 893 | @symbol_versioning.deprecated_method( |
1443 | 894 | symbol_versioning.deprecated_in((3, 0))) | ||
1444 | 903 | def __init__(self, s=None): | 895 | def __init__(self, s=None): |
1445 | 904 | super(StringIOWrapper, self).__init__(s) | 896 | super(StringIOWrapper, self).__init__(s) |
1446 | 905 | 897 | ||
1447 | @@ -1556,10 +1548,6 @@ | |||
1448 | 1556 | else: | 1548 | else: |
1449 | 1557 | self.assertEqual(expected_docstring, obj.__doc__) | 1549 | self.assertEqual(expected_docstring, obj.__doc__) |
1450 | 1558 | 1550 | ||
1451 | 1559 | @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4))) | ||
1452 | 1560 | def failUnlessExists(self, path): | ||
1453 | 1561 | return self.assertPathExists(path) | ||
1454 | 1562 | |||
1455 | 1563 | def assertPathExists(self, path): | 1551 | def assertPathExists(self, path): |
1456 | 1564 | """Fail unless path or paths, which may be abs or relative, exist.""" | 1552 | """Fail unless path or paths, which may be abs or relative, exist.""" |
1457 | 1565 | if not isinstance(path, basestring): | 1553 | if not isinstance(path, basestring): |
1458 | @@ -1569,10 +1557,6 @@ | |||
1459 | 1569 | self.assertTrue(osutils.lexists(path), | 1557 | self.assertTrue(osutils.lexists(path), |
1460 | 1570 | path + " does not exist") | 1558 | path + " does not exist") |
1461 | 1571 | 1559 | ||
1462 | 1572 | @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4))) | ||
1463 | 1573 | def failIfExists(self, path): | ||
1464 | 1574 | return self.assertPathDoesNotExist(path) | ||
1465 | 1575 | |||
1466 | 1576 | def assertPathDoesNotExist(self, path): | 1560 | def assertPathDoesNotExist(self, path): |
1467 | 1577 | """Fail if path or paths, which may be abs or relative, exist.""" | 1561 | """Fail if path or paths, which may be abs or relative, exist.""" |
1468 | 1578 | if not isinstance(path, basestring): | 1562 | if not isinstance(path, basestring): |
1469 | @@ -4468,30 +4452,3 @@ | |||
1470 | 4468 | return result | 4452 | return result |
1471 | 4469 | except ImportError: | 4453 | except ImportError: |
1472 | 4470 | pass | 4454 | pass |
1473 | 4471 | |||
1474 | 4472 | |||
1475 | 4473 | # API compatibility for old plugins; see bug 892622. | ||
1476 | 4474 | for name in [ | ||
1477 | 4475 | 'Feature', | ||
1478 | 4476 | 'HTTPServerFeature', | ||
1479 | 4477 | 'ModuleAvailableFeature', | ||
1480 | 4478 | 'HTTPSServerFeature', 'SymlinkFeature', 'HardlinkFeature', | ||
1481 | 4479 | 'OsFifoFeature', 'UnicodeFilenameFeature', | ||
1482 | 4480 | 'ByteStringNamedFilesystem', 'UTF8Filesystem', | ||
1483 | 4481 | 'BreakinFeature', 'CaseInsCasePresFilenameFeature', | ||
1484 | 4482 | 'CaseInsensitiveFilesystemFeature', 'case_sensitive_filesystem_feature', | ||
1485 | 4483 | 'posix_permissions_feature', | ||
1486 | 4484 | ]: | ||
1487 | 4485 | globals()[name] = _CompatabilityThunkFeature( | ||
1488 | 4486 | symbol_versioning.deprecated_in((2, 5, 0)), | ||
1489 | 4487 | 'breezy.tests', name, | ||
1490 | 4488 | name, 'breezy.tests.features') | ||
1491 | 4489 | |||
1492 | 4490 | |||
1493 | 4491 | for (old_name, new_name) in [ | ||
1494 | 4492 | ('UnicodeFilename', 'UnicodeFilenameFeature'), | ||
1495 | 4493 | ]: | ||
1496 | 4494 | globals()[name] = _CompatabilityThunkFeature( | ||
1497 | 4495 | symbol_versioning.deprecated_in((2, 5, 0)), | ||
1498 | 4496 | 'breezy.tests', old_name, | ||
1499 | 4497 | new_name, 'breezy.tests.features') | ||
1500 | 4498 | 4455 | ||
1501 | === modified file 'breezy/tests/blackbox/__init__.py' | |||
1502 | --- breezy/tests/blackbox/__init__.py 2017-05-23 14:08:03 +0000 | |||
1503 | +++ breezy/tests/blackbox/__init__.py 2017-05-30 21:16:02 +0000 | |||
1504 | @@ -23,10 +23,6 @@ | |||
1505 | 23 | """ | 23 | """ |
1506 | 24 | 24 | ||
1507 | 25 | 25 | ||
1508 | 26 | from breezy.symbol_versioning import ( | ||
1509 | 27 | deprecated_in, | ||
1510 | 28 | deprecated_method, | ||
1511 | 29 | ) | ||
1512 | 30 | from breezy import tests | 26 | from breezy import tests |
1513 | 31 | 27 | ||
1514 | 32 | 28 | ||
1515 | @@ -144,11 +140,3 @@ | |||
1516 | 144 | class ExternalBase(tests.TestCaseWithTransport): | 140 | class ExternalBase(tests.TestCaseWithTransport): |
1517 | 145 | """Don't use this class anymore, use TestCaseWithTransport or similar""" | 141 | """Don't use this class anymore, use TestCaseWithTransport or similar""" |
1518 | 146 | 142 | ||
1519 | 147 | @deprecated_method(deprecated_in((2, 2, 0))) | ||
1520 | 148 | def check_output(self, output, *args): | ||
1521 | 149 | """Verify that the expected output matches what brz says. | ||
1522 | 150 | |||
1523 | 151 | The output is supplied first, so that you can supply a variable | ||
1524 | 152 | number of arguments to bzr. | ||
1525 | 153 | """ | ||
1526 | 154 | self.assertEqual(self.run_bzr(*args)[0], output) | ||
1527 | 155 | 143 | ||
1528 | === modified file 'breezy/tests/blackbox/test_log.py' | |||
1529 | --- breezy/tests/blackbox/test_log.py 2017-05-24 16:33:08 +0000 | |||
1530 | +++ breezy/tests/blackbox/test_log.py 2017-05-30 21:16:02 +0000 | |||
1531 | @@ -562,24 +562,6 @@ | |||
1532 | 562 | self.assertLogRevnos(['-n0'], ['2', '1.1.2', '1.2.1', '1.1.1', '1'], | 562 | self.assertLogRevnos(['-n0'], ['2', '1.1.2', '1.2.1', '1.1.1', '1'], |
1533 | 563 | working_dir='level0') | 563 | working_dir='level0') |
1534 | 564 | 564 | ||
1535 | 565 | def test_include_merges(self): | ||
1536 | 566 | # Confirm --include-merges gives the same output as -n0 | ||
1537 | 567 | msg = ("The option '--include-merges' to 'brz log' " | ||
1538 | 568 | "has been deprecated in brz 2.5. " | ||
1539 | 569 | "Please use '--include-merged' instead.\n") | ||
1540 | 570 | self.assertLogRevnos(['--include-merges'], | ||
1541 | 571 | ['2', '1.1.2', '1.2.1', '1.1.1', '1'], | ||
1542 | 572 | working_dir='level0', err=msg) | ||
1543 | 573 | self.assertLogRevnos(['--include-merges'], | ||
1544 | 574 | ['2', '1.1.2', '1.2.1', '1.1.1', '1'], | ||
1545 | 575 | working_dir='level0', err=msg) | ||
1546 | 576 | out_im, err_im = self.run_bzr('log --include-merges', | ||
1547 | 577 | working_dir='level0') | ||
1548 | 578 | out_n0, err_n0 = self.run_bzr('log -n0', working_dir='level0') | ||
1549 | 579 | self.assertEqual(msg, err_im) | ||
1550 | 580 | self.assertEqual('', err_n0) | ||
1551 | 581 | self.assertEqual(out_im, out_n0) | ||
1552 | 582 | |||
1553 | 583 | def test_include_merged(self): | 565 | def test_include_merged(self): |
1554 | 584 | # Confirm --include-merged gives the same output as -n0 | 566 | # Confirm --include-merged gives the same output as -n0 |
1555 | 585 | expected = ['2', '1.1.2', '1.2.1', '1.1.1', '1'] | 567 | expected = ['2', '1.1.2', '1.2.1', '1.1.1', '1'] |
1556 | 586 | 568 | ||
1557 | === modified file 'breezy/tests/per_branch/test_branch.py' | |||
1558 | --- breezy/tests/per_branch/test_branch.py 2017-05-21 18:10:28 +0000 | |||
1559 | +++ breezy/tests/per_branch/test_branch.py 2017-05-30 21:16:02 +0000 | |||
1560 | @@ -33,7 +33,6 @@ | |||
1561 | 33 | repository, | 33 | repository, |
1562 | 34 | revision, | 34 | revision, |
1563 | 35 | shelf, | 35 | shelf, |
1564 | 36 | symbol_versioning, | ||
1565 | 37 | tests, | 36 | tests, |
1566 | 38 | ) | 37 | ) |
1567 | 39 | from breezy.tests import ( | 38 | from breezy.tests import ( |
1568 | @@ -107,24 +106,6 @@ | |||
1569 | 107 | self.addCleanup(tree.unlock) | 106 | self.addCleanup(tree.unlock) |
1570 | 108 | self.assertEqual(tree.get_file_text('foo-id'), 'hello') | 107 | self.assertEqual(tree.get_file_text('foo-id'), 'hello') |
1571 | 109 | 108 | ||
1572 | 110 | def test_get_revision_delta(self): | ||
1573 | 111 | tree_a = self.make_branch_and_tree('a') | ||
1574 | 112 | self.build_tree(['a/foo']) | ||
1575 | 113 | tree_a.add('foo', 'file1') | ||
1576 | 114 | tree_a.commit('rev1', rev_id='rev1') | ||
1577 | 115 | self.build_tree(['a/vla']) | ||
1578 | 116 | tree_a.add('vla', 'file2') | ||
1579 | 117 | tree_a.commit('rev2', rev_id='rev2') | ||
1580 | 118 | |||
1581 | 119 | delta = self.applyDeprecated(symbol_versioning.deprecated_in( | ||
1582 | 120 | (2, 5, 0)), tree_a.branch.get_revision_delta, 1) | ||
1583 | 121 | self.assertIsInstance(delta, _mod_delta.TreeDelta) | ||
1584 | 122 | self.assertEqual([('foo', 'file1', 'file')], delta.added) | ||
1585 | 123 | delta = self.applyDeprecated(symbol_versioning.deprecated_in( | ||
1586 | 124 | (2, 5, 0)), tree_a.branch.get_revision_delta, 2) | ||
1587 | 125 | self.assertIsInstance(delta, _mod_delta.TreeDelta) | ||
1588 | 126 | self.assertEqual([('vla', 'file2', 'file')], delta.added) | ||
1589 | 127 | |||
1590 | 128 | def get_unbalanced_tree_pair(self): | 109 | def get_unbalanced_tree_pair(self): |
1591 | 129 | """Return two branches, a and b, with one file in a.""" | 110 | """Return two branches, a and b, with one file in a.""" |
1592 | 130 | tree_a = self.make_branch_and_tree('a') | 111 | tree_a = self.make_branch_and_tree('a') |
1593 | 131 | 112 | ||
1594 | === modified file 'breezy/tests/per_branch/test_check.py' | |||
1595 | --- breezy/tests/per_branch/test_check.py 2017-05-22 00:56:52 +0000 | |||
1596 | +++ breezy/tests/per_branch/test_check.py 2017-05-30 21:16:02 +0000 | |||
1597 | @@ -25,7 +25,6 @@ | |||
1598 | 25 | from ...sixish import ( | 25 | from ...sixish import ( |
1599 | 26 | BytesIO, | 26 | BytesIO, |
1600 | 27 | ) | 27 | ) |
1601 | 28 | from ...symbol_versioning import deprecated_in | ||
1602 | 29 | from . import TestCaseWithBranch | 28 | from . import TestCaseWithBranch |
1603 | 30 | 29 | ||
1604 | 31 | 30 | ||
1605 | 32 | 31 | ||
1606 | === modified file 'breezy/tests/per_branch/test_get_revision_id_to_revno_map.py' | |||
1607 | --- breezy/tests/per_branch/test_get_revision_id_to_revno_map.py 2017-05-21 18:10:28 +0000 | |||
1608 | +++ breezy/tests/per_branch/test_get_revision_id_to_revno_map.py 2017-05-30 21:16:02 +0000 | |||
1609 | @@ -16,7 +16,6 @@ | |||
1610 | 16 | 16 | ||
1611 | 17 | """Tests for Branch.get_revision_id_to_revno_map()""" | 17 | """Tests for Branch.get_revision_id_to_revno_map()""" |
1612 | 18 | 18 | ||
1613 | 19 | from breezy.symbol_versioning import deprecated_in | ||
1614 | 20 | from breezy.tests.per_branch import TestCaseWithBranch | 19 | from breezy.tests.per_branch import TestCaseWithBranch |
1615 | 21 | 20 | ||
1616 | 22 | 21 | ||
1617 | 23 | 22 | ||
1618 | === modified file 'breezy/tests/per_branch/test_hooks.py' | |||
1619 | --- breezy/tests/per_branch/test_hooks.py 2017-05-21 18:10:28 +0000 | |||
1620 | +++ breezy/tests/per_branch/test_hooks.py 2017-05-30 21:16:02 +0000 | |||
1621 | @@ -23,7 +23,6 @@ | |||
1622 | 23 | revision, | 23 | revision, |
1623 | 24 | tests, | 24 | tests, |
1624 | 25 | ) | 25 | ) |
1625 | 26 | from breezy.symbol_versioning import deprecated_in | ||
1626 | 27 | from breezy.tests import test_server | 26 | from breezy.tests import test_server |
1627 | 28 | 27 | ||
1628 | 29 | class ChangeBranchTipTestCase(tests.TestCaseWithMemoryTransport): | 28 | class ChangeBranchTipTestCase(tests.TestCaseWithMemoryTransport): |
1629 | 30 | 29 | ||
1630 | === modified file 'breezy/tests/per_branch/test_push.py' | |||
1631 | --- breezy/tests/per_branch/test_push.py 2017-05-22 00:56:52 +0000 | |||
1632 | +++ breezy/tests/per_branch/test_push.py 2017-05-30 21:16:02 +0000 | |||
1633 | @@ -27,7 +27,6 @@ | |||
1634 | 27 | memorytree, | 27 | memorytree, |
1635 | 28 | push, | 28 | push, |
1636 | 29 | revision, | 29 | revision, |
1637 | 30 | symbol_versioning, | ||
1638 | 31 | tests, | 30 | tests, |
1639 | 32 | transport, | 31 | transport, |
1640 | 33 | ) | 32 | ) |
1641 | 34 | 33 | ||
1642 | === modified file 'breezy/tests/per_interbranch/test_push.py' | |||
1643 | --- breezy/tests/per_interbranch/test_push.py 2017-05-22 00:56:52 +0000 | |||
1644 | +++ breezy/tests/per_interbranch/test_push.py 2017-05-30 21:16:02 +0000 | |||
1645 | @@ -27,7 +27,6 @@ | |||
1646 | 27 | controldir, | 27 | controldir, |
1647 | 28 | errors, | 28 | errors, |
1648 | 29 | push, | 29 | push, |
1649 | 30 | symbol_versioning, | ||
1650 | 31 | tests, | 30 | tests, |
1651 | 32 | vf_repository, | 31 | vf_repository, |
1652 | 33 | ) | 32 | ) |
1653 | 34 | 33 | ||
1654 | === modified file 'breezy/tests/per_interrepository/test_interrepository.py' | |||
1655 | --- breezy/tests/per_interrepository/test_interrepository.py 2017-05-22 00:56:52 +0000 | |||
1656 | +++ breezy/tests/per_interrepository/test_interrepository.py 2017-05-30 21:16:02 +0000 | |||
1657 | @@ -112,12 +112,6 @@ | |||
1658 | 112 | self.assertRaises(errors.NoSuchRevision, | 112 | self.assertRaises(errors.NoSuchRevision, |
1659 | 113 | repo_b.search_missing_revision_ids, repo_a, revision_ids=['pizza'], | 113 | repo_b.search_missing_revision_ids, repo_a, revision_ids=['pizza'], |
1660 | 114 | find_ghosts=False) | 114 | find_ghosts=False) |
1661 | 115 | self.callDeprecated( | ||
1662 | 116 | ['search_missing_revision_ids(revision_id=...) was deprecated in ' | ||
1663 | 117 | '2.4. Use revision_ids=[...] instead.'], | ||
1664 | 118 | self.assertRaises, errors.NoSuchRevision, | ||
1665 | 119 | repo_b.search_missing_revision_ids, repo_a, revision_id='pizza', | ||
1666 | 120 | find_ghosts=False) | ||
1667 | 121 | 115 | ||
1668 | 122 | def test_search_missing_revision_ids_revision_limited(self): | 116 | def test_search_missing_revision_ids_revision_limited(self): |
1669 | 123 | # revision ids in repository A that are not referenced by the | 117 | # revision ids in repository A that are not referenced by the |
1670 | 124 | 118 | ||
1671 | === modified file 'breezy/tests/per_inventory/basics.py' | |||
1672 | --- breezy/tests/per_inventory/basics.py 2017-05-21 18:10:28 +0000 | |||
1673 | +++ breezy/tests/per_inventory/basics.py 2017-05-30 21:16:02 +0000 | |||
1674 | @@ -35,10 +35,6 @@ | |||
1675 | 35 | 35 | ||
1676 | 36 | from breezy.tests.per_inventory import TestCaseWithInventory | 36 | from breezy.tests.per_inventory import TestCaseWithInventory |
1677 | 37 | 37 | ||
1678 | 38 | from breezy.symbol_versioning import ( | ||
1679 | 39 | deprecated_in, | ||
1680 | 40 | ) | ||
1681 | 41 | |||
1682 | 42 | 38 | ||
1683 | 43 | class TestInventory(TestCaseWithInventory): | 39 | class TestInventory(TestCaseWithInventory): |
1684 | 44 | 40 | ||
1685 | 45 | 41 | ||
1686 | === modified file 'breezy/tests/per_repository/test_repository.py' | |||
1687 | --- breezy/tests/per_repository/test_repository.py 2017-05-24 16:21:50 +0000 | |||
1688 | +++ breezy/tests/per_repository/test_repository.py 2017-05-30 21:16:02 +0000 | |||
1689 | @@ -258,14 +258,7 @@ | |||
1690 | 258 | list(tree.list_files(include_root=True))) | 258 | list(tree.list_files(include_root=True))) |
1691 | 259 | finally: | 259 | finally: |
1692 | 260 | tree.unlock() | 260 | tree.unlock() |
1701 | 261 | tree = self.callDeprecated(['NULL_REVISION should be used for the null' | 261 | self.assertRaises(ValueError, wt.branch.repository.revision_tree, None) |
1694 | 262 | ' revision instead of None, as of bzr 0.91.'], | ||
1695 | 263 | wt.branch.repository.revision_tree, None) | ||
1696 | 264 | tree.lock_read() | ||
1697 | 265 | try: | ||
1698 | 266 | self.assertEqual([], list(tree.list_files(include_root=True))) | ||
1699 | 267 | finally: | ||
1700 | 268 | tree.unlock() | ||
1702 | 269 | tree = wt.branch.repository.revision_tree(_mod_revision.NULL_REVISION) | 262 | tree = wt.branch.repository.revision_tree(_mod_revision.NULL_REVISION) |
1703 | 270 | tree.lock_read() | 263 | tree.lock_read() |
1704 | 271 | try: | 264 | try: |
1705 | 272 | 265 | ||
1706 | === modified file 'breezy/tests/per_repository_vf/test_repository.py' | |||
1707 | --- breezy/tests/per_repository_vf/test_repository.py 2017-05-22 00:56:52 +0000 | |||
1708 | +++ breezy/tests/per_repository_vf/test_repository.py 2017-05-30 21:16:02 +0000 | |||
1709 | @@ -27,7 +27,6 @@ | |||
1710 | 27 | vf_repository, | 27 | vf_repository, |
1711 | 28 | ) | 28 | ) |
1712 | 29 | 29 | ||
1713 | 30 | from breezy.symbol_versioning import deprecated_in | ||
1714 | 31 | from breezy.tests.matchers import MatchesAncestry | 30 | from breezy.tests.matchers import MatchesAncestry |
1715 | 32 | from breezy.tests.per_repository_vf import ( | 31 | from breezy.tests.per_repository_vf import ( |
1716 | 33 | TestCaseWithRepository, | 32 | TestCaseWithRepository, |
1717 | 34 | 33 | ||
1718 | === modified file 'breezy/tests/per_tree/test_tree.py' | |||
1719 | --- breezy/tests/per_tree/test_tree.py 2017-05-22 00:56:52 +0000 | |||
1720 | +++ breezy/tests/per_tree/test_tree.py 2017-05-30 21:16:02 +0000 | |||
1721 | @@ -24,9 +24,6 @@ | |||
1722 | 24 | ) | 24 | ) |
1723 | 25 | from breezy.tests import TestSkipped | 25 | from breezy.tests import TestSkipped |
1724 | 26 | from breezy.tests.per_tree import TestCaseWithTree | 26 | from breezy.tests.per_tree import TestCaseWithTree |
1725 | 27 | from breezy.symbol_versioning import ( | ||
1726 | 28 | deprecated_in, | ||
1727 | 29 | ) | ||
1728 | 30 | 27 | ||
1729 | 31 | 28 | ||
1730 | 32 | class TestAnnotate(TestCaseWithTree): | 29 | class TestAnnotate(TestCaseWithTree): |
1731 | @@ -284,22 +281,6 @@ | |||
1732 | 284 | self.assertTrue(tree.has_id('file-id')) | 281 | self.assertTrue(tree.has_id('file-id')) |
1733 | 285 | self.assertFalse(tree.has_id('dir-id')) | 282 | self.assertFalse(tree.has_id('dir-id')) |
1734 | 286 | 283 | ||
1735 | 287 | def test___contains__(self): | ||
1736 | 288 | work_tree = self.make_branch_and_tree('tree') | ||
1737 | 289 | self.build_tree(['tree/file']) | ||
1738 | 290 | work_tree.add('file', 'file-id') | ||
1739 | 291 | tree = self._convert_tree(work_tree) | ||
1740 | 292 | tree.lock_read() | ||
1741 | 293 | self.addCleanup(tree.unlock) | ||
1742 | 294 | self.assertTrue( | ||
1743 | 295 | self.applyDeprecated( | ||
1744 | 296 | deprecated_in((2, 4, 0)), | ||
1745 | 297 | tree.__contains__, 'file-id')) | ||
1746 | 298 | self.assertFalse( | ||
1747 | 299 | self.applyDeprecated( | ||
1748 | 300 | deprecated_in((2, 4, 0)), | ||
1749 | 301 | tree.__contains__, 'dir-id')) | ||
1750 | 302 | |||
1751 | 303 | 284 | ||
1752 | 304 | class TestExtras(TestCaseWithTree): | 285 | class TestExtras(TestCaseWithTree): |
1753 | 305 | 286 | ||
1754 | 306 | 287 | ||
1755 | === modified file 'breezy/tests/per_workingtree/test_workingtree.py' | |||
1756 | --- breezy/tests/per_workingtree/test_workingtree.py 2017-05-22 00:56:52 +0000 | |||
1757 | +++ breezy/tests/per_workingtree/test_workingtree.py 2017-05-30 21:16:02 +0000 | |||
1758 | @@ -27,7 +27,6 @@ | |||
1759 | 27 | errors, | 27 | errors, |
1760 | 28 | osutils, | 28 | osutils, |
1761 | 29 | revision as _mod_revision, | 29 | revision as _mod_revision, |
1762 | 30 | symbol_versioning, | ||
1763 | 31 | tests, | 30 | tests, |
1764 | 32 | trace, | 31 | trace, |
1765 | 33 | urlutils, | 32 | urlutils, |
1766 | 34 | 33 | ||
1767 | === modified file 'breezy/tests/test_annotate.py' | |||
1768 | --- breezy/tests/test_annotate.py 2017-05-22 00:56:52 +0000 | |||
1769 | +++ breezy/tests/test_annotate.py 2017-05-30 21:16:02 +0000 | |||
1770 | @@ -20,7 +20,6 @@ | |||
1771 | 20 | 20 | ||
1772 | 21 | from .. import ( | 21 | from .. import ( |
1773 | 22 | annotate, | 22 | annotate, |
1774 | 23 | symbol_versioning, | ||
1775 | 24 | tests, | 23 | tests, |
1776 | 25 | ) | 24 | ) |
1777 | 26 | from ..sixish import ( | 25 | from ..sixish import ( |
1778 | 27 | 26 | ||
1779 | === modified file 'breezy/tests/test_atomicfile.py' | |||
1780 | --- breezy/tests/test_atomicfile.py 2017-05-22 00:56:52 +0000 | |||
1781 | +++ breezy/tests/test_atomicfile.py 2017-05-30 21:16:02 +0000 | |||
1782 | @@ -24,7 +24,6 @@ | |||
1783 | 24 | atomicfile, | 24 | atomicfile, |
1784 | 25 | errors, | 25 | errors, |
1785 | 26 | osutils, | 26 | osutils, |
1786 | 27 | symbol_versioning, | ||
1787 | 28 | ) | 27 | ) |
1788 | 29 | from . import TestCaseInTempDir, TestSkipped | 28 | from . import TestCaseInTempDir, TestSkipped |
1789 | 30 | 29 | ||
1790 | 31 | 30 | ||
1791 | === modified file 'breezy/tests/test_commit.py' | |||
1792 | --- breezy/tests/test_commit.py 2017-05-22 00:56:52 +0000 | |||
1793 | +++ breezy/tests/test_commit.py 2017-05-30 21:16:02 +0000 | |||
1794 | @@ -790,13 +790,13 @@ | |||
1795 | 790 | self.assertFalse('authors' in rev.properties) | 790 | self.assertFalse('authors' in rev.properties) |
1796 | 791 | 791 | ||
1797 | 792 | def test_commit_author(self): | 792 | def test_commit_author(self): |
1799 | 793 | """Passing a non-empty author kwarg to MutableTree.commit should add | 793 | """Passing a non-empty authors kwarg to MutableTree.commit should add |
1800 | 794 | the 'author' revision property. | 794 | the 'author' revision property. |
1801 | 795 | """ | 795 | """ |
1802 | 796 | tree = self.make_branch_and_tree('foo') | 796 | tree = self.make_branch_and_tree('foo') |
1806 | 797 | rev_id = self.callDeprecated(['The parameter author was ' | 797 | rev_id = tree.commit( |
1807 | 798 | 'deprecated in version 1.13. Use authors instead'], | 798 | 'commit 1', |
1808 | 799 | tree.commit, 'commit 1', author='John Doe <jdoe@example.com>') | 799 | authors=['John Doe <jdoe@example.com>']) |
1809 | 800 | rev = tree.branch.repository.get_revision(rev_id) | 800 | rev = tree.branch.repository.get_revision(rev_id) |
1810 | 801 | self.assertEqual('John Doe <jdoe@example.com>', | 801 | self.assertEqual('John Doe <jdoe@example.com>', |
1811 | 802 | rev.properties['authors']) | 802 | rev.properties['authors']) |
1812 | @@ -820,13 +820,6 @@ | |||
1813 | 820 | 'Jane Rey <jrey@example.com>', rev.properties['authors']) | 820 | 'Jane Rey <jrey@example.com>', rev.properties['authors']) |
1814 | 821 | self.assertFalse('author' in rev.properties) | 821 | self.assertFalse('author' in rev.properties) |
1815 | 822 | 822 | ||
1816 | 823 | def test_author_and_authors_incompatible(self): | ||
1817 | 824 | tree = self.make_branch_and_tree('foo') | ||
1818 | 825 | self.assertRaises(AssertionError, tree.commit, 'commit 1', | ||
1819 | 826 | authors=['John Doe <jdoe@example.com>', | ||
1820 | 827 | 'Jane Rey <jrey@example.com>'], | ||
1821 | 828 | author="Jack Me <jme@example.com>") | ||
1822 | 829 | |||
1823 | 830 | def test_author_with_newline_rejected(self): | 823 | def test_author_with_newline_rejected(self): |
1824 | 831 | tree = self.make_branch_and_tree('foo') | 824 | tree = self.make_branch_and_tree('foo') |
1825 | 832 | self.assertRaises(AssertionError, tree.commit, 'commit 1', | 825 | self.assertRaises(AssertionError, tree.commit, 'commit 1', |
1826 | 833 | 826 | ||
1827 | === modified file 'breezy/tests/test_config.py' | |||
1828 | --- breezy/tests/test_config.py 2017-05-22 00:56:52 +0000 | |||
1829 | +++ breezy/tests/test_config.py 2017-05-30 21:16:02 +0000 | |||
1830 | @@ -42,9 +42,6 @@ | |||
1831 | 42 | from ..sixish import ( | 42 | from ..sixish import ( |
1832 | 43 | BytesIO, | 43 | BytesIO, |
1833 | 44 | ) | 44 | ) |
1834 | 45 | from ..symbol_versioning import ( | ||
1835 | 46 | deprecated_in, | ||
1836 | 47 | ) | ||
1837 | 48 | from ..transport import remote as transport_remote | 45 | from ..transport import remote as transport_remote |
1838 | 49 | from . import ( | 46 | from . import ( |
1839 | 50 | features, | 47 | features, |
1840 | @@ -488,60 +485,10 @@ | |||
1841 | 488 | my_config.username()) | 485 | my_config.username()) |
1842 | 489 | self.assertEqual(['_get_user_id'], my_config._calls) | 486 | self.assertEqual(['_get_user_id'], my_config._calls) |
1843 | 490 | 487 | ||
1844 | 491 | def test_signatures_default(self): | ||
1845 | 492 | my_config = config.Config() | ||
1846 | 493 | self.assertFalse( | ||
1847 | 494 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1848 | 495 | my_config.signature_needed)) | ||
1849 | 496 | self.assertEqual(config.CHECK_IF_POSSIBLE, | ||
1850 | 497 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1851 | 498 | my_config.signature_checking)) | ||
1852 | 499 | self.assertEqual(config.SIGN_WHEN_REQUIRED, | ||
1853 | 500 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1854 | 501 | my_config.signing_policy)) | ||
1855 | 502 | |||
1856 | 503 | def test_signatures_template_method(self): | ||
1857 | 504 | my_config = InstrumentedConfig() | ||
1858 | 505 | self.assertEqual(config.CHECK_NEVER, | ||
1859 | 506 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1860 | 507 | my_config.signature_checking)) | ||
1861 | 508 | self.assertEqual(['_get_signature_checking'], my_config._calls) | ||
1862 | 509 | |||
1863 | 510 | def test_signatures_template_method_none(self): | ||
1864 | 511 | my_config = InstrumentedConfig() | ||
1865 | 512 | my_config._signatures = None | ||
1866 | 513 | self.assertEqual(config.CHECK_IF_POSSIBLE, | ||
1867 | 514 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1868 | 515 | my_config.signature_checking)) | ||
1869 | 516 | self.assertEqual(['_get_signature_checking'], my_config._calls) | ||
1870 | 517 | |||
1871 | 518 | def test_gpg_signing_command_default(self): | ||
1872 | 519 | my_config = config.Config() | ||
1873 | 520 | self.assertEqual('gpg', | ||
1874 | 521 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1875 | 522 | my_config.gpg_signing_command)) | ||
1876 | 523 | |||
1877 | 524 | def test_get_user_option_default(self): | 488 | def test_get_user_option_default(self): |
1878 | 525 | my_config = config.Config() | 489 | my_config = config.Config() |
1879 | 526 | self.assertEqual(None, my_config.get_user_option('no_option')) | 490 | self.assertEqual(None, my_config.get_user_option('no_option')) |
1880 | 527 | 491 | ||
1881 | 528 | def test_post_commit_default(self): | ||
1882 | 529 | my_config = config.Config() | ||
1883 | 530 | self.assertEqual(None, self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1884 | 531 | my_config.post_commit)) | ||
1885 | 532 | |||
1886 | 533 | |||
1887 | 534 | def test_log_format_default(self): | ||
1888 | 535 | my_config = config.Config() | ||
1889 | 536 | self.assertEqual('long', | ||
1890 | 537 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1891 | 538 | my_config.log_format)) | ||
1892 | 539 | |||
1893 | 540 | def test_acceptable_keys_default(self): | ||
1894 | 541 | my_config = config.Config() | ||
1895 | 542 | self.assertEqual(None, self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1896 | 543 | my_config.acceptable_keys)) | ||
1897 | 544 | |||
1898 | 545 | def test_validate_signatures_in_log_default(self): | 492 | def test_validate_signatures_in_log_default(self): |
1899 | 546 | my_config = config.Config() | 493 | my_config = config.Config() |
1900 | 547 | self.assertEqual(False, my_config.validate_signatures_in_log()) | 494 | self.assertEqual(False, my_config.validate_signatures_in_log()) |
1901 | @@ -656,21 +603,6 @@ | |||
1902 | 656 | self.assertTrue(isinstance(self.uid, int)) | 603 | self.assertTrue(isinstance(self.uid, int)) |
1903 | 657 | self.assertTrue(isinstance(self.gid, int)) | 604 | self.assertTrue(isinstance(self.gid, int)) |
1904 | 658 | 605 | ||
1905 | 659 | def test_get_filename_parameter_is_deprecated_(self): | ||
1906 | 660 | conf = self.callDeprecated([ | ||
1907 | 661 | 'IniBasedConfig.__init__(get_filename) was deprecated in 2.3.' | ||
1908 | 662 | ' Use file_name instead.'], | ||
1909 | 663 | config.IniBasedConfig, lambda: 'ini.conf') | ||
1910 | 664 | self.assertEqual('ini.conf', conf.file_name) | ||
1911 | 665 | |||
1912 | 666 | def test_get_parser_file_parameter_is_deprecated_(self): | ||
1913 | 667 | config_file = BytesIO(sample_config_text.encode('utf-8')) | ||
1914 | 668 | conf = config.IniBasedConfig.from_string(sample_config_text) | ||
1915 | 669 | conf = self.callDeprecated([ | ||
1916 | 670 | 'IniBasedConfig._get_parser(file=xxx) was deprecated in 2.3.' | ||
1917 | 671 | ' Use IniBasedConfig(_content=xxx) instead.'], | ||
1918 | 672 | conf._get_parser, file=config_file) | ||
1919 | 673 | |||
1920 | 674 | 606 | ||
1921 | 675 | class TestIniConfigSaving(tests.TestCaseInTempDir): | 607 | class TestIniConfigSaving(tests.TestCaseInTempDir): |
1922 | 676 | 608 | ||
1923 | @@ -1004,30 +936,6 @@ | |||
1924 | 1004 | # automatically cast to list | 936 | # automatically cast to list |
1925 | 1005 | self.assertEqual(['x'], get_list('one_item')) | 937 | self.assertEqual(['x'], get_list('one_item')) |
1926 | 1006 | 938 | ||
1927 | 1007 | def test_get_user_option_as_int_from_SI(self): | ||
1928 | 1008 | conf, parser = self.make_config_parser(""" | ||
1929 | 1009 | plain = 100 | ||
1930 | 1010 | si_k = 5k, | ||
1931 | 1011 | si_kb = 5kb, | ||
1932 | 1012 | si_m = 5M, | ||
1933 | 1013 | si_mb = 5MB, | ||
1934 | 1014 | si_g = 5g, | ||
1935 | 1015 | si_gb = 5gB, | ||
1936 | 1016 | """) | ||
1937 | 1017 | def get_si(s, default=None): | ||
1938 | 1018 | return self.applyDeprecated( | ||
1939 | 1019 | deprecated_in((2, 5, 0)), | ||
1940 | 1020 | conf.get_user_option_as_int_from_SI, s, default) | ||
1941 | 1021 | self.assertEqual(100, get_si('plain')) | ||
1942 | 1022 | self.assertEqual(5000, get_si('si_k')) | ||
1943 | 1023 | self.assertEqual(5000, get_si('si_kb')) | ||
1944 | 1024 | self.assertEqual(5000000, get_si('si_m')) | ||
1945 | 1025 | self.assertEqual(5000000, get_si('si_mb')) | ||
1946 | 1026 | self.assertEqual(5000000000, get_si('si_g')) | ||
1947 | 1027 | self.assertEqual(5000000000, get_si('si_gb')) | ||
1948 | 1028 | self.assertEqual(None, get_si('non-exist')) | ||
1949 | 1029 | self.assertEqual(42, get_si('non-exist-with-default', 42)) | ||
1950 | 1030 | |||
1951 | 1031 | 939 | ||
1952 | 1032 | class TestSupressWarning(TestIniConfig): | 940 | class TestSupressWarning(TestIniConfig): |
1953 | 1033 | 941 | ||
1954 | @@ -1181,6 +1089,14 @@ | |||
1955 | 1181 | 1089 | ||
1956 | 1182 | class TestGlobalConfigItems(tests.TestCaseInTempDir): | 1090 | class TestGlobalConfigItems(tests.TestCaseInTempDir): |
1957 | 1183 | 1091 | ||
1958 | 1092 | def _get_empty_config(self): | ||
1959 | 1093 | my_config = config.GlobalConfig() | ||
1960 | 1094 | return my_config | ||
1961 | 1095 | |||
1962 | 1096 | def _get_sample_config(self): | ||
1963 | 1097 | my_config = config.GlobalConfig.from_string(sample_config_text) | ||
1964 | 1098 | return my_config | ||
1965 | 1099 | |||
1966 | 1184 | def test_user_id(self): | 1100 | def test_user_id(self): |
1967 | 1185 | my_config = config.GlobalConfig.from_string(sample_config_text) | 1101 | my_config = config.GlobalConfig.from_string(sample_config_text) |
1968 | 1186 | self.assertEqual(u"Erik B\u00e5gfors <erik@bagfors.nu>", | 1102 | self.assertEqual(u"Erik B\u00e5gfors <erik@bagfors.nu>", |
1969 | @@ -1190,68 +1106,6 @@ | |||
1970 | 1190 | my_config = config.GlobalConfig() | 1106 | my_config = config.GlobalConfig() |
1971 | 1191 | self.assertEqual(None, my_config._get_user_id()) | 1107 | self.assertEqual(None, my_config._get_user_id()) |
1972 | 1192 | 1108 | ||
1973 | 1193 | def test_signatures_always(self): | ||
1974 | 1194 | my_config = config.GlobalConfig.from_string(sample_always_signatures) | ||
1975 | 1195 | self.assertEqual(config.CHECK_NEVER, | ||
1976 | 1196 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1977 | 1197 | my_config.signature_checking)) | ||
1978 | 1198 | self.assertEqual(config.SIGN_ALWAYS, | ||
1979 | 1199 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1980 | 1200 | my_config.signing_policy)) | ||
1981 | 1201 | self.assertEqual(True, | ||
1982 | 1202 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1983 | 1203 | my_config.signature_needed)) | ||
1984 | 1204 | |||
1985 | 1205 | def test_signatures_if_possible(self): | ||
1986 | 1206 | my_config = config.GlobalConfig.from_string(sample_maybe_signatures) | ||
1987 | 1207 | self.assertEqual(config.CHECK_NEVER, | ||
1988 | 1208 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1989 | 1209 | my_config.signature_checking)) | ||
1990 | 1210 | self.assertEqual(config.SIGN_WHEN_REQUIRED, | ||
1991 | 1211 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1992 | 1212 | my_config.signing_policy)) | ||
1993 | 1213 | self.assertEqual(False, self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
1994 | 1214 | my_config.signature_needed)) | ||
1995 | 1215 | |||
1996 | 1216 | def test_signatures_ignore(self): | ||
1997 | 1217 | my_config = config.GlobalConfig.from_string(sample_ignore_signatures) | ||
1998 | 1218 | self.assertEqual(config.CHECK_ALWAYS, | ||
1999 | 1219 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2000 | 1220 | my_config.signature_checking)) | ||
2001 | 1221 | self.assertEqual(config.SIGN_NEVER, | ||
2002 | 1222 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2003 | 1223 | my_config.signing_policy)) | ||
2004 | 1224 | self.assertEqual(False, self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2005 | 1225 | my_config.signature_needed)) | ||
2006 | 1226 | |||
2007 | 1227 | def _get_sample_config(self): | ||
2008 | 1228 | my_config = config.GlobalConfig.from_string(sample_config_text) | ||
2009 | 1229 | return my_config | ||
2010 | 1230 | |||
2011 | 1231 | def test_gpg_signing_command(self): | ||
2012 | 1232 | my_config = self._get_sample_config() | ||
2013 | 1233 | self.assertEqual("gnome-gpg", | ||
2014 | 1234 | self.applyDeprecated( | ||
2015 | 1235 | deprecated_in((2, 5, 0)), my_config.gpg_signing_command)) | ||
2016 | 1236 | self.assertEqual(False, self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2017 | 1237 | my_config.signature_needed)) | ||
2018 | 1238 | |||
2019 | 1239 | def test_gpg_signing_key(self): | ||
2020 | 1240 | my_config = self._get_sample_config() | ||
2021 | 1241 | self.assertEqual("DD4D5088", | ||
2022 | 1242 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2023 | 1243 | my_config.gpg_signing_key)) | ||
2024 | 1244 | |||
2025 | 1245 | def _get_empty_config(self): | ||
2026 | 1246 | my_config = config.GlobalConfig() | ||
2027 | 1247 | return my_config | ||
2028 | 1248 | |||
2029 | 1249 | def test_gpg_signing_command_unset(self): | ||
2030 | 1250 | my_config = self._get_empty_config() | ||
2031 | 1251 | self.assertEqual("gpg", | ||
2032 | 1252 | self.applyDeprecated( | ||
2033 | 1253 | deprecated_in((2, 5, 0)), my_config.gpg_signing_command)) | ||
2034 | 1254 | |||
2035 | 1255 | def test_get_user_option_default(self): | 1109 | def test_get_user_option_default(self): |
2036 | 1256 | my_config = self._get_empty_config() | 1110 | my_config = self._get_empty_config() |
2037 | 1257 | self.assertEqual(None, my_config.get_user_option('no_option')) | 1111 | self.assertEqual(None, my_config.get_user_option('no_option')) |
2038 | @@ -1261,24 +1115,6 @@ | |||
2039 | 1261 | self.assertEqual("something", | 1115 | self.assertEqual("something", |
2040 | 1262 | my_config.get_user_option('user_global_option')) | 1116 | my_config.get_user_option('user_global_option')) |
2041 | 1263 | 1117 | ||
2042 | 1264 | def test_post_commit_default(self): | ||
2043 | 1265 | my_config = self._get_sample_config() | ||
2044 | 1266 | self.assertEqual(None, | ||
2045 | 1267 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2046 | 1268 | my_config.post_commit)) | ||
2047 | 1269 | |||
2048 | 1270 | def test_configured_logformat(self): | ||
2049 | 1271 | my_config = self._get_sample_config() | ||
2050 | 1272 | self.assertEqual("short", | ||
2051 | 1273 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2052 | 1274 | my_config.log_format)) | ||
2053 | 1275 | |||
2054 | 1276 | def test_configured_acceptable_keys(self): | ||
2055 | 1277 | my_config = self._get_sample_config() | ||
2056 | 1278 | self.assertEqual("amy", | ||
2057 | 1279 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2058 | 1280 | my_config.acceptable_keys)) | ||
2059 | 1281 | |||
2060 | 1282 | def test_configured_validate_signatures_in_log(self): | 1118 | def test_configured_validate_signatures_in_log(self): |
2061 | 1283 | my_config = self._get_sample_config() | 1119 | my_config = self._get_sample_config() |
2062 | 1284 | self.assertEqual(True, my_config.validate_signatures_in_log()) | 1120 | self.assertEqual(True, my_config.validate_signatures_in_log()) |
2063 | @@ -1517,57 +1353,6 @@ | |||
2064 | 1517 | self.assertEqual('Robert Collins <robertc@example.org>', | 1353 | self.assertEqual('Robert Collins <robertc@example.org>', |
2065 | 1518 | self.my_config.username()) | 1354 | self.my_config.username()) |
2066 | 1519 | 1355 | ||
2067 | 1520 | def test_signatures_not_set(self): | ||
2068 | 1521 | self.get_branch_config('http://www.example.com', | ||
2069 | 1522 | global_config=sample_ignore_signatures) | ||
2070 | 1523 | self.assertEqual(config.CHECK_ALWAYS, | ||
2071 | 1524 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2072 | 1525 | self.my_config.signature_checking)) | ||
2073 | 1526 | self.assertEqual(config.SIGN_NEVER, | ||
2074 | 1527 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2075 | 1528 | self.my_config.signing_policy)) | ||
2076 | 1529 | |||
2077 | 1530 | def test_signatures_never(self): | ||
2078 | 1531 | self.get_branch_config('/a/c') | ||
2079 | 1532 | self.assertEqual(config.CHECK_NEVER, | ||
2080 | 1533 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2081 | 1534 | self.my_config.signature_checking)) | ||
2082 | 1535 | |||
2083 | 1536 | def test_signatures_when_available(self): | ||
2084 | 1537 | self.get_branch_config('/a/', global_config=sample_ignore_signatures) | ||
2085 | 1538 | self.assertEqual(config.CHECK_IF_POSSIBLE, | ||
2086 | 1539 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2087 | 1540 | self.my_config.signature_checking)) | ||
2088 | 1541 | |||
2089 | 1542 | def test_signatures_always(self): | ||
2090 | 1543 | self.get_branch_config('/b') | ||
2091 | 1544 | self.assertEqual(config.CHECK_ALWAYS, | ||
2092 | 1545 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2093 | 1546 | self.my_config.signature_checking)) | ||
2094 | 1547 | |||
2095 | 1548 | def test_gpg_signing_command(self): | ||
2096 | 1549 | self.get_branch_config('/b') | ||
2097 | 1550 | self.assertEqual("gnome-gpg", | ||
2098 | 1551 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2099 | 1552 | self.my_config.gpg_signing_command)) | ||
2100 | 1553 | |||
2101 | 1554 | def test_gpg_signing_command_missing(self): | ||
2102 | 1555 | self.get_branch_config('/a') | ||
2103 | 1556 | self.assertEqual("false", | ||
2104 | 1557 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2105 | 1558 | self.my_config.gpg_signing_command)) | ||
2106 | 1559 | |||
2107 | 1560 | def test_gpg_signing_key(self): | ||
2108 | 1561 | self.get_branch_config('/b') | ||
2109 | 1562 | self.assertEqual("DD4D5088", self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2110 | 1563 | self.my_config.gpg_signing_key)) | ||
2111 | 1564 | |||
2112 | 1565 | def test_gpg_signing_key_default(self): | ||
2113 | 1566 | self.get_branch_config('/a') | ||
2114 | 1567 | self.assertEqual("erik@bagfors.nu", | ||
2115 | 1568 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2116 | 1569 | self.my_config.gpg_signing_key)) | ||
2117 | 1570 | |||
2118 | 1571 | def test_get_user_option_global(self): | 1356 | def test_get_user_option_global(self): |
2119 | 1572 | self.get_branch_config('/a') | 1357 | self.get_branch_config('/a') |
2120 | 1573 | self.assertEqual('something', | 1358 | self.assertEqual('something', |
2121 | @@ -1637,32 +1422,6 @@ | |||
2122 | 1637 | 'http://www.example.com', 'norecurse_option'), | 1422 | 'http://www.example.com', 'norecurse_option'), |
2123 | 1638 | config.POLICY_NONE) | 1423 | config.POLICY_NONE) |
2124 | 1639 | 1424 | ||
2125 | 1640 | def test_set_user_option_recurse_false_section(self): | ||
2126 | 1641 | # The following section has recurse=False set. The test is to | ||
2127 | 1642 | # make sure that a normal option can be added to the section, | ||
2128 | 1643 | # converting recurse=False to the norecurse policy. | ||
2129 | 1644 | self.get_branch_config('http://www.example.com/norecurse') | ||
2130 | 1645 | self.callDeprecated(['The recurse option is deprecated as of 0.14. ' | ||
2131 | 1646 | 'The section "http://www.example.com/norecurse" ' | ||
2132 | 1647 | 'has been converted to use policies.'], | ||
2133 | 1648 | self.my_config.set_user_option, | ||
2134 | 1649 | 'foo', 'bar', store=config.STORE_LOCATION) | ||
2135 | 1650 | self.assertEqual( | ||
2136 | 1651 | self.my_location_config._get_option_policy( | ||
2137 | 1652 | 'http://www.example.com/norecurse', 'foo'), | ||
2138 | 1653 | config.POLICY_NONE) | ||
2139 | 1654 | # The previously existing option is still norecurse: | ||
2140 | 1655 | self.assertEqual( | ||
2141 | 1656 | self.my_location_config._get_option_policy( | ||
2142 | 1657 | 'http://www.example.com/norecurse', 'normal_option'), | ||
2143 | 1658 | config.POLICY_NORECURSE) | ||
2144 | 1659 | |||
2145 | 1660 | def test_post_commit_default(self): | ||
2146 | 1661 | self.get_branch_config('/a/c') | ||
2147 | 1662 | self.assertEqual('breezy.tests.test_config.post_commit', | ||
2148 | 1663 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2149 | 1664 | self.my_config.post_commit)) | ||
2150 | 1665 | |||
2151 | 1666 | def get_branch_config(self, location, global_config=None, | 1425 | def get_branch_config(self, location, global_config=None, |
2152 | 1667 | location_config=None): | 1426 | location_config=None): |
2153 | 1668 | my_branch = FakeBranch(location) | 1427 | my_branch = FakeBranch(location) |
2154 | @@ -1678,33 +1437,6 @@ | |||
2155 | 1678 | self.my_config = my_config | 1437 | self.my_config = my_config |
2156 | 1679 | self.my_location_config = my_config._get_location_config() | 1438 | self.my_location_config = my_config._get_location_config() |
2157 | 1680 | 1439 | ||
2158 | 1681 | def test_set_user_setting_sets_and_saves(self): | ||
2159 | 1682 | self.get_branch_config('/a/c') | ||
2160 | 1683 | record = InstrumentedConfigObj("foo") | ||
2161 | 1684 | self.my_location_config._parser = record | ||
2162 | 1685 | |||
2163 | 1686 | self.callDeprecated(['The recurse option is deprecated as of ' | ||
2164 | 1687 | '0.14. The section "/a/c" has been ' | ||
2165 | 1688 | 'converted to use policies.'], | ||
2166 | 1689 | self.my_config.set_user_option, | ||
2167 | 1690 | 'foo', 'bar', store=config.STORE_LOCATION) | ||
2168 | 1691 | self.assertEqual([('reload',), | ||
2169 | 1692 | ('__contains__', '/a/c'), | ||
2170 | 1693 | ('__contains__', '/a/c/'), | ||
2171 | 1694 | ('__setitem__', '/a/c', {}), | ||
2172 | 1695 | ('__getitem__', '/a/c'), | ||
2173 | 1696 | ('__setitem__', 'foo', 'bar'), | ||
2174 | 1697 | ('__getitem__', '/a/c'), | ||
2175 | 1698 | ('as_bool', 'recurse'), | ||
2176 | 1699 | ('__getitem__', '/a/c'), | ||
2177 | 1700 | ('__delitem__', 'recurse'), | ||
2178 | 1701 | ('__getitem__', '/a/c'), | ||
2179 | 1702 | ('keys',), | ||
2180 | 1703 | ('__getitem__', '/a/c'), | ||
2181 | 1704 | ('__contains__', 'foo:policy'), | ||
2182 | 1705 | ('write',)], | ||
2183 | 1706 | record._calls[1:]) | ||
2184 | 1707 | |||
2185 | 1708 | def test_set_user_setting_sets_and_saves2(self): | 1440 | def test_set_user_setting_sets_and_saves2(self): |
2186 | 1709 | self.get_branch_config('/a/c') | 1441 | self.get_branch_config('/a/c') |
2187 | 1710 | self.assertIs(self.my_config.get_user_option('foo'), None) | 1442 | self.assertIs(self.my_config.get_user_option('foo'), None) |
2188 | @@ -1771,64 +1503,11 @@ | |||
2189 | 1771 | self.assertEqual("Robert Collins <robertc@example.org>", | 1503 | self.assertEqual("Robert Collins <robertc@example.org>", |
2190 | 1772 | my_config.username()) | 1504 | my_config.username()) |
2191 | 1773 | 1505 | ||
2192 | 1774 | def test_signatures_forced(self): | ||
2193 | 1775 | my_config = self.get_branch_config( | ||
2194 | 1776 | global_config=sample_always_signatures) | ||
2195 | 1777 | self.assertEqual(config.CHECK_NEVER, | ||
2196 | 1778 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2197 | 1779 | my_config.signature_checking)) | ||
2198 | 1780 | self.assertEqual(config.SIGN_ALWAYS, | ||
2199 | 1781 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2200 | 1782 | my_config.signing_policy)) | ||
2201 | 1783 | self.assertTrue(self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2202 | 1784 | my_config.signature_needed)) | ||
2203 | 1785 | |||
2204 | 1786 | def test_signatures_forced_branch(self): | ||
2205 | 1787 | my_config = self.get_branch_config( | ||
2206 | 1788 | global_config=sample_ignore_signatures, | ||
2207 | 1789 | branch_data_config=sample_always_signatures) | ||
2208 | 1790 | self.assertEqual(config.CHECK_NEVER, | ||
2209 | 1791 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2210 | 1792 | my_config.signature_checking)) | ||
2211 | 1793 | self.assertEqual(config.SIGN_ALWAYS, | ||
2212 | 1794 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2213 | 1795 | my_config.signing_policy)) | ||
2214 | 1796 | self.assertTrue(self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2215 | 1797 | my_config.signature_needed)) | ||
2216 | 1798 | |||
2217 | 1799 | def test_gpg_signing_command(self): | ||
2218 | 1800 | my_config = self.get_branch_config( | ||
2219 | 1801 | global_config=sample_config_text, | ||
2220 | 1802 | # branch data cannot set gpg_signing_command | ||
2221 | 1803 | branch_data_config="gpg_signing_command=pgp") | ||
2222 | 1804 | self.assertEqual('gnome-gpg', | ||
2223 | 1805 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2224 | 1806 | my_config.gpg_signing_command)) | ||
2225 | 1807 | |||
2226 | 1808 | def test_get_user_option_global(self): | 1506 | def test_get_user_option_global(self): |
2227 | 1809 | my_config = self.get_branch_config(global_config=sample_config_text) | 1507 | my_config = self.get_branch_config(global_config=sample_config_text) |
2228 | 1810 | self.assertEqual('something', | 1508 | self.assertEqual('something', |
2229 | 1811 | my_config.get_user_option('user_global_option')) | 1509 | my_config.get_user_option('user_global_option')) |
2230 | 1812 | 1510 | ||
2231 | 1813 | def test_post_commit_default(self): | ||
2232 | 1814 | my_config = self.get_branch_config(global_config=sample_config_text, | ||
2233 | 1815 | location='/a/c', | ||
2234 | 1816 | location_config=sample_branches_text) | ||
2235 | 1817 | self.assertEqual(my_config.branch.base, '/a/c') | ||
2236 | 1818 | self.assertEqual('breezy.tests.test_config.post_commit', | ||
2237 | 1819 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2238 | 1820 | my_config.post_commit)) | ||
2239 | 1821 | my_config.set_user_option('post_commit', 'rmtree_root') | ||
2240 | 1822 | # post-commit is ignored when present in branch data | ||
2241 | 1823 | self.assertEqual('breezy.tests.test_config.post_commit', | ||
2242 | 1824 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2243 | 1825 | my_config.post_commit)) | ||
2244 | 1826 | my_config.set_user_option('post_commit', 'rmtree_root', | ||
2245 | 1827 | store=config.STORE_LOCATION) | ||
2246 | 1828 | self.assertEqual('rmtree_root', | ||
2247 | 1829 | self.applyDeprecated(deprecated_in((2, 5, 0)), | ||
2248 | 1830 | my_config.post_commit)) | ||
2249 | 1831 | |||
2250 | 1832 | def test_config_precedence(self): | 1511 | def test_config_precedence(self): |
2251 | 1833 | # FIXME: eager test, luckily no persitent config file makes it fail | 1512 | # FIXME: eager test, luckily no persitent config file makes it fail |
2252 | 1834 | # -- vila 20100716 | 1513 | # -- vila 20100716 |
2253 | 1835 | 1514 | ||
2254 | === modified file 'breezy/tests/test_hooks.py' | |||
2255 | --- breezy/tests/test_hooks.py 2017-05-22 00:56:52 +0000 | |||
2256 | +++ breezy/tests/test_hooks.py 2017-05-30 21:16:02 +0000 | |||
2257 | @@ -30,9 +30,6 @@ | |||
2258 | 30 | known_hooks, | 30 | known_hooks, |
2259 | 31 | known_hooks_key_to_object, | 31 | known_hooks_key_to_object, |
2260 | 32 | ) | 32 | ) |
2261 | 33 | from ..symbol_versioning import ( | ||
2262 | 34 | deprecated_in, | ||
2263 | 35 | ) | ||
2264 | 36 | 33 | ||
2265 | 37 | 34 | ||
2266 | 38 | class TestHooks(tests.TestCase): | 35 | class TestHooks(tests.TestCase): |
2267 | 39 | 36 | ||
2268 | === modified file 'breezy/tests/test_lru_cache.py' | |||
2269 | --- breezy/tests/test_lru_cache.py 2017-05-22 00:56:52 +0000 | |||
2270 | +++ breezy/tests/test_lru_cache.py 2017-05-30 21:16:02 +0000 | |||
2271 | @@ -18,7 +18,6 @@ | |||
2272 | 18 | 18 | ||
2273 | 19 | from .. import ( | 19 | from .. import ( |
2274 | 20 | lru_cache, | 20 | lru_cache, |
2275 | 21 | symbol_versioning, | ||
2276 | 22 | tests, | 21 | tests, |
2277 | 23 | ) | 22 | ) |
2278 | 24 | 23 | ||
2279 | @@ -128,13 +127,6 @@ | |||
2280 | 128 | 127 | ||
2281 | 129 | self.assertFalse('foo' in cache) | 128 | self.assertFalse('foo' in cache) |
2282 | 130 | 129 | ||
2283 | 131 | def test_cleanup_function_deprecated(self): | ||
2284 | 132 | """Test that per-node cleanup functions are no longer allowed""" | ||
2285 | 133 | cache = lru_cache.LRUCache() | ||
2286 | 134 | self.assertRaises(ValueError, self.applyDeprecated, | ||
2287 | 135 | symbol_versioning.deprecated_in((2, 5, 0)), | ||
2288 | 136 | cache.add, "key", 1, cleanup=lambda: None) | ||
2289 | 137 | |||
2290 | 138 | def test_len(self): | 130 | def test_len(self): |
2291 | 139 | cache = lru_cache.LRUCache(max_cache=10, after_cleanup_count=10) | 131 | cache = lru_cache.LRUCache(max_cache=10, after_cleanup_count=10) |
2292 | 140 | 132 | ||
2293 | 141 | 133 | ||
2294 | === modified file 'breezy/tests/test_osutils.py' | |||
2295 | --- breezy/tests/test_osutils.py 2017-05-24 22:42:07 +0000 | |||
2296 | +++ breezy/tests/test_osutils.py 2017-05-30 21:16:02 +0000 | |||
2297 | @@ -829,17 +829,12 @@ | |||
2298 | 829 | self.assertEqual('foobar', osutils.safe_revision_id('foobar')) | 829 | self.assertEqual('foobar', osutils.safe_revision_id('foobar')) |
2299 | 830 | 830 | ||
2300 | 831 | def test_from_unicode_string_ascii_contents(self): | 831 | def test_from_unicode_string_ascii_contents(self): |
2308 | 832 | self.assertEqual('bargam', | 832 | self.assertRaises(TypeError, |
2309 | 833 | osutils.safe_revision_id(u'bargam', warn=False)) | 833 | osutils.safe_revision_id, u'bargam') |
2303 | 834 | |||
2304 | 835 | def test_from_unicode_deprecated(self): | ||
2305 | 836 | self.assertEqual('bargam', | ||
2306 | 837 | self.callDeprecated([osutils._revision_id_warning], | ||
2307 | 838 | osutils.safe_revision_id, u'bargam')) | ||
2310 | 839 | 834 | ||
2311 | 840 | def test_from_unicode_string_unicode_contents(self): | 835 | def test_from_unicode_string_unicode_contents(self): |
2314 | 841 | self.assertEqual('bargam\xc2\xae', | 836 | self.assertRaises(TypeError, |
2315 | 842 | osutils.safe_revision_id(u'bargam\xae', warn=False)) | 837 | osutils.safe_revision_id, u'bargam\xae') |
2316 | 843 | 838 | ||
2317 | 844 | def test_from_utf8_string(self): | 839 | def test_from_utf8_string(self): |
2318 | 845 | self.assertEqual('foo\xc2\xae', | 840 | self.assertEqual('foo\xc2\xae', |
2319 | @@ -856,16 +851,11 @@ | |||
2320 | 856 | self.assertEqual('foobar', osutils.safe_file_id('foobar')) | 851 | self.assertEqual('foobar', osutils.safe_file_id('foobar')) |
2321 | 857 | 852 | ||
2322 | 858 | def test_from_unicode_string_ascii_contents(self): | 853 | def test_from_unicode_string_ascii_contents(self): |
2329 | 859 | self.assertEqual('bargam', osutils.safe_file_id(u'bargam', warn=False)) | 854 | self.assertRaises(TypeError, osutils.safe_file_id, u'bargam') |
2324 | 860 | |||
2325 | 861 | def test_from_unicode_deprecated(self): | ||
2326 | 862 | self.assertEqual('bargam', | ||
2327 | 863 | self.callDeprecated([osutils._file_id_warning], | ||
2328 | 864 | osutils.safe_file_id, u'bargam')) | ||
2330 | 865 | 855 | ||
2331 | 866 | def test_from_unicode_string_unicode_contents(self): | 856 | def test_from_unicode_string_unicode_contents(self): |
2334 | 867 | self.assertEqual('bargam\xc2\xae', | 857 | self.assertRaises(TypeError, |
2335 | 868 | osutils.safe_file_id(u'bargam\xae', warn=False)) | 858 | osutils.safe_file_id, u'bargam\xae') |
2336 | 869 | 859 | ||
2337 | 870 | def test_from_utf8_string(self): | 860 | def test_from_utf8_string(self): |
2338 | 871 | self.assertEqual('foo\xc2\xae', | 861 | self.assertEqual('foo\xc2\xae', |
2339 | @@ -1831,32 +1821,6 @@ | |||
2340 | 1831 | self.assertRaises(IOError, osutils.resource_string, 'breezy', 'yyy.xx') | 1821 | self.assertRaises(IOError, osutils.resource_string, 'breezy', 'yyy.xx') |
2341 | 1832 | 1822 | ||
2342 | 1833 | 1823 | ||
2343 | 1834 | class TestReCompile(tests.TestCase): | ||
2344 | 1835 | |||
2345 | 1836 | def _deprecated_re_compile_checked(self, *args, **kwargs): | ||
2346 | 1837 | return self.applyDeprecated(symbol_versioning.deprecated_in((2, 2, 0)), | ||
2347 | 1838 | osutils.re_compile_checked, *args, **kwargs) | ||
2348 | 1839 | |||
2349 | 1840 | def test_re_compile_checked(self): | ||
2350 | 1841 | r = self._deprecated_re_compile_checked(r'A*', re.IGNORECASE) | ||
2351 | 1842 | self.assertTrue(r.match('aaaa')) | ||
2352 | 1843 | self.assertTrue(r.match('aAaA')) | ||
2353 | 1844 | |||
2354 | 1845 | def test_re_compile_checked_error(self): | ||
2355 | 1846 | # like https://bugs.launchpad.net/bzr/+bug/251352 | ||
2356 | 1847 | |||
2357 | 1848 | # Due to possible test isolation error, re.compile is not lazy at | ||
2358 | 1849 | # this point. We re-install lazy compile. | ||
2359 | 1850 | lazy_regex.install_lazy_compile() | ||
2360 | 1851 | err = self.assertRaises( | ||
2361 | 1852 | errors.BzrCommandError, | ||
2362 | 1853 | self._deprecated_re_compile_checked, '*', re.IGNORECASE, 'test case') | ||
2363 | 1854 | self.assertEqual( | ||
2364 | 1855 | 'Invalid regular expression in test case: ' | ||
2365 | 1856 | '"*" nothing to repeat', | ||
2366 | 1857 | str(err)) | ||
2367 | 1858 | |||
2368 | 1859 | |||
2369 | 1860 | class TestDirReader(tests.TestCaseInTempDir): | 1824 | class TestDirReader(tests.TestCaseInTempDir): |
2370 | 1861 | 1825 | ||
2371 | 1862 | scenarios = dir_reader_scenarios() | 1826 | scenarios = dir_reader_scenarios() |
2372 | 1863 | 1827 | ||
2373 | === modified file 'breezy/tests/test_remote.py' | |||
2374 | --- breezy/tests/test_remote.py 2017-05-22 00:56:52 +0000 | |||
2375 | +++ breezy/tests/test_remote.py 2017-05-30 21:16:02 +0000 | |||
2376 | @@ -73,7 +73,6 @@ | |||
2377 | 73 | SmartServerRepositoryGetStream_1_19, | 73 | SmartServerRepositoryGetStream_1_19, |
2378 | 74 | _stream_to_byte_stream, | 74 | _stream_to_byte_stream, |
2379 | 75 | ) | 75 | ) |
2380 | 76 | from ..symbol_versioning import deprecated_in | ||
2381 | 77 | from . import ( | 76 | from . import ( |
2382 | 78 | test_server, | 77 | test_server, |
2383 | 79 | ) | 78 | ) |
2384 | 80 | 79 | ||
2385 | === modified file 'breezy/tests/test_repository.py' | |||
2386 | --- breezy/tests/test_repository.py 2017-05-25 01:35:55 +0000 | |||
2387 | +++ breezy/tests/test_repository.py 2017-05-30 21:16:02 +0000 | |||
2388 | @@ -31,7 +31,6 @@ | |||
2389 | 31 | ) | 31 | ) |
2390 | 32 | from breezy import ( | 32 | from breezy import ( |
2391 | 33 | btree_index, | 33 | btree_index, |
2392 | 34 | symbol_versioning, | ||
2393 | 35 | tests, | 34 | tests, |
2394 | 36 | transport, | 35 | transport, |
2395 | 37 | vf_search, | 36 | vf_search, |
2396 | 38 | 37 | ||
2397 | === modified file 'breezy/tests/test_revisionspec.py' | |||
2398 | --- breezy/tests/test_revisionspec.py 2017-05-22 00:56:52 +0000 | |||
2399 | +++ breezy/tests/test_revisionspec.py 2017-05-30 21:16:02 +0000 | |||
2400 | @@ -20,7 +20,6 @@ | |||
2401 | 20 | from breezy import ( | 20 | from breezy import ( |
2402 | 21 | errors, | 21 | errors, |
2403 | 22 | revision as _mod_revision, | 22 | revision as _mod_revision, |
2404 | 23 | symbol_versioning, | ||
2405 | 24 | ) | 23 | ) |
2406 | 25 | from breezy.tests import TestCaseWithTransport | 24 | from breezy.tests import TestCaseWithTransport |
2407 | 26 | from breezy.revisionspec import ( | 25 | from breezy.revisionspec import ( |
2408 | @@ -115,18 +114,6 @@ | |||
2409 | 115 | 114 | ||
2410 | 116 | class TestRevisionSpecBase(TestRevisionSpec): | 115 | class TestRevisionSpecBase(TestRevisionSpec): |
2411 | 117 | 116 | ||
2412 | 118 | def test_wants_revision_history(self): | ||
2413 | 119 | # If wants_revision_history = True, then _match_on should get the | ||
2414 | 120 | # branch revision history | ||
2415 | 121 | spec = RevisionSpecMatchOnTrap('foo', _internal=True) | ||
2416 | 122 | spec.wants_revision_history = True | ||
2417 | 123 | self.callDeprecated(['RevisionSpec.wants_revision_history was ' | ||
2418 | 124 | 'deprecated in 2.5 (RevisionSpecMatchOnTrap).'], | ||
2419 | 125 | spec.in_history, self.tree.branch) | ||
2420 | 126 | |||
2421 | 127 | self.assertEqual((self.tree.branch, ['r1' ,'r2']), | ||
2422 | 128 | spec.last_call) | ||
2423 | 129 | |||
2424 | 130 | def test_wants_no_revision_history(self): | 117 | def test_wants_no_revision_history(self): |
2425 | 131 | # If wants_revision_history = False, then _match_on should get None for | 118 | # If wants_revision_history = False, then _match_on should get None for |
2426 | 132 | # the branch revision history | 119 | # the branch revision history |
2427 | 133 | 120 | ||
2428 | === modified file 'breezy/tests/test_selftest.py' | |||
2429 | --- breezy/tests/test_selftest.py 2017-05-23 14:08:03 +0000 | |||
2430 | +++ breezy/tests/test_selftest.py 2017-05-30 21:16:02 +0000 | |||
2431 | @@ -539,19 +539,6 @@ | |||
2432 | 539 | self.assertRaises(AssertionError, self.assertEqualStat, | 539 | self.assertRaises(AssertionError, self.assertEqualStat, |
2433 | 540 | os.lstat("foo"), os.lstat("longname")) | 540 | os.lstat("foo"), os.lstat("longname")) |
2434 | 541 | 541 | ||
2435 | 542 | def test_failUnlessExists(self): | ||
2436 | 543 | """Deprecated failUnlessExists and failIfExists""" | ||
2437 | 544 | self.applyDeprecated( | ||
2438 | 545 | deprecated_in((2, 4)), | ||
2439 | 546 | self.failUnlessExists, '.') | ||
2440 | 547 | self.build_tree(['foo/', 'foo/bar']) | ||
2441 | 548 | self.applyDeprecated( | ||
2442 | 549 | deprecated_in((2, 4)), | ||
2443 | 550 | self.failUnlessExists, 'foo/bar') | ||
2444 | 551 | self.applyDeprecated( | ||
2445 | 552 | deprecated_in((2, 4)), | ||
2446 | 553 | self.failIfExists, 'foo/foo') | ||
2447 | 554 | |||
2448 | 555 | def test_assertPathExists(self): | 542 | def test_assertPathExists(self): |
2449 | 556 | self.assertPathExists('.') | 543 | self.assertPathExists('.') |
2450 | 557 | self.build_tree(['foo/', 'foo/bar']) | 544 | self.build_tree(['foo/', 'foo/bar']) |
2451 | 558 | 545 | ||
2452 | === modified file 'breezy/tests/test_smart_add.py' | |||
2453 | --- breezy/tests/test_smart_add.py 2017-05-22 00:56:52 +0000 | |||
2454 | +++ breezy/tests/test_smart_add.py 2017-05-30 21:16:02 +0000 | |||
2455 | @@ -16,6 +16,7 @@ | |||
2456 | 16 | 16 | ||
2457 | 17 | from .. import ( | 17 | from .. import ( |
2458 | 18 | add, | 18 | add, |
2459 | 19 | cache_utf8, | ||
2460 | 19 | inventory, | 20 | inventory, |
2461 | 20 | osutils, | 21 | osutils, |
2462 | 21 | tests, | 22 | tests, |
2463 | @@ -30,9 +31,7 @@ | |||
2464 | 30 | def __call__(self, inv, parent_ie, path, kind): | 31 | def __call__(self, inv, parent_ie, path, kind): |
2465 | 31 | # The first part just logs if appropriate | 32 | # The first part just logs if appropriate |
2466 | 32 | # Now generate a custom id | 33 | # Now generate a custom id |
2470 | 33 | file_id = osutils.safe_file_id(kind + '-' | 34 | file_id = cache_utf8.encode(kind + '-' + path.replace('/', '%')) |
2468 | 34 | + path.replace('/', '%'), | ||
2469 | 35 | warn=False) | ||
2471 | 36 | if self.should_print: | 35 | if self.should_print: |
2472 | 37 | self._to_file.write('added %s with id %s\n' | 36 | self._to_file.write('added %s with id %s\n' |
2473 | 38 | % (path, file_id)) | 37 | % (path, file_id)) |
2474 | 39 | 38 | ||
2475 | === modified file 'breezy/tests/test_transform.py' | |||
2476 | --- breezy/tests/test_transform.py 2017-05-22 00:56:52 +0000 | |||
2477 | +++ breezy/tests/test_transform.py 2017-05-30 21:16:02 +0000 | |||
2478 | @@ -27,7 +27,6 @@ | |||
2479 | 27 | osutils, | 27 | osutils, |
2480 | 28 | revision as _mod_revision, | 28 | revision as _mod_revision, |
2481 | 29 | rules, | 29 | rules, |
2482 | 30 | symbol_versioning, | ||
2483 | 31 | tests, | 30 | tests, |
2484 | 32 | trace, | 31 | trace, |
2485 | 33 | transform, | 32 | transform, |
2486 | 34 | 33 | ||
2487 | === modified file 'breezy/transform.py' | |||
2488 | --- breezy/transform.py 2017-05-25 01:35:55 +0000 | |||
2489 | +++ breezy/transform.py 2017-05-30 21:16:02 +0000 | |||
2490 | @@ -61,11 +61,6 @@ | |||
2491 | 61 | splitpath, | 61 | splitpath, |
2492 | 62 | ) | 62 | ) |
2493 | 63 | from .progress import ProgressPhase | 63 | from .progress import ProgressPhase |
2494 | 64 | from .symbol_versioning import ( | ||
2495 | 65 | deprecated_function, | ||
2496 | 66 | deprecated_in, | ||
2497 | 67 | deprecated_method, | ||
2498 | 68 | ) | ||
2499 | 69 | 64 | ||
2500 | 70 | 65 | ||
2501 | 71 | ROOT_PARENT = "root-parent" | 66 | ROOT_PARENT = "root-parent" |
2502 | @@ -2051,12 +2046,6 @@ | |||
2503 | 2051 | pass | 2046 | pass |
2504 | 2052 | 2047 | ||
2505 | 2053 | @property | 2048 | @property |
2506 | 2054 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
2507 | 2055 | def inventory(self): | ||
2508 | 2056 | """This Tree does not use inventory as its backing data.""" | ||
2509 | 2057 | raise NotImplementedError(_PreviewTree.inventory) | ||
2510 | 2058 | |||
2511 | 2059 | @property | ||
2512 | 2060 | def root_inventory(self): | 2049 | def root_inventory(self): |
2513 | 2061 | """This Tree does not use inventory as its backing data.""" | 2050 | """This Tree does not use inventory as its backing data.""" |
2514 | 2062 | raise NotImplementedError(_PreviewTree.root_inventory) | 2051 | raise NotImplementedError(_PreviewTree.root_inventory) |
2515 | 2063 | 2052 | ||
2516 | === modified file 'breezy/transport/__init__.py' | |||
2517 | --- breezy/transport/__init__.py 2017-05-25 01:35:55 +0000 | |||
2518 | +++ breezy/transport/__init__.py 2017-05-30 21:16:02 +0000 | |||
2519 | @@ -38,7 +38,6 @@ | |||
2520 | 38 | from breezy import ( | 38 | from breezy import ( |
2521 | 39 | errors, | 39 | errors, |
2522 | 40 | osutils, | 40 | osutils, |
2523 | 41 | symbol_versioning, | ||
2524 | 42 | ui, | 41 | ui, |
2525 | 43 | urlutils, | 42 | urlutils, |
2526 | 44 | ) | 43 | ) |
2527 | @@ -48,9 +47,6 @@ | |||
2528 | 48 | BytesIO, | 47 | BytesIO, |
2529 | 49 | string_types, | 48 | string_types, |
2530 | 50 | ) | 49 | ) |
2531 | 51 | from ..symbol_versioning import ( | ||
2532 | 52 | DEPRECATED_PARAMETER, | ||
2533 | 53 | ) | ||
2534 | 54 | from ..trace import ( | 50 | from ..trace import ( |
2535 | 55 | mutter, | 51 | mutter, |
2536 | 56 | ) | 52 | ) |
2537 | @@ -922,15 +918,7 @@ | |||
2538 | 922 | None means just use the default. | 918 | None means just use the default. |
2539 | 923 | :return: The length of the file that was written. | 919 | :return: The length of the file that was written. |
2540 | 924 | """ | 920 | """ |
2550 | 925 | # We would like to mark this as NotImplemented, but most likely | 921 | raise NotImplementedError(self.put_file) |
2542 | 926 | # transports have defined it in terms of the old api. | ||
2543 | 927 | symbol_versioning.warn('Transport %s should implement put_file,' | ||
2544 | 928 | ' rather than implementing put() as of' | ||
2545 | 929 | ' version 0.11.' | ||
2546 | 930 | % (self.__class__.__name__,), | ||
2547 | 931 | DeprecationWarning) | ||
2548 | 932 | return self.put(relpath, f, mode=mode) | ||
2549 | 933 | #raise NotImplementedError(self.put_file) | ||
2551 | 934 | 922 | ||
2552 | 935 | def put_file_non_atomic(self, relpath, f, mode=None, | 923 | def put_file_non_atomic(self, relpath, f, mode=None, |
2553 | 936 | create_parent_dir=False, | 924 | create_parent_dir=False, |
2554 | @@ -1001,12 +989,7 @@ | |||
2555 | 1001 | 989 | ||
2556 | 1002 | :returns: the length of relpath before the content was written to it. | 990 | :returns: the length of relpath before the content was written to it. |
2557 | 1003 | """ | 991 | """ |
2564 | 1004 | symbol_versioning.warn('Transport %s should implement append_file,' | 992 | raise NotImplementedError(self.append_file) |
2559 | 1005 | ' rather than implementing append() as of' | ||
2560 | 1006 | ' version 0.11.' | ||
2561 | 1007 | % (self.__class__.__name__,), | ||
2562 | 1008 | DeprecationWarning) | ||
2563 | 1009 | return self.append(relpath, f, mode=mode) | ||
2565 | 1010 | 993 | ||
2566 | 1011 | def append_bytes(self, relpath, bytes, mode=None): | 994 | def append_bytes(self, relpath, bytes, mode=None): |
2567 | 1012 | """Append bytes to a file at relpath. | 995 | """Append bytes to a file at relpath. |
2568 | 1013 | 996 | ||
2569 | === modified file 'breezy/transport/ftp/__init__.py' | |||
2570 | --- breezy/transport/ftp/__init__.py 2017-05-22 00:56:52 +0000 | |||
2571 | +++ breezy/transport/ftp/__init__.py 2017-05-30 21:16:02 +0000 | |||
2572 | @@ -44,12 +44,6 @@ | |||
2573 | 44 | from ...sixish import ( | 44 | from ...sixish import ( |
2574 | 45 | BytesIO, | 45 | BytesIO, |
2575 | 46 | ) | 46 | ) |
2576 | 47 | from ...symbol_versioning import ( | ||
2577 | 48 | DEPRECATED_PARAMETER, | ||
2578 | 49 | deprecated_in, | ||
2579 | 50 | deprecated_passed, | ||
2580 | 51 | warn, | ||
2581 | 52 | ) | ||
2582 | 53 | from ...trace import mutter, warning | 47 | from ...trace import mutter, warning |
2583 | 54 | from ...transport import ( | 48 | from ...transport import ( |
2584 | 55 | AppendBasedFileStream, | 49 | AppendBasedFileStream, |
2585 | 56 | 50 | ||
2586 | === modified file 'breezy/transport/gio_transport.py' | |||
2587 | --- breezy/transport/gio_transport.py 2017-05-22 00:56:52 +0000 | |||
2588 | +++ breezy/transport/gio_transport.py 2017-05-30 21:16:02 +0000 | |||
2589 | @@ -43,12 +43,6 @@ | |||
2590 | 43 | from ..sixish import ( | 43 | from ..sixish import ( |
2591 | 44 | BytesIO, | 44 | BytesIO, |
2592 | 45 | ) | 45 | ) |
2593 | 46 | from ..symbol_versioning import ( | ||
2594 | 47 | DEPRECATED_PARAMETER, | ||
2595 | 48 | deprecated_in, | ||
2596 | 49 | deprecated_passed, | ||
2597 | 50 | warn, | ||
2598 | 51 | ) | ||
2599 | 52 | from ..trace import mutter | 46 | from ..trace import mutter |
2600 | 53 | from . import ( | 47 | from . import ( |
2601 | 54 | FileStream, | 48 | FileStream, |
2602 | 55 | 49 | ||
2603 | === modified file 'breezy/transport/local.py' | |||
2604 | --- breezy/transport/local.py 2017-05-22 00:56:52 +0000 | |||
2605 | +++ breezy/transport/local.py 2017-05-30 21:16:02 +0000 | |||
2606 | @@ -34,7 +34,6 @@ | |||
2607 | 34 | atomicfile, | 34 | atomicfile, |
2608 | 35 | osutils, | 35 | osutils, |
2609 | 36 | urlutils, | 36 | urlutils, |
2610 | 37 | symbol_versioning, | ||
2611 | 38 | ) | 37 | ) |
2612 | 39 | from breezy.transport import LateReadError | 38 | from breezy.transport import LateReadError |
2613 | 40 | """) | 39 | """) |
2614 | 41 | 40 | ||
2615 | === modified file 'breezy/tree.py' | |||
2616 | --- breezy/tree.py 2017-05-25 01:35:55 +0000 | |||
2617 | +++ breezy/tree.py 2017-05-30 21:16:02 +0000 | |||
2618 | @@ -42,10 +42,6 @@ | |||
2619 | 42 | 42 | ||
2620 | 43 | from .decorators import needs_read_lock | 43 | from .decorators import needs_read_lock |
2621 | 44 | from .inter import InterObject | 44 | from .inter import InterObject |
2622 | 45 | from .symbol_versioning import ( | ||
2623 | 46 | deprecated_in, | ||
2624 | 47 | deprecated_method, | ||
2625 | 48 | ) | ||
2626 | 49 | 45 | ||
2627 | 50 | 46 | ||
2628 | 51 | class Tree(object): | 47 | class Tree(object): |
2629 | @@ -138,10 +134,6 @@ | |||
2630 | 138 | def has_id(self, file_id): | 134 | def has_id(self, file_id): |
2631 | 139 | raise NotImplementedError(self.has_id) | 135 | raise NotImplementedError(self.has_id) |
2632 | 140 | 136 | ||
2633 | 141 | @deprecated_method(deprecated_in((2, 4, 0))) | ||
2634 | 142 | def __contains__(self, file_id): | ||
2635 | 143 | return self.has_id(file_id) | ||
2636 | 144 | |||
2637 | 145 | def has_or_had_id(self, file_id): | 137 | def has_or_had_id(self, file_id): |
2638 | 146 | raise NotImplementedError(self.has_or_had_id) | 138 | raise NotImplementedError(self.has_or_had_id) |
2639 | 147 | 139 | ||
2640 | @@ -781,13 +773,6 @@ | |||
2641 | 781 | yield cur_path | 773 | yield cur_path |
2642 | 782 | # all done. | 774 | # all done. |
2643 | 783 | 775 | ||
2644 | 784 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
2645 | 785 | def _get_inventory(self): | ||
2646 | 786 | return self._inventory | ||
2647 | 787 | |||
2648 | 788 | inventory = property(_get_inventory, | ||
2649 | 789 | doc="Inventory of this Tree") | ||
2650 | 790 | |||
2651 | 791 | def _get_root_inventory(self): | 776 | def _get_root_inventory(self): |
2652 | 792 | return self._inventory | 777 | return self._inventory |
2653 | 793 | 778 | ||
2654 | @@ -839,10 +824,6 @@ | |||
2655 | 839 | def all_file_ids(self): | 824 | def all_file_ids(self): |
2656 | 840 | return {entry.file_id for path, entry in self.iter_entries_by_dir()} | 825 | return {entry.file_id for path, entry in self.iter_entries_by_dir()} |
2657 | 841 | 826 | ||
2658 | 842 | @deprecated_method(deprecated_in((2, 4, 0))) | ||
2659 | 843 | def __iter__(self): | ||
2660 | 844 | return iter(self.all_file_ids()) | ||
2661 | 845 | |||
2662 | 846 | def filter_unversioned_files(self, paths): | 827 | def filter_unversioned_files(self, paths): |
2663 | 847 | """Filter out paths that are versioned. | 828 | """Filter out paths that are versioned. |
2664 | 848 | 829 | ||
2665 | @@ -885,10 +866,6 @@ | |||
2666 | 885 | inv, inv_file_id = self._unpack_file_id(file_id) | 866 | inv, inv_file_id = self._unpack_file_id(file_id) |
2667 | 886 | return inv[inv_file_id].children.itervalues() | 867 | return inv[inv_file_id].children.itervalues() |
2668 | 887 | 868 | ||
2669 | 888 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
2670 | 889 | def get_file_by_path(self, path): | ||
2671 | 890 | return self.get_file(self.path2id(path), path) | ||
2672 | 891 | |||
2673 | 892 | def iter_children(self, file_id, path=None): | 869 | def iter_children(self, file_id, path=None): |
2674 | 893 | """See Tree.iter_children.""" | 870 | """See Tree.iter_children.""" |
2675 | 894 | entry = self.iter_entries_by_dir([file_id]).next()[1] | 871 | entry = self.iter_entries_by_dir([file_id]).next()[1] |
2676 | 895 | 872 | ||
2677 | === modified file 'breezy/vf_repository.py' | |||
2678 | --- breezy/vf_repository.py 2017-05-25 01:35:55 +0000 | |||
2679 | +++ breezy/vf_repository.py 2017-05-30 21:16:02 +0000 | |||
2680 | @@ -37,7 +37,6 @@ | |||
2681 | 37 | revision as _mod_revision, | 37 | revision as _mod_revision, |
2682 | 38 | serializer as _mod_serializer, | 38 | serializer as _mod_serializer, |
2683 | 39 | static_tuple, | 39 | static_tuple, |
2684 | 40 | symbol_versioning, | ||
2685 | 41 | tsort, | 40 | tsort, |
2686 | 42 | ui, | 41 | ui, |
2687 | 43 | versionedfile, | 42 | versionedfile, |
2688 | @@ -2643,13 +2642,10 @@ | |||
2689 | 2643 | 2642 | ||
2690 | 2644 | @needs_read_lock | 2643 | @needs_read_lock |
2691 | 2645 | def search_missing_revision_ids(self, | 2644 | def search_missing_revision_ids(self, |
2692 | 2646 | revision_id=symbol_versioning.DEPRECATED_PARAMETER, | ||
2693 | 2647 | find_ghosts=True, revision_ids=None, if_present_ids=None, | 2645 | find_ghosts=True, revision_ids=None, if_present_ids=None, |
2694 | 2648 | limit=None): | 2646 | limit=None): |
2695 | 2649 | """Return the revision ids that source has that target does not. | 2647 | """Return the revision ids that source has that target does not. |
2696 | 2650 | 2648 | ||
2697 | 2651 | :param revision_id: only return revision ids included by this | ||
2698 | 2652 | revision_id. | ||
2699 | 2653 | :param revision_ids: return revision ids included by these | 2649 | :param revision_ids: return revision ids included by these |
2700 | 2654 | revision_ids. NoSuchRevision will be raised if any of these | 2650 | revision_ids. NoSuchRevision will be raised if any of these |
2701 | 2655 | revisions are not present. | 2651 | revisions are not present. |
2702 | @@ -2661,17 +2657,6 @@ | |||
2703 | 2661 | rather than just finding the surface difference. | 2657 | rather than just finding the surface difference. |
2704 | 2662 | :return: A breezy.graph.SearchResult. | 2658 | :return: A breezy.graph.SearchResult. |
2705 | 2663 | """ | 2659 | """ |
2706 | 2664 | if symbol_versioning.deprecated_passed(revision_id): | ||
2707 | 2665 | symbol_versioning.warn( | ||
2708 | 2666 | 'search_missing_revision_ids(revision_id=...) was ' | ||
2709 | 2667 | 'deprecated in 2.4. Use revision_ids=[...] instead.', | ||
2710 | 2668 | DeprecationWarning, stacklevel=2) | ||
2711 | 2669 | if revision_ids is not None: | ||
2712 | 2670 | raise AssertionError( | ||
2713 | 2671 | 'revision_ids is mutually exclusive with revision_id') | ||
2714 | 2672 | if revision_id is not None: | ||
2715 | 2673 | revision_ids = [revision_id] | ||
2716 | 2674 | del revision_id | ||
2717 | 2675 | # stop searching at found target revisions. | 2660 | # stop searching at found target revisions. |
2718 | 2676 | if not find_ghosts and (revision_ids is not None or if_present_ids is | 2661 | if not find_ghosts and (revision_ids is not None or if_present_ids is |
2719 | 2677 | not None): | 2662 | not None): |
2720 | 2678 | 2663 | ||
2721 | === modified file 'breezy/weave.py' | |||
2722 | --- breezy/weave.py 2017-05-24 19:44:00 +0000 | |||
2723 | +++ breezy/weave.py 2017-05-30 21:16:02 +0000 | |||
2724 | @@ -88,7 +88,6 @@ | |||
2725 | 88 | from .sixish import ( | 88 | from .sixish import ( |
2726 | 89 | BytesIO, | 89 | BytesIO, |
2727 | 90 | ) | 90 | ) |
2728 | 91 | from .symbol_versioning import * | ||
2729 | 92 | from .trace import mutter | 91 | from .trace import mutter |
2730 | 93 | from .versionedfile import ( | 92 | from .versionedfile import ( |
2731 | 94 | AbsentContentFactory, | 93 | AbsentContentFactory, |
2732 | 95 | 94 | ||
2733 | === modified file 'breezy/workingtree.py' | |||
2734 | --- breezy/workingtree.py 2017-05-25 01:35:55 +0000 | |||
2735 | +++ breezy/workingtree.py 2017-05-30 21:16:02 +0000 | |||
2736 | @@ -48,6 +48,7 @@ | |||
2737 | 48 | 48 | ||
2738 | 49 | from breezy import ( | 49 | from breezy import ( |
2739 | 50 | branch, | 50 | branch, |
2740 | 51 | cache_utf8, | ||
2741 | 51 | conflicts as _mod_conflicts, | 52 | conflicts as _mod_conflicts, |
2742 | 52 | controldir, | 53 | controldir, |
2743 | 53 | errors, | 54 | errors, |
2744 | @@ -76,7 +77,6 @@ | |||
2745 | 76 | from . import ( | 77 | from . import ( |
2746 | 77 | bzrdir, | 78 | bzrdir, |
2747 | 78 | osutils, | 79 | osutils, |
2748 | 79 | symbol_versioning, | ||
2749 | 80 | ) | 80 | ) |
2750 | 81 | from .decorators import needs_read_lock, needs_write_lock | 81 | from .decorators import needs_read_lock, needs_write_lock |
2751 | 82 | from .i18n import gettext | 82 | from .i18n import gettext |
2752 | @@ -97,10 +97,6 @@ | |||
2753 | 97 | BytesIO, | 97 | BytesIO, |
2754 | 98 | ) | 98 | ) |
2755 | 99 | from .trace import mutter, note | 99 | from .trace import mutter, note |
2756 | 100 | from .symbol_versioning import ( | ||
2757 | 101 | deprecated_passed, | ||
2758 | 102 | DEPRECATED_PARAMETER, | ||
2759 | 103 | ) | ||
2760 | 104 | 100 | ||
2761 | 105 | 101 | ||
2762 | 106 | MERGE_MODIFIED_HEADER_1 = "BZR merge-modified list format 1" | 102 | MERGE_MODIFIED_HEADER_1 = "BZR merge-modified list format 1" |
2763 | @@ -180,7 +176,7 @@ | |||
2764 | 180 | return views.DisabledViews(self) | 176 | return views.DisabledViews(self) |
2765 | 181 | 177 | ||
2766 | 182 | def __init__(self, basedir='.', | 178 | def __init__(self, basedir='.', |
2768 | 183 | branch=DEPRECATED_PARAMETER, | 179 | branch=None, |
2769 | 184 | _internal=False, | 180 | _internal=False, |
2770 | 185 | _transport=None, | 181 | _transport=None, |
2771 | 186 | _format=None, | 182 | _format=None, |
2772 | @@ -196,7 +192,7 @@ | |||
2773 | 196 | "WorkingTree.open() to obtain a WorkingTree.") | 192 | "WorkingTree.open() to obtain a WorkingTree.") |
2774 | 197 | basedir = safe_unicode(basedir) | 193 | basedir = safe_unicode(basedir) |
2775 | 198 | mutter("opening working tree %r", basedir) | 194 | mutter("opening working tree %r", basedir) |
2777 | 199 | if deprecated_passed(branch): | 195 | if branch is not None: |
2778 | 200 | self._branch = branch | 196 | self._branch = branch |
2779 | 201 | else: | 197 | else: |
2780 | 202 | self._branch = self.bzrdir.open_branch() | 198 | self._branch = self.bzrdir.open_branch() |
2781 | @@ -1787,7 +1783,7 @@ | |||
2782 | 1787 | """ | 1783 | """ |
2783 | 1788 | 1784 | ||
2784 | 1789 | def __init__(self, basedir='.', | 1785 | def __init__(self, basedir='.', |
2786 | 1790 | branch=DEPRECATED_PARAMETER, | 1786 | branch=None, |
2787 | 1791 | _inventory=None, | 1787 | _inventory=None, |
2788 | 1792 | _control_files=None, | 1788 | _control_files=None, |
2789 | 1793 | _internal=False, | 1789 | _internal=False, |
2790 | @@ -2376,7 +2372,7 @@ | |||
2791 | 2376 | raise errors.MergeModifiedFormatError() | 2372 | raise errors.MergeModifiedFormatError() |
2792 | 2377 | for s in _mod_rio.RioReader(hashfile): | 2373 | for s in _mod_rio.RioReader(hashfile): |
2793 | 2378 | # RioReader reads in Unicode, so convert file_ids back to utf8 | 2374 | # RioReader reads in Unicode, so convert file_ids back to utf8 |
2795 | 2379 | file_id = osutils.safe_file_id(s.get("file_id"), warn=False) | 2375 | file_id = cache_utf8.encode(s.get("file_id")) |
2796 | 2380 | if not self.has_id(file_id): | 2376 | if not self.has_id(file_id): |
2797 | 2381 | continue | 2377 | continue |
2798 | 2382 | text_hash = s.get("hash") | 2378 | text_hash = s.get("hash") |
2799 | 2383 | 2379 | ||
2800 | === modified file 'breezy/workingtree_4.py' | |||
2801 | --- breezy/workingtree_4.py 2017-05-25 01:35:55 +0000 | |||
2802 | +++ breezy/workingtree_4.py 2017-05-30 21:16:02 +0000 | |||
2803 | @@ -72,10 +72,6 @@ | |||
2804 | 72 | from .sixish import ( | 72 | from .sixish import ( |
2805 | 73 | BytesIO, | 73 | BytesIO, |
2806 | 74 | ) | 74 | ) |
2807 | 75 | from .symbol_versioning import ( | ||
2808 | 76 | deprecated_in, | ||
2809 | 77 | deprecated_method, | ||
2810 | 78 | ) | ||
2811 | 79 | from .transport.local import LocalTransport | 75 | from .transport.local import LocalTransport |
2812 | 80 | from .tree import ( | 76 | from .tree import ( |
2813 | 81 | InterTree, | 77 | InterTree, |
2814 | @@ -433,13 +429,6 @@ | |||
2815 | 433 | self._generate_inventory() | 429 | self._generate_inventory() |
2816 | 434 | return self._inventory | 430 | return self._inventory |
2817 | 435 | 431 | ||
2818 | 436 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
2819 | 437 | def _get_inventory(self): | ||
2820 | 438 | return self.root_inventory | ||
2821 | 439 | |||
2822 | 440 | inventory = property(_get_inventory, | ||
2823 | 441 | doc="Inventory of this Tree") | ||
2824 | 442 | |||
2825 | 443 | root_inventory = property(_get_root_inventory, | 432 | root_inventory = property(_get_root_inventory, |
2826 | 444 | "Root inventory of this tree") | 433 | "Root inventory of this tree") |
2827 | 445 | 434 | ||
2828 | @@ -1951,13 +1940,6 @@ | |||
2829 | 1951 | root_inventory = property(_get_root_inventory, | 1940 | root_inventory = property(_get_root_inventory, |
2830 | 1952 | doc="Inventory of this Tree") | 1941 | doc="Inventory of this Tree") |
2831 | 1953 | 1942 | ||
2832 | 1954 | @deprecated_method(deprecated_in((2, 5, 0))) | ||
2833 | 1955 | def _get_inventory(self): | ||
2834 | 1956 | return self.root_inventory | ||
2835 | 1957 | |||
2836 | 1958 | inventory = property(_get_inventory, | ||
2837 | 1959 | doc="Inventory of this Tree") | ||
2838 | 1960 | |||
2839 | 1961 | def get_parent_ids(self): | 1943 | def get_parent_ids(self): |
2840 | 1962 | """The parents of a tree in the dirstate are not cached.""" | 1944 | """The parents of a tree in the dirstate are not cached.""" |
2841 | 1963 | return self._repository.get_revision(self._revision_id).parent_ids | 1945 | return self._repository.get_revision(self._revision_id).parent_ids |
2842 | 1964 | 1946 | ||
2843 | === modified file 'doc/en/release-notes/brz-3.0.txt' | |||
2844 | --- doc/en/release-notes/brz-3.0.txt 2017-05-24 20:47:06 +0000 | |||
2845 | +++ doc/en/release-notes/brz-3.0.txt 2017-05-30 21:16:02 +0000 | |||
2846 | @@ -55,6 +55,9 @@ | |||
2847 | 55 | * Signature of ``load_tests`` used by ``TestLoader`` changed to be | 55 | * Signature of ``load_tests`` used by ``TestLoader`` changed to be |
2848 | 56 | compatible with standard libarary unittest. (Martin Packman) | 56 | compatible with standard libarary unittest. (Martin Packman) |
2849 | 57 | 57 | ||
2850 | 58 | * All previously deprecated functionality has been removed. | ||
2851 | 59 | (Jelmer Vernooij) | ||
2852 | 60 | |||
2853 | 58 | * Renamed ``breezy.delta.report_delta`` parameter ``filter=`` to | 61 | * Renamed ``breezy.delta.report_delta`` parameter ``filter=`` to |
2854 | 59 | ``predicate=``. (Martin Packman) | 62 | ``predicate=``. (Martin Packman) |
2855 | 60 | 63 |
Approve per earlier review.