Commit Graph

139 Commits

Author SHA1 Message Date
Nicolas Dumazet
ddda9ba6fe Fixing issue1542, adding a relevant test
inotify is smart enough to notify you about any changes in a
directory, even if you only watch the directory, and none if its
contents: the recursive add_watch I added was unnecessary.

The only thing that matters here is the recursive status update on
directory deletion.

And scan() has to be called _before_ the deferred call is registered.
(race condition: depending on the times, the previous patch could
apparently fail on the provided test. It's not the case anymore.)
2009-03-26 19:01:06 +09:00
Peter Arrenbrecht
19591b6a8c cleanup: drop unused assignments 2009-03-23 13:13:06 +01:00
Brendan Cully
f24e56c3ad inotify: do not attempt to monkeypatch bundlerepos 2008-12-15 12:02:18 -08:00
Brendan Cully
e5a26bb6f6 inotify: do not complain that inotify is not running if autostart is False 2008-12-01 14:06:02 -08:00
Brendan Cully
a71cc9ee9c inotify: close most file descriptors when autostarting
Otherwise, operations that autostart while talking to an SSH repository
prevent SSH stderr from closing normally. This causes hangs at
the end of hg clone or hg pull -u.
2008-12-01 13:38:26 -08:00
Dirkjan Ochtman
d963dd0023 kill some trailing spaces 2008-11-27 16:07:13 +01:00
Brendan Cully
27542d729d inotify: remove unused imports (thanks pyflakes) 2008-11-25 18:45:08 -08:00
Brendan Cully
5a88518d14 inotify: fix status . in repo.root 2008-11-19 13:00:48 -08:00
Benoit Boissinot
f30c45529e Backed out changeset 131da9defd10 (issue1375) 2008-11-12 09:08:43 +01:00
Benoit Boissinot
e2636d353e inotify: fix replacing a folder with a file (issue1375) 2008-11-11 23:16:59 +01:00
Thomas Arendsen Hein
c6095906cc Do not abort with inotify extension enabled, but not supported by the system.
And remove the "native support is required" message which is generated at an
inappropriate location and is printed more than once when using 'hg status'.
2008-11-07 13:02:04 +01:00
Benoit Boissinot
740800636a inotify: fix bug in formatting 2008-11-02 22:44:42 +01:00
Gerard Korsten
069ac42a71 inotify: server raising an error when removing a file (issue1371)
When a file is deleted via hg rm <file> the dirstate marks the file with a
status of 'r'. The physical file has been deleted, but the inotify server
tries to do a stat on the file after it's been removed.

Patch catches the exception and correctly call updatestatus()
2008-11-01 14:05:13 +02:00
Benoit Boissinot
ea7fe6dacc remove unused variables 2008-10-28 19:25:26 +01:00
Martin Geisler
da335e4675 i18n: import _ instead of gettext 2008-10-21 17:47:49 +02:00
Matt Mackall
a74ff08b91 inotify: avoid passing potentially stale stat to update 2008-10-22 19:40:32 -05:00
Matt Mackall
e86214ec88 inotify: add debugging mode to inotify
compare inotify results with dirstate results and report any changes
return dirstate results for safety
2008-10-22 19:40:32 -05:00
Matt Mackall
38344e11c6 inotify: auto-start by default when enabled 2008-10-22 19:40:29 -05:00
Matt Mackall
7989382568 inotify: friendlier message when daemon not running 2008-10-22 17:41:41 -05:00
Benoit Boissinot
3babcafb3e inotify: fix status not showing "clean" files (issue907)
The inotify server uses 'c' for clean, not 'n'.
2008-10-18 23:06:29 +02:00
Matt Mackall
d9f96e12e7 inotify: avoid status getting out of sync
Always looking up oldstatus keeps us from failing to update our state
when we disagree with the dirstate.
2008-10-12 15:21:08 -05:00
Matt Mackall
ad08a5e361 inotify: fixup rebuilding ignore 2008-10-12 15:21:08 -05:00
Matt Mackall
84505139dc inotify: skip deactivation message 2008-10-10 11:29:57 -05:00
Matt Mackall
894d30e88b inotify: fix confusion on files in lookup state 2008-10-10 11:29:30 -05:00
Benoit Boissinot
9ceefedcef merge with -stable 2008-09-10 23:20:04 +02:00
Benoit Boissinot
bb6f34eb86 inotify: add client code for long pathname handling 2008-09-07 15:10:11 +02:00
Benoit Boissinot
6600c99d5a inotify: workaround ENAMETOOLONG by using symlinks
If we can't create the unix socket because the path is too long
we create the socket in a temporary directory and symlink it into
the repo.

Fix issue1208
2008-09-06 14:11:33 +02:00
Benoit Boissinot
5b0f8d909f inotify: deactivate inotify status on failure
workaround issue1208, add test
fix traceback handling (socket.error is a singleton in this case)
2008-09-06 12:49:20 +02:00
Benoit Boissinot
9849809bc7 inotify: fix traceback when the server has been already started 2008-09-06 12:48:52 +02:00
Benoit Boissinot
ebcbcef11c merge with -stable 2008-09-06 17:04:01 +02:00
Brendan Cully
36f1ad5346 Use relative imports in inotify.server.
Fixes an import failure I was getting under hgtk and hgweb:
*** failed to import extension inotify: 'module' object has no attribute 'inotify'
2008-08-19 15:36:03 -07:00
Martin Geisler
844699aba1 i18n: mark strings for translation in inotify extension 2008-08-31 16:12:03 +02:00
Brendan Cully
1f12aaef2f Use relative imports in inotify.server.
Fixes an import failure I was getting under hgtk and hgweb:
*** failed to import extension inotify: 'module' object has no attribute 'inotify'
2008-08-19 15:36:03 -07:00
Matt Mackall
a65ef7bc5d util: add sort helper 2008-06-27 18:28:45 -05:00
Matt Mackall
73c76dd164 repo.status: eliminate list_ 2008-06-26 14:35:50 -05:00
Matt Mackall
fb88571d19 match: remove files arg from repo.status and friends 2008-05-12 11:37:08 -05:00
Thomas Arendsen Hein
f0f68949d5 tab/space cleanup 2008-03-21 00:39:39 +01:00
Thomas Arendsen Hein
8064adc9b8 Spacing cleanup 2008-03-16 23:24:53 +01:00
Bryan O'Sullivan
08dc4f9063 Add inotify extension 2008-03-12 15:30:11 -07:00