From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#26126: 26.0.50; file-notify-rm-watch removes arbitrary watches Date: Fri, 24 Mar 2017 21:44:28 +0100 Message-ID: <877f3el80j.fsf@luca> References: <87r31x9ulw.fsf@luca> <87shmcney8.fsf@detlef> <87efxw7xvc.fsf@luca> <87mvcjophx.fsf@detlef> <87tw6rssoi.fsf@luca> <87pohfkmvh.fsf@detlef> <87lgs2sobr.fsf@luca> <87y3w2gywc.fsf@detlef> <8737e8excq.fsf@luca> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1490388325 32235 195.159.176.226 (24 Mar 2017 20:45:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Mar 2017 20:45:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 26126@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 24 21:45:20 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crW57-0006wb-4W for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Mar 2017 21:45:09 +0100 Original-Received: from localhost ([::1]:34896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crW5D-0008Gq-1e for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Mar 2017 16:45:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1crW56-0008EI-3g for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2017 16:45:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1crW51-0005iy-5A for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2017 16:45:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44650) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1crW50-0005is-Oq for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2017 16:45:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1crW50-0000cd-IH for bug-gnu-emacs@gnu.org; Fri, 24 Mar 2017 16:45:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87r31x9ulw.fsf@luca> Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Mar 2017 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 26126-submit@debbugs.gnu.org id=B26126.14903882922360 (code B ref 26126); Fri, 24 Mar 2017 20:45:02 +0000 Original-Received: (at 26126) by debbugs.gnu.org; 24 Mar 2017 20:44:52 +0000 Original-Received: from localhost ([127.0.0.1]:42849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crW4p-0000bz-JY for submit@debbugs.gnu.org; Fri, 24 Mar 2017 16:44:51 -0400 Original-Received: from gateway-a.fh-trier.de ([143.93.54.181]:37147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crW4m-0000bl-Tv for 26126@debbugs.gnu.org; Fri, 24 Mar 2017 16:44:50 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier (RZ/HT)] Original-Received: from localhost (ip5f5bdecf.dynamic.kabel-deutschland.de [95.91.222.207]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-a.fh-trier.de (Postfix) with ESMTPSA id 6CE8B179B342; Fri, 24 Mar 2017 21:44:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=simple/simple; d=hochschule-trier.de; s=default; t=1490388270; bh=5pbOZz8pIVgK4r8c8IAU+LAsdyg=; h=From:To:Cc:Subject:References:Date:Message-ID:MIME-Version: Content-Type; b=VxrLMcGr/KcLlkF4dcbJZaYVBT5pCGGRMfHzbxuscLue5eBuAn5C9r8TIVoztvcE8 QwdZWaBKhGb5etCiPEkPXRy8f1N6VGVSImTIokIDq5JfcdyzvvQQceGUCiuXlJ0Fnc PujontbwvwZHZTV4vgqMaCEYcTQbf9YcNbZzP+8c= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:130893 Archived-At: --=-=-= Content-Type: text/plain Hey ! Below is a second version of the previous patch. It is somewhat conservative, since neither did I attempt to + further simplify filenotify.el nor + handle differing masks in inotify.c . -- I also thought about the test-cases and more generally about how to develop a specification for this library, i.e. how do we want this to behave. Do we have the desire that it works uniformly across all participating back-ends ? And is that even possible ? I think it is to easy to adapt the tests for each back-end, until they succeed and thereby potentially masking actual bugs. One way to go about this would be to write a series of definitive unit-tests which specify the intended behavior. Then, allow them to fail for a specific back-end, until someone has fixed potential bugs for it and confirmed that the test succeeds. This would allow for an incremental improvement on fairly solid grounds. I'm assuming that people of the future are interested in improving their used back-end (e.g. make kqueue watch directories properly, if that is possible). Anyway, I was bored today, so I took a look at what events these libraries actually produce, the result of which you may also find below. Finally, I'm tempted to suggest to get rid of the flags argument of file-notify-add-watch. As it is, things are already complicated enough and we don't seem to have many people working on this. I think we could make it backward-compatible to a certain degree. Note also, that many file operations trigger both kinds of events anyway. -- --=-=-= Content-Type: test/x-patch Content-Disposition: inline Content-Transfer-Encoding: base64 Content-Description: A patch ZGlmZiAtLWdpdCBhL2RvYy9saXNwcmVmL29zLnRleGkgYi9kb2MvbGlzcHJlZi9vcy50ZXhpCmlu ZGV4IDliNjc1MmM1ZTEuLjRmN2Q0NzMwNWYgMTAwNjQ0Ci0tLSBhL2RvYy9saXNwcmVmL29zLnRl eGkKKysrIGIvZG9jL2xpc3ByZWYvb3MudGV4aQpAQCAtMjcwNyw3ICsyNzA3LDcgQEAgRmlsZSBO b3RpZmljYXRpb25zCiAKIFNpbmNlIGFsbCB0aGVzZSBsaWJyYXJpZXMgZW1pdCBkaWZmZXJlbnQg ZXZlbnRzIG9uIG5vdGlmaWVkIGZpbGUKIGNoYW5nZXMsIHRoZXJlIGlzIHRoZSBFbWFjcyBsaWJy YXJ5IEBjb2Rle2ZpbGVub3RpZnl9IHdoaWNoIHByb3ZpZGVzIGEKLXVuaXF1ZSBpbnRlcmZhY2Uu Cit1bmlmaWVkIGludGVyZmFjZS4KIAogQGRlZnVuIGZpbGUtbm90aWZ5LWFkZC13YXRjaCBmaWxl IGZsYWdzIGNhbGxiYWNrCiBBZGQgYSB3YXRjaCBmb3IgZmlsZXN5c3RlbSBldmVudHMgcGVydGFp bmluZyB0byBAdmFye2ZpbGV9LiAgVGhpcwpkaWZmIC0tZ2l0IGEvbGlzcC9maWxlbm90aWZ5LmVs IGIvbGlzcC9maWxlbm90aWZ5LmVsCmluZGV4IDdlYjYyMjk5NzYuLjVkZWE2N2I1ODAgMTAwNjQ0 Ci0tLSBhL2xpc3AvZmlsZW5vdGlmeS5lbAorKysgYi9saXNwL2ZpbGV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WZ1biBmaWxlLW5vdGlmeS1j YWxsYmFjayAoZXZlbnQpCkBAIC0yMjMsMTEgKzIyMCw3IEBAIGZpbGUtbm90aWZ5LWNhbGxiYWNr CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2FyIGZpbGUtbm90aWZ5LS1wZW5kaW5n LWV2ZW50KSkpCiAgICAgICAgICAgICAgICAgICA7OyBJZiB0aGUgc291cmNlIGlzIGhhbmRsZWQg YnkgYW5vdGhlciB3YXRjaCwgd2UKICAgICAgICAgICAgICAgICAgIDs7IG11c3QgZmlyZSB0aGUg cmVuYW1lIGV2ZW50IHRoZXJlIGFzIHdlbGwuCi0gICAgICAgICAgICAgICAgICAod2hlbiAobm90 IChlcXVhbCAoZmlsZS1ub3RpZnktLWRlc2NyaXB0b3IgZGVzYyBmaWxlMSkKLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChmaWxlLW5vdGlmeS0tZGVzY3JpcHRvcgotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjYWFyIGZpbGUtbm90aWZ5LS1wZW5kaW5n LWV2ZW50KQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmaWxlLW5vdGlm eS0tZXZlbnQtZmlsZS1uYW1lCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGZpbGUtbm90aWZ5LS1wZW5kaW5nLWV2ZW50KSkpKQorICAgICAgICAgICAgICAgICAgKHVubGVz cyAoZXF1YWwgZGVzYyAoY2FhciBmaWxlLW5vdGlmeS0tcGVuZGluZy1ldmVudCkpCiAgICAgICAg ICAgICAgICAgICAgIChzZXRxIHBlbmRpbmctZXZlbnQKICAgICAgICAgICAgICAgICAgICAgICAg ICAgYCgoLChjYWFyIGZpbGUtbm90aWZ5LS1wZW5kaW5nLWV2ZW50KQogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICByZW5hbWVkICxmaWxlICxmaWxlMSkKQEAgLTIzNywxMSArMj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rlc2NyaXB0b3IgKExpc3BfT2JqZWN0IGRlc2NyaXB0b3Is IGJvb2wgaW52YWxpZF9wKQoreworICBMaXNwX09iamVjdCBlbHQgPSBGYXNzb2MgKGRlc2NyaXB0 b3IsIHdhdGNoX2xpc3QpOworCisgIGlmICghIE5JTFAgKGVsdCkpCisgICAgeworICAgICAgaW50 IHdkID0gWElOVCAoZGVzY3JpcHRvcik7CisKKyAgICAgIHdhdGNoX2xpc3QgPSBGZGVsZXRlIChl bHQsIHdhdGNoX2xpc3QpOworICAgICAgaWYgKCEgaW52YWxpZF9wKQorICAgICAgICBpZiAoaW5v dGlmeV9ybV93YXRjaCAoaW5vdGlmeWZkLCB3ZCkgPT0gLTEpCisgICAgICAgICAgcmVwb3J0X2Zp bGVfbm90aWZ5X2Vycm9yICgiQ291bGQgbm90IHJtIHdhdGNoIiwgZGVzY3JpcHRvcik7CisgICAg fQorICAvKiBDbGVhbnVwIGlmIG5vIG1vcmUgZmlsZXMgYXJlIHdhdGNoZWQuICAqLworICBpZiAo TklMUCAod2F0Y2hfbGlzdCkpCisgICAgeworICAgICAgZW1hY3NfY2xvc2UgKGlub3RpZnlmZCk7 CisgICAgICBkZWxldGVfcmVhZF9mZCAoaW5vdGlmeWZkKTsKKyAgICAgIGlub3RpZnlmZCA9IC0x OworICAgIH0KK30KKworLyogIFJlbW92ZSB3YXRjaCBhc3NvY2lhdGVkIHdpdGggKGRlc2NyaXB0 b3IsIGlkKS4gKi8KK3N0YXRpYyB2b2lkCityZW1vdmVfd2F0Y2ggKExpc3BfT2JqZWN0IGRlc2Ny aXB0b3IsIExpc3BfT2JqZWN0IGlkKQoreworICBMaXNwX09iamVjdCBlbHQgPSBGYXNzb2MgKGRl c2NyaXB0b3IsIHdhdGNoX2xpc3QpOworCisgIGlmICghIE5JTFAgKGVsdCkpCisgICAgeworICAg ICAgTGlzcF9PYmplY3Qgd2F0Y2ggPSBGYXNzb2MgKGlkLCBYQ0RSIChlbHQpKTsKKworICAgICAg aWY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EZhc3NvYyAo bWFrZV93YXRjaF9kZXNjcmlwdG9yIChldi0+d2QpLCB3YXRjaF9saXN0KTsKLSAgICAgIGlmICgh TklMUCAod2F0Y2hfb2JqZWN0KSkKKyAgICAgIGlmICghIE5JTFAgKGVsdCkpCiAgICAgICAgIHsK LSAgICAgICAgICBldmVudC5hcmcgPSBpbm90aWZ5ZXZlbnRfdG9fZXZlbnQgKHdhdGNoX29iamVj dCwgZXYpOwotCisgICAgICAgICAgTGlzcF9PYmplY3Qgd2F0Y2hlcyA9IFhDRFIgKGVsdCk7Cisg ICAgICAgICAgd2hpbGUgKCEgTklMUCAod2F0Y2hlcykpCisgICAgICAgICAgICB7CisgICAgICAg ICAgICAgIGV2ZW50LmFyZyA9IGlub3RpZnlldmVudF90b19ldmVudCAoWENBUiAod2F0Y2hlcyks IGV2KTsKKyAgICAgICAgICAgICAgaWYgKCFOSUxQIChldmVudC5hcmcpKQorICAgICAgICAgICAg ICAgIGtiZF9idWZmZXJfc3RvcmVfZXZlbnQgKCZldmVudCk7CisgICAgICAgICAgICAgIHdhdGNo ZXMgPSBYQ0RSICh3YXRjaGVzKTsKKyAgICAgICAgICAgIH0KICAgICAgICAgICAvKiBJZiBldmVu dCB3YXMgcmVtb3ZlZCBhdXRvbWF0aWNhbGx5OiBEcm9wIGl0IGZyb20gd2F0Y2ggbGlzdC4gICov CiAgICAgICAgICAgaWYgKGV2LT5tYXNrICYgSU5fSUdOT1JFRCkKLSAgICAgICAgICAgIHdhdGNo X2xpc3QgPSBGZGVsZXRlICh3YXRjaF9vYmplY3QsIHdhdGNoX2xpc3QpOwotCi0JICBpZiAoIU5J TFAgKGV2ZW50LmFyZykpCi0JICAgIGtiZF9idWZmZXJfc3RvcmVfZXZlbnQgKCZldmVudCk7Cisg ICAgICAgICAgICByZW1vdmVfZGVzY3JpcHRvciAoZGVzY3JpcHRvciwgdHJ1ZSk7CiAgICAgICAg IH0KLQogICAgICAgaSArPSBzaXplb2YgKCpldikgKyBldi0+bG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pbDsKK30KKworI2lmZGVmIElOT1RJRllfREVCVUcKK0RFRlVOICgiaW5vdGlm eS13YXRjaC1saXN0IiwgRmlub3RpZnlfd2F0Y2hfbGlzdCwgU2lub3RpZnlfd2F0Y2hfbGlzdCwg MCwgMCwgMCwKKyAgICAgICBkb2M6IC8qIFJldHVybiBhIGNvcHkgb2YgdGhlIGludGVybmFsIHdh dGNoX2xpc3QuICovKQoreworICByZXR1cm4gRmNvcHlfc2VxdWVuY2UgKHdhdGNoX2xpc3QpOwog fQogCitERUZVTiAoImlub3RpZnktYWxsb2NhdGVkLXAiLCBGaW5vdGlmeV9hbGxvY2F0ZWRfcCwg U2lub3RpZnlfYWxsb2NhdGVkX3AsIDAsIDAsIDAsCisgICAgICAgZG9jOiAvKiBSZXR1cm4gbm9u LW5pbCwgaWYgYSBpbm90aWZ5IGluc3RhbmNlIGlzIGFsbG9jYXRlZC4gKi8pCit7CisgIHJldHVy biBpbm90aWZ5ZmQgPCAwID8gUW5pbCA6IFF0OworfQorI2VuZGlmCisKIHZvaWQKIHN5bXNfb2Zf aW5vdGlmeSAodm9pZCkKIHsKQEAgLTQxNCw2ICs0OTMsMTAgQEAgc3ltc19vZl9pbm90aWZ5ICh2 b2lkKQogICBkZWZzdWJyICgmU2lub3RpZnlfcm1fd2F0Y2gpOwogICBkZWZzdWJyICgmU2lub3Rp ZnlfdmFsaWRfcCk7CiAKKyNpZmRlZiBJTk9USUZZX0RFQlVHCisgIGRlZnN1YnIgKCZTaW5vdGlm eV93YXRjaF9saXN0KTsKKyAgZGVmc3ViciAoJlNpbm90aWZ5X2FsbG9jYXRlZF9wKTsKKyNlbmRp ZgogICBzdGF0aWNwcm8gKCZ3YXRjaF9saXN0KTsKIAogICBGcHJvdmlkZSAoaW50ZXJuX2Nfc3Ry aW5nICgiaW5vdGlmeSIpLCBRbmlsKTsK --=-=-= Content-Type: text/plain -- --=-=-= Content-Type: text/plain Content-Disposition: inline Content-Description: filenotify as is inotify w32notify kqueue gfilenotify gvfs-monitor-dir inotifywait ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- file-create file created file created file skipped created file created file created file deleted file deleted file deleted file attr-changed file attr-changed file stopped file stopped file stopped file deleted file deleted file stopped file stopped file ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- file-read file deleted file deleted file deleted file deleted file deleted file deleted file stopped file stopped file stopped file stopped file stopped file stopped file ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- file-write file changed file changed file attr-changed file changed file changed file changed file deleted file changed file changed file changed file changed file changed file stopped file deleted file deleted file deleted file attr-changed file attr-changed file stopped file stopped file stopped file deleted file deleted file stopped file stopped file ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- file-attrib file attr-changed file changed file attr-changed file attr-changed file attr-changed file attr-changed file deleted file deleted file deleted file deleted file deleted file deleted file stopped file stopped file stopped file stopped file stopped file stopped file ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- file-rename dir renamed dir/src dir/dest deleted dir/dest deleted dir renamed dir/src dir/dest renamed dir/src dir/dest renamed dir/src dir/dest created dir/dest renamed dir/src dir/dest stopped dir deleted dir/dest attr-changed dir/dest attr-changed dir/dest deleted dir/dest timedout 12 deleted dir attr-changed dir/dest attr-changed dir/dest deleted dir stopped dir stopped dir deleted dir/dest deleted dir/dest stopped dir deleted dir deleted dir stopped dir stopped dir dir/src deleted dir timedout 12 deleted dir/src renamed dir/src dir/dest renamed dir/src dir/dest renamed dir/src dir/dest stopped dir/src stopped dir/src stopped dir/src stopped dir/src stopped dir/src stopped dir/src deleted dir/src dir/dest renamed dir/src dir/dest deleted dir/dest deleted dir/dest renamed dir/src dir/dest renamed dir/src dir/dest renamed dir/src dir/dest deleted dir/dest stopped dir/dest stopped dir/dest deleted dir/dest attr-changed dir/dest attr-changed dir/dest stopped dir/dest stopped dir/dest attr-changed dir/dest attr-changed dir/dest deleted dir/dest deleted dir/dest stopped dir/dest stopped dir/dest ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- dir-create dir created dir created dir skipped created dir created dir created anon-1 deleted dir deleted dir deleted dir deleted dir deleted anon-1 stopped dir stopped dir stopped dir stopped dir timedout 12 stopped dir ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- dir-read dir deleted dir timedout 12 deleted dir deleted dir deleted dir deleted dir stopped dir stopped dir stopped dir stopped dir stopped dir stopped dir ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- dir-create-file dir deleted dir/file deleted dir/file deleted dir deleted dir/file deleted dir/file deleted dir/file deleted dir timedout 12 stopped dir deleted dir deleted dir deleted dir stopped dir stopped dir stopped dir stopped dir stopped dir dir/file deleted dir/file deleted dir/file deleted dir/file deleted dir/file deleted dir/file deleted dir/file stopped dir/file stopped dir/file stopped dir/file stopped dir/file stopped dir/file stopped dir/file ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- dir-create-dir dir deleted dir/dir deleted dir/dir deleted dir deleted dir/dir deleted dir/dir deleted dir deleted dir timedout 12 stopped dir deleted dir deleted dir stopped dir stopped dir stopped dir stopped dir stopped dir dir/dir deleted dir/dir timedout 12 deleted dir/dir deleted dir/dir deleted dir/dir deleted dir/dir stopped dir/dir stopped dir/dir stopped dir/dir stopped dir/dir stopped dir/dir stopped dir/dir ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- dir-attrib dir attr-changed dir timedout 12 attr-changed dir attr-changed dir attr-changed dir attr-changed dir deleted dir stopped dir deleted dir deleted dir deleted dir deleted dir stopped dir stopped dir stopped dir stopped dir stopped dir ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- dir-rename dir renamed dir/src dir/dest deleted dir/src skipped renamed dir/src dir/dest deleted dir/src renamed dir anon-1 deleted dir timedout 12 deleted dir deleted dir deleted dir stopped dir stopped dir stopped dir stopped dir stopped dir dir/src deleted dir/src timedout 12 skipped deleted dir/src deleted dir/src deleted dir/src stopped dir/src stopped dir/src stopped dir/src stopped dir/src stopped dir/src dir/dest renamed dir/src dir/dest created dir/dest skipped created dir/dest created dir/dest attr-changed anon-1 deleted dir/dest deleted dir/dest deleted dir/dest attr-changed dir/dest attr-changed anon-1 stopped dir/dest stopped dir/dest stopped dir/dest attr-changed dir/dest deleted anon-1 deleted dir/dest deleted anon-1 stopped dir/dest timedout 12 stopped dir/dest ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ;; Local Variables: ;; truncate-lines: t ;; End: --=-=-= Content-Type: text/plain -ap --=-=-=--