##// END OF EJS Templates
worker: add basic test to ensure child processes are managed well...
Yuya Nishihara -
r31117:92bca123 stable
parent child Browse files
Show More
@@ -1,58 +1,92 b''
1 $ hg init test
1 $ hg init test
2 $ cd test
2 $ cd test
3 $ echo foo>foo
3 $ echo foo>foo
4 $ hg addremove
4 $ hg addremove
5 adding foo
5 adding foo
6 $ hg commit -m "1"
6 $ hg commit -m "1"
7
7
8 $ hg verify
8 $ hg verify
9 checking changesets
9 checking changesets
10 checking manifests
10 checking manifests
11 crosschecking files in changesets and manifests
11 crosschecking files in changesets and manifests
12 checking files
12 checking files
13 1 files, 1 changesets, 1 total revisions
13 1 files, 1 changesets, 1 total revisions
14
14
15 $ hg clone . ../branch
15 $ hg clone . ../branch
16 updating to branch default
16 updating to branch default
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 $ cd ../branch
18 $ cd ../branch
19 $ hg co
19 $ hg co
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 $ echo bar>>foo
21 $ echo bar>>foo
22 $ hg commit -m "2"
22 $ hg commit -m "2"
23
23
24 $ cd ../test
24 $ cd ../test
25
25
26 $ hg pull ../branch
26 $ hg pull ../branch
27 pulling from ../branch
27 pulling from ../branch
28 searching for changes
28 searching for changes
29 adding changesets
29 adding changesets
30 adding manifests
30 adding manifests
31 adding file changes
31 adding file changes
32 added 1 changesets with 1 changes to 1 files
32 added 1 changesets with 1 changes to 1 files
33 (run 'hg update' to get a working copy)
33 (run 'hg update' to get a working copy)
34
34
35 $ hg verify
35 $ hg verify
36 checking changesets
36 checking changesets
37 checking manifests
37 checking manifests
38 crosschecking files in changesets and manifests
38 crosschecking files in changesets and manifests
39 checking files
39 checking files
40 1 files, 2 changesets, 2 total revisions
40 1 files, 2 changesets, 2 total revisions
41
41
42 $ hg co
42 $ hg co
43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
44
44
45 $ cat foo
45 $ cat foo
46 foo
46 foo
47 bar
47 bar
48
48
49 $ hg manifest --debug
49 $ hg manifest --debug
50 6f4310b00b9a147241b071a60c28a650827fb03d 644 foo
50 6f4310b00b9a147241b071a60c28a650827fb03d 644 foo
51
51
52 update to rev 0 with a date
52 update to rev 0 with a date
53
53
54 $ hg upd -d foo 0
54 $ hg upd -d foo 0
55 abort: you can't specify a revision and a date
55 abort: you can't specify a revision and a date
56 [255]
56 [255]
57
57
58 $ cd ..
58 $ cd ..
59
60 update with worker processes
61
62 #if no-windows
63
64 $ cat <<EOF > forceworker.py
65 > from mercurial import extensions, worker
66 > def nocost(orig, ui, costperop, nops):
67 > return worker._numworkers(ui) > 1
68 > def uisetup(ui):
69 > extensions.wrapfunction(worker, 'worthwhile', nocost)
70 > EOF
71
72 $ hg init worker
73 $ cd worker
74 $ cat <<EOF >> .hg/hgrc
75 > [extensions]
76 > forceworker = $TESTTMP/forceworker.py
77 > [worker]
78 > numcpus = 4
79 > EOF
80 $ for i in `python $TESTDIR/seq.py 1 100`; do
81 > echo $i > $i
82 > done
83 $ hg ci -qAm 'add 100 files'
84
85 $ hg update null
86 0 files updated, 0 files merged, 100 files removed, 0 files unresolved
87 $ hg update
88 100 files updated, 0 files merged, 0 files removed, 0 files unresolved
89
90 $ cd ..
91
92 #endif
General Comments 0
You need to be logged in to leave comments. Login now