inotify: fix status . in repo.root
authorBrendan Cully <brendan@kublai.com>
Wed, 19 Nov 2008 13:00:48 -0800
changeset 7393 92c952c4470c
parent 7392 564326a6ef9c
child 7394 03b60f2f90bf
inotify: fix status . in repo.root
hgext/inotify/__init__.py
tests/test-inotify
tests/test-inotify.out
--- a/hgext/inotify/__init__.py	Wed Nov 19 13:27:57 2008 +0100
+++ b/hgext/inotify/__init__.py	Wed Nov 19 13:00:48 2008 -0800
@@ -52,6 +52,8 @@
 
         def status(self, match, ignored, clean, unknown=True):
             files = match.files()
+            if '.' in files:
+                files = [] 
             try:
                 if not ignored and not self.inotifyserver:
                     result = client.query(ui, repo, files, match, False,
--- a/tests/test-inotify	Wed Nov 19 13:27:57 2008 +0100
+++ b/tests/test-inotify	Wed Nov 19 13:00:48 2008 -0800
@@ -27,4 +27,12 @@
 echo % all
 hg status -A
 
+echo '% path patterns'
+echo x > dir/x
+hg status .
+hg status dir
+cd dir
+hg status .
+cd ..
+
 kill `cat hg.pid`
--- a/tests/test-inotify.out	Wed Nov 19 13:27:57 2008 +0100
+++ b/tests/test-inotify.out	Wed Nov 19 13:00:48 2008 -0800
@@ -27,3 +27,8 @@
 C dir/x
 C dir/y
 C e
+% path patterns
+M dir/x
+? hg.pid
+M dir/x
+M x