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