##// END OF EJS Templates
inotify: set a flag so a failed inotify query doesn't get repeated....
Nicolas Dumazet -
r8556:f5fae700 default
parent child Browse files
Show More
@@ -63,17 +63,24 b' def reposetup(ui, repo):'
63 # to recurse.
63 # to recurse.
64 inotifyserver = False
64 inotifyserver = False
65
65
66 # We'll set this to false after an unsuccessful attempt so that
67 # next calls of status() within the same instance don't try again
68 # to start an inotify server if it won't start.
69 _inotifyon = True
70
66 def status(self, match, ignored, clean, unknown=True):
71 def status(self, match, ignored, clean, unknown=True):
67 files = match.files()
72 files = match.files()
68 if '.' in files:
73 if '.' in files:
69 files = []
74 files = []
70 if not ignored and not self.inotifyserver:
75 if self._inotifyon and not ignored and not self.inotifyserver:
71 cli = client(ui, repo)
76 cli = client(ui, repo)
72 try:
77 try:
73 result = cli.statusquery(files, match, False,
78 result = cli.statusquery(files, match, False,
74 clean, unknown)
79 clean, unknown)
75 except QueryFailed, instr:
80 except QueryFailed, instr:
76 ui.debug(str(instr))
81 ui.debug(str(instr))
82 # don't retry within the same hg instance
83 inotifydirstate._inotifyon = False
77 pass
84 pass
78 else:
85 else:
79 if ui.config('inotify', 'debug'):
86 if ui.config('inotify', 'debug'):
General Comments 0
You need to be logged in to leave comments. Login now