Show More
@@ -425,7 +425,7 b' def cloneshallow(orig, ui, repo, *args, ' | |||
|
425 | 425 | finally: |
|
426 | 426 | if opts.get('shallow'): |
|
427 | 427 | for r in repos: |
|
428 |
if util.safehasattr(r, |
|
|
428 | if util.safehasattr(r, 'fileservice'): | |
|
429 | 429 | r.fileservice.close() |
|
430 | 430 | |
|
431 | 431 | |
@@ -904,7 +904,7 b' def gcclient(ui, cachepath):' | |||
|
904 | 904 | if not isenabled(repo): |
|
905 | 905 | continue |
|
906 | 906 | |
|
907 |
if not util.safehasattr(repo, |
|
|
907 | if not util.safehasattr(repo, 'name'): | |
|
908 | 908 | ui.warn( |
|
909 | 909 | _(b"repo %s is a misconfigured remotefilelog repo\n") % path |
|
910 | 910 | ) |
@@ -1034,7 +1034,7 b' def wcpprefetch(ui, repo, **kwargs):' | |||
|
1034 | 1034 | bgprefetchrevs = revdatelimit(ui, bgprefetchrevs) |
|
1035 | 1035 | |
|
1036 | 1036 | def anon(unused_success): |
|
1037 |
if util.safehasattr(repo, |
|
|
1037 | if util.safehasattr(repo, 'ranprefetch') and repo.ranprefetch: | |
|
1038 | 1038 | return |
|
1039 | 1039 | repo.ranprefetch = True |
|
1040 | 1040 | repo.backgroundprefetch(bgprefetchrevs, repack=bgrepack) |
@@ -1080,9 +1080,9 b' def exchangepull(orig, repo, remote, *ar' | |||
|
1080 | 1080 | source, heads=heads, common=common, bundlecaps=bundlecaps, **kwargs |
|
1081 | 1081 | ) |
|
1082 | 1082 | |
|
1083 |
if util.safehasattr(remote, |
|
|
1083 | if util.safehasattr(remote, '_callstream'): | |
|
1084 | 1084 | remote._localrepo = repo |
|
1085 |
elif util.safehasattr(remote, |
|
|
1085 | elif util.safehasattr(remote, 'getbundle'): | |
|
1086 | 1086 | extensions.wrapfunction(remote, 'getbundle', localgetbundle) |
|
1087 | 1087 | |
|
1088 | 1088 | return orig(repo, remote, *args, **kwargs) |
@@ -228,7 +228,7 b' def onetimesetup(ui):' | |||
|
228 | 228 | # When generating file blobs, taking the real path is too slow on large |
|
229 | 229 | # repos, so force it to just return the linkrev directly. |
|
230 | 230 | repo = self._repo |
|
231 |
if util.safehasattr(repo, |
|
|
231 | if util.safehasattr(repo, 'forcelinkrev') and repo.forcelinkrev: | |
|
232 | 232 | return self._filelog.linkrev(self._filelog.rev(self._filenode)) |
|
233 | 233 | return orig(self, *args, **kwargs) |
|
234 | 234 |
General Comments 0
You need to be logged in to leave comments.
Login now