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