Show More
@@ -185,7 +185,7 b' class GitRemote(RemoteBase):' | |||
|
185 | 185 | @reraise_safe_exceptions |
|
186 | 186 | def assert_correct_path(self, wire): |
|
187 | 187 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
188 | region = self.region(wire) | |
|
188 | region = self._region(wire) | |
|
189 | 189 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
190 | 190 | def _assert_correct_path(_context_uid, _repo_id): |
|
191 | 191 | try: |
@@ -218,7 +218,7 b' class GitRemote(RemoteBase):' | |||
|
218 | 218 | @reraise_safe_exceptions |
|
219 | 219 | def blob_raw_length(self, wire, sha): |
|
220 | 220 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
221 | region = self.region(wire) | |
|
221 | region = self._region(wire) | |
|
222 | 222 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
223 | 223 | def _blob_raw_length(_repo_id, _sha): |
|
224 | 224 | |
@@ -250,7 +250,7 b' class GitRemote(RemoteBase):' | |||
|
250 | 250 | def is_large_file(self, wire, commit_id): |
|
251 | 251 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
252 | 252 | |
|
253 | region = self.region(wire) | |
|
253 | region = self._region(wire) | |
|
254 | 254 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
255 | 255 | def _is_large_file(_repo_id, _sha): |
|
256 | 256 | repo_init = self._factory.repo_libgit2(wire) |
@@ -267,7 +267,7 b' class GitRemote(RemoteBase):' | |||
|
267 | 267 | def is_binary(self, wire, tree_id): |
|
268 | 268 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
269 | 269 | |
|
270 | region = self.region(wire) | |
|
270 | region = self._region(wire) | |
|
271 | 271 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
272 | 272 | def _is_binary(_repo_id, _tree_id): |
|
273 | 273 | repo_init = self._factory.repo_libgit2(wire) |
@@ -310,7 +310,7 b' class GitRemote(RemoteBase):' | |||
|
310 | 310 | @reraise_safe_exceptions |
|
311 | 311 | def bulk_request(self, wire, rev, pre_load): |
|
312 | 312 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
313 | region = self.region(wire) | |
|
313 | region = self._region(wire) | |
|
314 | 314 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
315 | 315 | def _bulk_request(_repo_id, _rev, _pre_load): |
|
316 | 316 | result = {} |
@@ -414,7 +414,7 b' class GitRemote(RemoteBase):' | |||
|
414 | 414 | @reraise_safe_exceptions |
|
415 | 415 | def branch(self, wire, commit_id): |
|
416 | 416 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
417 | region = self.region(wire) | |
|
417 | region = self._region(wire) | |
|
418 | 418 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
419 | 419 | def _branch(_context_uid, _repo_id, _commit_id): |
|
420 | 420 | regex = re.compile('^refs/heads') |
@@ -430,7 +430,7 b' class GitRemote(RemoteBase):' | |||
|
430 | 430 | @reraise_safe_exceptions |
|
431 | 431 | def commit_branches(self, wire, commit_id): |
|
432 | 432 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
433 | region = self.region(wire) | |
|
433 | region = self._region(wire) | |
|
434 | 434 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
435 | 435 | def _commit_branches(_context_uid, _repo_id, _commit_id): |
|
436 | 436 | repo_init = self._factory.repo_libgit2(wire) |
@@ -697,7 +697,7 b' class GitRemote(RemoteBase):' | |||
|
697 | 697 | @reraise_safe_exceptions |
|
698 | 698 | def get_object(self, wire, sha, maybe_unreachable=False): |
|
699 | 699 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
700 | region = self.region(wire) | |
|
700 | region = self._region(wire) | |
|
701 | 701 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
702 | 702 | def _get_object(_context_uid, _repo_id, _sha): |
|
703 | 703 | repo_init = self._factory.repo_libgit2(wire) |
@@ -756,7 +756,7 b' class GitRemote(RemoteBase):' | |||
|
756 | 756 | @reraise_safe_exceptions |
|
757 | 757 | def get_refs(self, wire): |
|
758 | 758 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
759 | region = self.region(wire) | |
|
759 | region = self._region(wire) | |
|
760 | 760 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
761 | 761 | def _get_refs(_context_uid, _repo_id): |
|
762 | 762 | |
@@ -771,7 +771,7 b' class GitRemote(RemoteBase):' | |||
|
771 | 771 | @reraise_safe_exceptions |
|
772 | 772 | def get_branch_pointers(self, wire): |
|
773 | 773 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
774 | region = self.region(wire) | |
|
774 | region = self._region(wire) | |
|
775 | 775 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
776 | 776 | def _get_branch_pointers(_context_uid, _repo_id): |
|
777 | 777 | |
@@ -786,7 +786,7 b' class GitRemote(RemoteBase):' | |||
|
786 | 786 | @reraise_safe_exceptions |
|
787 | 787 | def head(self, wire, show_exc=True): |
|
788 | 788 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
789 | region = self.region(wire) | |
|
789 | region = self._region(wire) | |
|
790 | 790 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
791 | 791 | def _head(_context_uid, _repo_id, _show_exc): |
|
792 | 792 | repo_init = self._factory.repo_libgit2(wire) |
@@ -812,7 +812,7 b' class GitRemote(RemoteBase):' | |||
|
812 | 812 | def revision(self, wire, rev): |
|
813 | 813 | |
|
814 | 814 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
815 | region = self.region(wire) | |
|
815 | region = self._region(wire) | |
|
816 | 816 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
817 | 817 | def _revision(_context_uid, _repo_id, _rev): |
|
818 | 818 | repo_init = self._factory.repo_libgit2(wire) |
@@ -831,7 +831,7 b' class GitRemote(RemoteBase):' | |||
|
831 | 831 | @reraise_safe_exceptions |
|
832 | 832 | def date(self, wire, commit_id): |
|
833 | 833 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
834 | region = self.region(wire) | |
|
834 | region = self._region(wire) | |
|
835 | 835 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
836 | 836 | def _date(_repo_id, _commit_id): |
|
837 | 837 | repo_init = self._factory.repo_libgit2(wire) |
@@ -851,7 +851,7 b' class GitRemote(RemoteBase):' | |||
|
851 | 851 | @reraise_safe_exceptions |
|
852 | 852 | def author(self, wire, commit_id): |
|
853 | 853 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
854 | region = self.region(wire) | |
|
854 | region = self._region(wire) | |
|
855 | 855 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
856 | 856 | def _author(_repo_id, _commit_id): |
|
857 | 857 | repo_init = self._factory.repo_libgit2(wire) |
@@ -876,7 +876,7 b' class GitRemote(RemoteBase):' | |||
|
876 | 876 | @reraise_safe_exceptions |
|
877 | 877 | def message(self, wire, commit_id): |
|
878 | 878 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
879 | region = self.region(wire) | |
|
879 | region = self._region(wire) | |
|
880 | 880 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
881 | 881 | def _message(_repo_id, _commit_id): |
|
882 | 882 | repo_init = self._factory.repo_libgit2(wire) |
@@ -888,7 +888,7 b' class GitRemote(RemoteBase):' | |||
|
888 | 888 | @reraise_safe_exceptions |
|
889 | 889 | def parents(self, wire, commit_id): |
|
890 | 890 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
891 | region = self.region(wire) | |
|
891 | region = self._region(wire) | |
|
892 | 892 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
893 | 893 | def _parents(_repo_id, _commit_id): |
|
894 | 894 | repo_init = self._factory.repo_libgit2(wire) |
@@ -905,7 +905,7 b' class GitRemote(RemoteBase):' | |||
|
905 | 905 | @reraise_safe_exceptions |
|
906 | 906 | def children(self, wire, commit_id): |
|
907 | 907 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
908 | region = self.region(wire) | |
|
908 | region = self._region(wire) | |
|
909 | 909 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
910 | 910 | def _children(_repo_id, _commit_id): |
|
911 | 911 | output, __ = self.run_git_command( |
@@ -965,7 +965,7 b' class GitRemote(RemoteBase):' | |||
|
965 | 965 | def tree_and_type_for_path(self, wire, commit_id, path): |
|
966 | 966 | |
|
967 | 967 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
968 | region = self.region(wire) | |
|
968 | region = self._region(wire) | |
|
969 | 969 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
970 | 970 | def _tree_and_type_for_path(_context_uid, _repo_id, _commit_id, _path): |
|
971 | 971 | repo_init = self._factory.repo_libgit2(wire) |
@@ -983,7 +983,7 b' class GitRemote(RemoteBase):' | |||
|
983 | 983 | @reraise_safe_exceptions |
|
984 | 984 | def tree_items(self, wire, tree_id): |
|
985 | 985 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
986 | region = self.region(wire) | |
|
986 | region = self._region(wire) | |
|
987 | 987 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
988 | 988 | def _tree_items(_repo_id, _tree_id): |
|
989 | 989 | |
@@ -1085,7 +1085,7 b' class GitRemote(RemoteBase):' | |||
|
1085 | 1085 | @reraise_safe_exceptions |
|
1086 | 1086 | def node_history(self, wire, commit_id, path, limit): |
|
1087 | 1087 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
1088 | region = self.region(wire) | |
|
1088 | region = self._region(wire) | |
|
1089 | 1089 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
1090 | 1090 | def _node_history(_context_uid, _repo_id, _commit_id, _path, _limit): |
|
1091 | 1091 | # optimize for n==1, rev-list is much faster for that use-case |
@@ -1128,7 +1128,7 b' class GitRemote(RemoteBase):' | |||
|
1128 | 1128 | def get_all_commit_ids(self, wire): |
|
1129 | 1129 | |
|
1130 | 1130 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
1131 | region = self.region(wire) | |
|
1131 | region = self._region(wire) | |
|
1132 | 1132 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
1133 | 1133 | def _get_all_commit_ids(_context_uid, _repo_id): |
|
1134 | 1134 |
@@ -209,7 +209,7 b' class HgRemote(RemoteBase):' | |||
|
209 | 209 | @reraise_safe_exceptions |
|
210 | 210 | def bookmarks(self, wire): |
|
211 | 211 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
212 | region = self.region(wire) | |
|
212 | region = self._region(wire) | |
|
213 | 213 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
214 | 214 | def _bookmarks(_context_uid, _repo_id): |
|
215 | 215 | repo = self._factory.repo(wire) |
@@ -220,7 +220,7 b' class HgRemote(RemoteBase):' | |||
|
220 | 220 | @reraise_safe_exceptions |
|
221 | 221 | def branches(self, wire, normal, closed): |
|
222 | 222 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
223 | region = self.region(wire) | |
|
223 | region = self._region(wire) | |
|
224 | 224 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
225 | 225 | def _branches(_context_uid, _repo_id, _normal, _closed): |
|
226 | 226 | repo = self._factory.repo(wire) |
@@ -239,7 +239,7 b' class HgRemote(RemoteBase):' | |||
|
239 | 239 | @reraise_safe_exceptions |
|
240 | 240 | def bulk_request(self, wire, commit_id, pre_load): |
|
241 | 241 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
242 | region = self.region(wire) | |
|
242 | region = self._region(wire) | |
|
243 | 243 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
244 | 244 | def _bulk_request(_repo_id, _commit_id, _pre_load): |
|
245 | 245 | result = {} |
@@ -257,7 +257,7 b' class HgRemote(RemoteBase):' | |||
|
257 | 257 | @reraise_safe_exceptions |
|
258 | 258 | def ctx_branch(self, wire, commit_id): |
|
259 | 259 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
260 | region = self.region(wire) | |
|
260 | region = self._region(wire) | |
|
261 | 261 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
262 | 262 | def _ctx_branch(_repo_id, _commit_id): |
|
263 | 263 | repo = self._factory.repo(wire) |
@@ -268,7 +268,7 b' class HgRemote(RemoteBase):' | |||
|
268 | 268 | @reraise_safe_exceptions |
|
269 | 269 | def ctx_date(self, wire, commit_id): |
|
270 | 270 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
271 | region = self.region(wire) | |
|
271 | region = self._region(wire) | |
|
272 | 272 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
273 | 273 | def _ctx_date(_repo_id, _commit_id): |
|
274 | 274 | repo = self._factory.repo(wire) |
@@ -285,7 +285,7 b' class HgRemote(RemoteBase):' | |||
|
285 | 285 | @reraise_safe_exceptions |
|
286 | 286 | def ctx_files(self, wire, commit_id): |
|
287 | 287 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
288 | region = self.region(wire) | |
|
288 | region = self._region(wire) | |
|
289 | 289 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
290 | 290 | def _ctx_files(_repo_id, _commit_id): |
|
291 | 291 | repo = self._factory.repo(wire) |
@@ -303,7 +303,7 b' class HgRemote(RemoteBase):' | |||
|
303 | 303 | @reraise_safe_exceptions |
|
304 | 304 | def ctx_parents(self, wire, commit_id): |
|
305 | 305 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
306 | region = self.region(wire) | |
|
306 | region = self._region(wire) | |
|
307 | 307 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
308 | 308 | def _ctx_parents(_repo_id, _commit_id): |
|
309 | 309 | repo = self._factory.repo(wire) |
@@ -316,7 +316,7 b' class HgRemote(RemoteBase):' | |||
|
316 | 316 | @reraise_safe_exceptions |
|
317 | 317 | def ctx_children(self, wire, commit_id): |
|
318 | 318 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
319 | region = self.region(wire) | |
|
319 | region = self._region(wire) | |
|
320 | 320 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
321 | 321 | def _ctx_children(_repo_id, _commit_id): |
|
322 | 322 | repo = self._factory.repo(wire) |
@@ -329,7 +329,7 b' class HgRemote(RemoteBase):' | |||
|
329 | 329 | @reraise_safe_exceptions |
|
330 | 330 | def ctx_phase(self, wire, commit_id): |
|
331 | 331 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
332 | region = self.region(wire) | |
|
332 | region = self._region(wire) | |
|
333 | 333 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
334 | 334 | def _ctx_phase(_context_uid, _repo_id, _commit_id): |
|
335 | 335 | repo = self._factory.repo(wire) |
@@ -341,7 +341,7 b' class HgRemote(RemoteBase):' | |||
|
341 | 341 | @reraise_safe_exceptions |
|
342 | 342 | def ctx_obsolete(self, wire, commit_id): |
|
343 | 343 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
344 | region = self.region(wire) | |
|
344 | region = self._region(wire) | |
|
345 | 345 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
346 | 346 | def _ctx_obsolete(_context_uid, _repo_id, _commit_id): |
|
347 | 347 | repo = self._factory.repo(wire) |
@@ -352,7 +352,7 b' class HgRemote(RemoteBase):' | |||
|
352 | 352 | @reraise_safe_exceptions |
|
353 | 353 | def ctx_hidden(self, wire, commit_id): |
|
354 | 354 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
355 | region = self.region(wire) | |
|
355 | region = self._region(wire) | |
|
356 | 356 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
357 | 357 | def _ctx_hidden(_context_uid, _repo_id, _commit_id): |
|
358 | 358 | repo = self._factory.repo(wire) |
@@ -466,7 +466,7 b' class HgRemote(RemoteBase):' | |||
|
466 | 466 | @reraise_safe_exceptions |
|
467 | 467 | def node_history(self, wire, revision, path, limit): |
|
468 | 468 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
469 | region = self.region(wire) | |
|
469 | region = self._region(wire) | |
|
470 | 470 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
471 | 471 | def _node_history(_context_uid, _repo_id, _revision, _path, _limit): |
|
472 | 472 | repo = self._factory.repo(wire) |
@@ -497,7 +497,7 b' class HgRemote(RemoteBase):' | |||
|
497 | 497 | @reraise_safe_exceptions |
|
498 | 498 | def node_history_untill(self, wire, revision, path, limit): |
|
499 | 499 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
500 | region = self.region(wire) | |
|
500 | region = self._region(wire) | |
|
501 | 501 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
502 | 502 | def _node_history_until(_context_uid, _repo_id): |
|
503 | 503 | repo = self._factory.repo(wire) |
@@ -536,7 +536,7 b' class HgRemote(RemoteBase):' | |||
|
536 | 536 | @reraise_safe_exceptions |
|
537 | 537 | def fctx_flags(self, wire, commit_id, path): |
|
538 | 538 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
539 | region = self.region(wire) | |
|
539 | region = self._region(wire) | |
|
540 | 540 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
541 | 541 | def _fctx_flags(_repo_id, _commit_id, _path): |
|
542 | 542 | repo = self._factory.repo(wire) |
@@ -549,7 +549,7 b' class HgRemote(RemoteBase):' | |||
|
549 | 549 | @reraise_safe_exceptions |
|
550 | 550 | def fctx_size(self, wire, commit_id, path): |
|
551 | 551 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
552 | region = self.region(wire) | |
|
552 | region = self._region(wire) | |
|
553 | 553 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
554 | 554 | def _fctx_size(_repo_id, _revision, _path): |
|
555 | 555 | repo = self._factory.repo(wire) |
@@ -561,7 +561,7 b' class HgRemote(RemoteBase):' | |||
|
561 | 561 | @reraise_safe_exceptions |
|
562 | 562 | def get_all_commit_ids(self, wire, name): |
|
563 | 563 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
564 | region = self.region(wire) | |
|
564 | region = self._region(wire) | |
|
565 | 565 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
566 | 566 | def _get_all_commit_ids(_context_uid, _repo_id, _name): |
|
567 | 567 | repo = self._factory.repo(wire) |
@@ -578,7 +578,7 b' class HgRemote(RemoteBase):' | |||
|
578 | 578 | @reraise_safe_exceptions |
|
579 | 579 | def is_large_file(self, wire, commit_id, path): |
|
580 | 580 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
581 | region = self.region(wire) | |
|
581 | region = self._region(wire) | |
|
582 | 582 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
583 | 583 | def _is_large_file(_context_uid, _repo_id, _commit_id, _path): |
|
584 | 584 | return largefiles.lfutil.isstandin(path) |
@@ -589,7 +589,7 b' class HgRemote(RemoteBase):' | |||
|
589 | 589 | def is_binary(self, wire, revision, path): |
|
590 | 590 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
591 | 591 | |
|
592 | region = self.region(wire) | |
|
592 | region = self._region(wire) | |
|
593 | 593 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
594 | 594 | def _is_binary(_repo_id, _sha, _path): |
|
595 | 595 | repo = self._factory.repo(wire) |
@@ -628,7 +628,7 b' class HgRemote(RemoteBase):' | |||
|
628 | 628 | def lookup(self, wire, revision, both): |
|
629 | 629 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
630 | 630 | |
|
631 | region = self.region(wire) | |
|
631 | region = self._region(wire) | |
|
632 | 632 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
633 | 633 | def _lookup(_context_uid, _repo_id, _revision, _both): |
|
634 | 634 | |
@@ -687,7 +687,7 b' class HgRemote(RemoteBase):' | |||
|
687 | 687 | def rev_range(self, wire, commit_filter): |
|
688 | 688 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
689 | 689 | |
|
690 | region = self.region(wire) | |
|
690 | region = self._region(wire) | |
|
691 | 691 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
692 | 692 | def _rev_range(_context_uid, _repo_id, _filter): |
|
693 | 693 | repo = self._factory.repo(wire) |
@@ -763,7 +763,7 b' class HgRemote(RemoteBase):' | |||
|
763 | 763 | @reraise_safe_exceptions |
|
764 | 764 | def tags(self, wire): |
|
765 | 765 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
766 | region = self.region(wire) | |
|
766 | region = self._region(wire) | |
|
767 | 767 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
768 | 768 | def _tags(_context_uid, _repo_id): |
|
769 | 769 | repo = self._factory.repo(wire) |
@@ -201,7 +201,7 b' class SvnRemote(RemoteBase):' | |||
|
201 | 201 | def revision_properties(self, wire, revision): |
|
202 | 202 | |
|
203 | 203 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
204 | region = self.region(wire) | |
|
204 | region = self._region(wire) | |
|
205 | 205 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
206 | 206 | def _revision_properties(_repo_id, _revision): |
|
207 | 207 | repo = self._factory.repo(wire) |
@@ -256,7 +256,7 b' class SvnRemote(RemoteBase):' | |||
|
256 | 256 | @reraise_safe_exceptions |
|
257 | 257 | def node_history(self, wire, path, revision, limit): |
|
258 | 258 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
259 | region = self.region(wire) | |
|
259 | region = self._region(wire) | |
|
260 | 260 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
261 | 261 | def _assert_correct_path(_context_uid, _repo_id, _path, _revision, _limit): |
|
262 | 262 | cross_copies = False |
@@ -278,7 +278,7 b' class SvnRemote(RemoteBase):' | |||
|
278 | 278 | |
|
279 | 279 | def node_properties(self, wire, path, revision): |
|
280 | 280 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
281 | region = self.region(wire) | |
|
281 | region = self._region(wire) | |
|
282 | 282 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
283 | 283 | def _node_properties(_repo_id, _path, _revision): |
|
284 | 284 | repo = self._factory.repo(wire) |
@@ -317,7 +317,7 b' class SvnRemote(RemoteBase):' | |||
|
317 | 317 | def get_node_type(self, wire, path, revision=None): |
|
318 | 318 | |
|
319 | 319 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
320 | region = self.region(wire) | |
|
320 | region = self._region(wire) | |
|
321 | 321 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
322 | 322 | def _get_node_type(_repo_id, _path, _revision): |
|
323 | 323 | repo = self._factory.repo(wire) |
@@ -332,7 +332,7 b' class SvnRemote(RemoteBase):' | |||
|
332 | 332 | def get_nodes(self, wire, path, revision=None): |
|
333 | 333 | |
|
334 | 334 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
335 | region = self.region(wire) | |
|
335 | region = self._region(wire) | |
|
336 | 336 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
337 | 337 | def _get_nodes(_repo_id, _path, _revision): |
|
338 | 338 | repo = self._factory.repo(wire) |
@@ -360,7 +360,7 b' class SvnRemote(RemoteBase):' | |||
|
360 | 360 | def get_file_size(self, wire, path, revision=None): |
|
361 | 361 | |
|
362 | 362 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
363 | region = self.region(wire) | |
|
363 | region = self._region(wire) | |
|
364 | 364 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
365 | 365 | def _get_file_size(_repo_id, _path, _revision): |
|
366 | 366 | repo = self._factory.repo(wire) |
@@ -476,7 +476,7 b' class SvnRemote(RemoteBase):' | |||
|
476 | 476 | def is_binary(self, wire, rev, path): |
|
477 | 477 | cache_on, context_uid, repo_id = self._cache_on(wire) |
|
478 | 478 | |
|
479 | region = self.region(wire) | |
|
479 | region = self._region(wire) | |
|
480 | 480 | @region.conditional_cache_on_arguments(condition=cache_on) |
|
481 | 481 | def _is_binary(_repo_id, _rev, _path): |
|
482 | 482 | raw_bytes = self.get_file_content(wire, path, rev) |
@@ -113,7 +113,7 b' class TestReraiseSafeExceptions(object):' | |||
|
113 | 113 | |
|
114 | 114 | methods = inspect.getmembers(git_remote, predicate=inspect.ismethod) |
|
115 | 115 | for method_name, method in methods: |
|
116 | if not method_name.startswith('_'): | |
|
116 | if not method_name.startswith('_') and method_name not in ['vcsserver_invalidate_cache']: | |
|
117 | 117 | assert method.im_func.__code__ == decorator.__code__ |
|
118 | 118 | |
|
119 | 119 | @pytest.mark.parametrize('side_effect, expected_type', [ |
@@ -50,7 +50,7 b' class TestReraiseSafeExceptions(object):' | |||
|
50 | 50 | methods = inspect.getmembers(hg_remote, predicate=inspect.ismethod) |
|
51 | 51 | decorator = hg.reraise_safe_exceptions(None) |
|
52 | 52 | for method_name, method in methods: |
|
53 | if not method_name.startswith('_'): | |
|
53 | if not method_name.startswith('_') and method_name not in ['vcsserver_invalidate_cache']: | |
|
54 | 54 | assert method.im_func.__code__ == decorator.__code__ |
|
55 | 55 | |
|
56 | 56 | @pytest.mark.parametrize('side_effect, expected_type', [ |
@@ -20,7 +20,7 b' from vcsserver.lib import rc_cache' | |||
|
20 | 20 | class RemoteBase(object): |
|
21 | 21 | EMPTY_COMMIT = '0' * 40 |
|
22 | 22 | |
|
23 | def region(self, wire): | |
|
23 | def _region(self, wire): | |
|
24 | 24 | repo_id = wire.get('repo_id', '') |
|
25 | 25 | cache_namespace_uid = 'cache_repo.{}'.format(repo_id) |
|
26 | 26 | return rc_cache.get_or_create_region('repo_object', cache_namespace_uid) |
General Comments 0
You need to be logged in to leave comments.
Login now