Show More
@@ -0,0 +1,15 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | "$TESTDIR/hghave" inotify || exit 80 | |
|
4 | ||
|
5 | echo "[extensions]" >> $HGRCPATH | |
|
6 | echo "inotify=" >> $HGRCPATH | |
|
7 | ||
|
8 | p="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
|
9 | hg init $p | |
|
10 | cd $p | |
|
11 | ||
|
12 | echo % inserve | |
|
13 | hg inserve | |
|
14 | echo % status | |
|
15 | hg status |
@@ -0,0 +1,5 b'' | |||
|
1 | % inserve | |
|
2 | abort: AF_UNIX path too long | |
|
3 | % status | |
|
4 | failed to contact inotify server: AF_UNIX path too long | |
|
5 | deactivating inotify |
@@ -63,9 +63,8 b' def reposetup(ui, repo):' | |||
|
63 | 63 | ui.warn(_('(found dead inotify server socket; ' |
|
64 | 64 | 'removing it)\n')) |
|
65 | 65 | os.unlink(repo.join('inotify.sock')) |
|
66 |
|
|
|
67 | raise | |
|
68 | if ui.configbool('inotify', 'autostart'): | |
|
66 | if err[0] in (errno.ECONNREFUSED, errno.ENOENT) and \ | |
|
67 | ui.configbool('inotify', 'autostart'): | |
|
69 | 68 | query = None |
|
70 | 69 | ui.debug(_('(starting inotify server)\n')) |
|
71 | 70 | try: |
@@ -79,16 +78,20 b' def reposetup(ui, repo):' | |||
|
79 | 78 | except Exception, inst: |
|
80 | 79 | ui.warn(_('could not start inotify server: ' |
|
81 | 80 | '%s\n') % inst) |
|
82 | ui.print_exc() | |
|
83 | ||
|
84 | 81 | if query: |
|
85 | 82 | try: |
|
86 | 83 | return query(ui, repo, files or [], match, |
|
87 | 84 | list_ignored, list_clean, list_unknown) |
|
88 | 85 | except socket.error, err: |
|
89 | 86 | ui.warn(_('could not talk to new inotify ' |
|
90 | 'server: %s\n') % err[1]) | |
|
91 | ui.print_exc() | |
|
87 | 'server: %s\n') % err[-1]) | |
|
88 | else: | |
|
89 | ui.warn(_('failed to contact inotify server: %s\n') | |
|
90 | % err[-1]) | |
|
91 | ui.print_exc() | |
|
92 | # replace by old status function | |
|
93 | ui.warn(_('deactivating inotify\n')) | |
|
94 | self.status = super(inotifydirstate, self).status | |
|
92 | 95 | |
|
93 | 96 | return super(inotifydirstate, self).status( |
|
94 | 97 | files, match or util.always, list_ignored, list_clean, |
@@ -57,6 +57,13 b' def has_executablebit():' | |||
|
57 | 57 | finally: |
|
58 | 58 | os.remove(path) |
|
59 | 59 | |
|
60 | def has_inotify(): | |
|
61 | try: | |
|
62 | import hgext.inotify.linux.watcher | |
|
63 | return True | |
|
64 | except ImportError: | |
|
65 | return False | |
|
66 | ||
|
60 | 67 | def has_fifo(): |
|
61 | 68 | return hasattr(os, "mkfifo") |
|
62 | 69 | |
@@ -129,14 +136,15 b' checks = {' | |||
|
129 | 136 | "fifo": (has_fifo, "named pipes"), |
|
130 | 137 | "git": (has_git, "git command line client"), |
|
131 | 138 | "hotshot": (has_hotshot, "python hotshot module"), |
|
139 | "inotify": (has_inotify, "inotify extension support"), | |
|
132 | 140 | "lsprof": (has_lsprof, "python lsprof module"), |
|
133 | 141 | "mtn": (has_mtn, "monotone client (> 0.31)"), |
|
142 | "pygments": (has_pygments, "Pygments source highlighting library"), | |
|
134 | 143 | "svn": (has_svn, "subversion client and admin tools"), |
|
135 | 144 | "svn-bindings": (has_svn_bindings, "subversion python bindings"), |
|
136 | 145 | "symlink": (has_symlink, "symbolic links"), |
|
137 | 146 | "tla": (has_tla, "GNU Arch tla client"), |
|
138 | 147 | "unix-permissions": (has_unix_permissions, "unix-style permissions"), |
|
139 | "pygments": (has_pygments, "Pygments source highlighting library"), | |
|
140 | 148 | } |
|
141 | 149 | |
|
142 | 150 | def list_features(): |
General Comments 0
You need to be logged in to leave comments.
Login now