Show More
@@ -73,12 +73,13 b' def reposetup(ui, repo):' | |||||
73 | if result is not None: |
|
73 | if result is not None: | |
74 | return result |
|
74 | return result | |
75 | except (OSError, socket.error), err: |
|
75 | except (OSError, socket.error), err: | |
|
76 | autostart = ui.configbool('inotify', 'autostart', True) | |||
|
77 | ||||
76 | if err[0] == errno.ECONNREFUSED: |
|
78 | if err[0] == errno.ECONNREFUSED: | |
77 | ui.warn(_('(found dead inotify server socket; ' |
|
79 | ui.warn(_('(found dead inotify server socket; ' | |
78 | 'removing it)\n')) |
|
80 | 'removing it)\n')) | |
79 | os.unlink(repo.join('inotify.sock')) |
|
81 | os.unlink(repo.join('inotify.sock')) | |
80 |
if err[0] in (errno.ECONNREFUSED, errno.ENOENT) and |
|
82 | if err[0] in (errno.ECONNREFUSED, errno.ENOENT) and autostart: | |
81 | ui.configbool('inotify', 'autostart', True): |
|
|||
82 | query = None |
|
83 | query = None | |
83 | ui.debug(_('(starting inotify server)\n')) |
|
84 | ui.debug(_('(starting inotify server)\n')) | |
84 | try: |
|
85 | try: | |
@@ -100,8 +101,9 b' def reposetup(ui, repo):' | |||||
100 | except socket.error, err: |
|
101 | except socket.error, err: | |
101 | ui.warn(_('could not talk to new inotify ' |
|
102 | ui.warn(_('could not talk to new inotify ' | |
102 | 'server: %s\n') % err[-1]) |
|
103 | 'server: %s\n') % err[-1]) | |
103 |
elif err[0] |
|
104 | elif err[0] in (errno.ECONNREFUSED, errno.ENOENT): | |
104 | ui.warn(_('(inotify server not running)\n')) |
|
105 | # silently ignore normal errors if autostart is False | |
|
106 | ui.debug(_('(inotify server not running)\n')) | |||
105 | else: |
|
107 | else: | |
106 | ui.warn(_('failed to contact inotify server: %s\n') |
|
108 | ui.warn(_('failed to contact inotify server: %s\n') | |
107 | % err[-1]) |
|
109 | % err[-1]) |
General Comments 0
You need to be logged in to leave comments.
Login now