Show More
@@ -198,9 +198,9 b' def createlog(ui, directory=None, root=b' | |||||
198 | oldlog = pickle.load(open(cachefile, b'rb')) |
|
198 | oldlog = pickle.load(open(cachefile, b'rb')) | |
199 | for e in oldlog: |
|
199 | for e in oldlog: | |
200 | if not ( |
|
200 | if not ( | |
201 |
hasattr(e, |
|
201 | hasattr(e, 'branchpoints') | |
202 |
and hasattr(e, |
|
202 | and hasattr(e, 'commitid') | |
203 |
and hasattr(e, |
|
203 | and hasattr(e, 'mergepoint') | |
204 | ): |
|
204 | ): | |
205 | ui.status(_(b'ignoring old cache\n')) |
|
205 | ui.status(_(b'ignoring old cache\n')) | |
206 | oldlog = [] |
|
206 | oldlog = [] |
@@ -332,7 +332,7 b' def overridewalk(orig, self, match, subr' | |||||
332 | matchfn = match.matchfn |
|
332 | matchfn = match.matchfn | |
333 | matchalways = match.always() |
|
333 | matchalways = match.always() | |
334 | dmap = self._map |
|
334 | dmap = self._map | |
335 |
if hasattr(dmap, |
|
335 | if hasattr(dmap, '_map'): | |
336 | # for better performance, directly access the inner dirstate map if the |
|
336 | # for better performance, directly access the inner dirstate map if the | |
337 | # standard dirstate implementation is in use. |
|
337 | # standard dirstate implementation is in use. | |
338 | dmap = dmap._map |
|
338 | dmap = dmap._map | |
@@ -744,7 +744,7 b' def makedirstate(repo, dirstate):' | |||||
744 | def wrapdirstate(orig, self): |
|
744 | def wrapdirstate(orig, self): | |
745 | ds = orig(self) |
|
745 | ds = orig(self) | |
746 | # only override the dirstate when Watchman is available for the repo |
|
746 | # only override the dirstate when Watchman is available for the repo | |
747 |
if hasattr(self, |
|
747 | if hasattr(self, '_fsmonitorstate'): | |
748 | makedirstate(self, ds) |
|
748 | makedirstate(self, ds) | |
749 | return ds |
|
749 | return ds | |
750 |
|
750 | |||
@@ -811,7 +811,7 b' class state_update:' | |||||
811 | self.oldnode = self.repo[b'.'].node() |
|
811 | self.oldnode = self.repo[b'.'].node() | |
812 |
|
812 | |||
813 | if self.repo.currentwlock() is None: |
|
813 | if self.repo.currentwlock() is None: | |
814 |
if hasattr(self.repo, |
|
814 | if hasattr(self.repo, 'wlocknostateupdate'): | |
815 | self._lock = self.repo.wlocknostateupdate() |
|
815 | self._lock = self.repo.wlocknostateupdate() | |
816 | else: |
|
816 | else: | |
817 | self._lock = self.repo.wlock() |
|
817 | self._lock = self.repo.wlock() | |
@@ -839,7 +839,7 b' class state_update:' | |||||
839 | self._lock.release() |
|
839 | self._lock.release() | |
840 |
|
840 | |||
841 | def _state(self, cmd, commithash, status=b'ok'): |
|
841 | def _state(self, cmd, commithash, status=b'ok'): | |
842 |
if not hasattr(self.repo, |
|
842 | if not hasattr(self.repo, '_watchmanclient'): | |
843 | return False |
|
843 | return False | |
844 | try: |
|
844 | try: | |
845 | self.repo._watchmanclient.command( |
|
845 | self.repo._watchmanclient.command( |
@@ -415,7 +415,7 b' class baseunionstore:' | |||||
415 |
|
415 | |||
416 | def markforrefresh(self): |
|
416 | def markforrefresh(self): | |
417 | for store in self.stores: |
|
417 | for store in self.stores: | |
418 |
if hasattr(store, |
|
418 | if hasattr(store, 'markforrefresh'): | |
419 | store.markforrefresh() |
|
419 | store.markforrefresh() | |
420 |
|
420 | |||
421 | @staticmethod |
|
421 | @staticmethod |
@@ -641,7 +641,7 b' class fileserverclient:' | |||||
641 | self._lfsprefetch(fileids) |
|
641 | self._lfsprefetch(fileids) | |
642 |
|
642 | |||
643 | def _lfsprefetch(self, fileids): |
|
643 | def _lfsprefetch(self, fileids): | |
644 |
if not _lfsmod or not hasattr(self.repo.svfs, |
|
644 | if not _lfsmod or not hasattr(self.repo.svfs, 'lfslocalblobstore'): | |
645 | return |
|
645 | return | |
646 | if not _lfsmod.wrapper.candownload(self.repo): |
|
646 | if not _lfsmod.wrapper.candownload(self.repo): | |
647 | return |
|
647 | return |
General Comments 0
You need to be logged in to leave comments.
Login now