##// END OF EJS Templates
inotify: Simplifying init code...
Nicolas Dumazet -
r8068:389e2820 default
parent child Browse files
Show More
@@ -80,23 +80,21 b' def reposetup(ui, repo):'
80 80 'removing it)\n'))
81 81 os.unlink(repo.join('inotify.sock'))
82 82 if err[0] in (errno.ECONNREFUSED, errno.ENOENT) and autostart:
83 query = None
84 83 ui.debug(_('(starting inotify server)\n'))
85 84 try:
86 85 try:
87 86 server.start(ui, repo)
88 query = client.query
89 87 except server.AlreadyStartedException, inst:
90 88 # another process may have started its own
91 89 # inotify server while this one was starting.
92 90 ui.debug(str(inst))
93 query = client.query
94 91 except Exception, inst:
95 92 ui.warn(_('could not start inotify server: '
96 93 '%s\n') % inst)
97 if query:
94 else:
95 # server is started, send query again
98 96 try:
99 return query(ui, repo, files, match,
97 return client.query(ui, repo, files, match,
100 98 ignored, clean, unknown)
101 99 except socket.error, err:
102 100 ui.warn(_('could not talk to new inotify '
General Comments 0
You need to be logged in to leave comments. Login now