comparison tests/test-inotify.t @ 12450:0fcdae13493b

tests: unify test-inotify
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Sep 2010 13:43:21 -0500
parents tests/test-inotify@db9d16233787
children f2719b387380
comparison
equal deleted inserted replaced
12449:fc12114dbaa5 12450:0fcdae13493b
1
2 $ "$TESTDIR/hghave" inotify || exit 80
3 $ hg init repo1
4 $ cd repo1
5 $ touch a b c d e
6 $ mkdir dir
7 $ mkdir dir/bar
8 $ touch dir/x dir/y dir/bar/foo
9 $ hg ci -Am m
10 adding a
11 adding b
12 adding c
13 adding d
14 adding dir/bar/foo
15 adding dir/x
16 adding dir/y
17 adding e
18 $ cd ..
19 $ hg clone repo1 repo2
20 updating to branch default
21 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 $ echo "[extensions]" >> $HGRCPATH
23 $ echo "inotify=" >> $HGRCPATH
24 $ cd repo2
25 $ echo b >> a
26
27 check that daemon started automatically works correctly
28 and make sure that inotify.pidfile works
29
30 $ hg --config "inotify.pidfile=../hg2.pid" status
31 M a
32
33 make sure that pidfile worked. Output should be silent.
34
35 $ kill `cat ../hg2.pid`
36 $ cd ../repo1
37
38 inserve
39
40 $ hg inserve -d --pid-file=hg.pid
41 $ cat hg.pid >> "$DAEMON_PIDS"
42
43 let the daemon finish its stuff
44
45 $ sleep 1
46
47 cannot start, already bound
48
49 $ hg inserve
50 abort: inotify-server: cannot start: socket is already bound
51 [255]
52
53 issue907
54
55 $ hg status
56 ? hg.pid
57
58 clean
59
60 $ hg status -c
61 C a
62 C b
63 C c
64 C d
65 C dir/bar/foo
66 C dir/x
67 C dir/y
68 C e
69
70 all
71
72 $ hg status -A
73 ? hg.pid
74 C a
75 C b
76 C c
77 C d
78 C dir/bar/foo
79 C dir/x
80 C dir/y
81 C e
82
83 path patterns
84
85 $ echo x > dir/x
86 $ hg status .
87 M dir/x
88 ? hg.pid
89 $ hg status dir
90 M dir/x
91 $ cd dir
92 $ hg status .
93 M x
94 $ cd ..
95
96 issue 1375
97 testing that we can remove a folder and then add a file with the same name
98 issue 1375
99
100 $ mkdir h
101 $ echo h > h/h
102 $ hg ci -Am t
103 adding h/h
104 adding hg.pid
105 $ hg rm h
106 removing h/h
107 $ echo h >h
108 $ hg add h
109 $ hg status
110 A h
111 R h/h
112 $ hg ci -m0
113
114 Test for issue1735: inotify watches files in .hg/merge
115
116 $ hg st
117 $ echo a > a
118 $ hg ci -Am a
119 $ hg st
120 $ echo b >> a
121 $ hg ci -m ab
122 $ hg st
123 $ echo c >> a
124 $ hg st
125 M a
126 $ HGMERGE=internal:local hg up 0
127 1 files updated, 1 files merged, 2 files removed, 0 files unresolved
128 $ hg st
129 M a
130 $ HGMERGE=internal:local hg up
131 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
132 $ hg st
133 M a
134
135 Test for 1844: "hg ci folder" will not commit all changes beneath "folder"
136
137 $ mkdir 1844
138 $ echo a > 1844/foo
139 $ hg add 1844
140 adding 1844/foo
141 $ hg ci -m 'working'
142 $ echo b >> 1844/foo
143 $ hg ci 1844 -m 'broken'
144
145 Test for issue884: "Build products not ignored until .hgignore is touched"
146
147 $ echo '^build$' > .hgignore
148 $ hg add .hgignore
149 $ hg ci .hgignore -m 'ignorelist'
150
151 Now, lets add some build products...
152
153 $ mkdir build
154 $ touch build/x
155 $ touch build/y
156
157 build/x & build/y shouldn't appear in "hg st"
158
159 $ hg st
160 $ kill `cat hg.pid`