##// 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 1 $ hg init test
2 2 $ cd test
3 3 $ echo foo>foo
4 4 $ hg addremove
5 5 adding foo
6 6 $ hg commit -m "1"
7 7
8 8 $ hg verify
9 9 checking changesets
10 10 checking manifests
11 11 crosschecking files in changesets and manifests
12 12 checking files
13 13 1 files, 1 changesets, 1 total revisions
14 14
15 15 $ hg clone . ../branch
16 16 updating to branch default
17 17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 18 $ cd ../branch
19 19 $ hg co
20 20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 21 $ echo bar>>foo
22 22 $ hg commit -m "2"
23 23
24 24 $ cd ../test
25 25
26 26 $ hg pull ../branch
27 27 pulling from ../branch
28 28 searching for changes
29 29 adding changesets
30 30 adding manifests
31 31 adding file changes
32 32 added 1 changesets with 1 changes to 1 files
33 33 (run 'hg update' to get a working copy)
34 34
35 35 $ hg verify
36 36 checking changesets
37 37 checking manifests
38 38 crosschecking files in changesets and manifests
39 39 checking files
40 40 1 files, 2 changesets, 2 total revisions
41 41
42 42 $ hg co
43 43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 44
45 45 $ cat foo
46 46 foo
47 47 bar
48 48
49 49 $ hg manifest --debug
50 50 6f4310b00b9a147241b071a60c28a650827fb03d 644 foo
51 51
52 52 update to rev 0 with a date
53 53
54 54 $ hg upd -d foo 0
55 55 abort: you can't specify a revision and a date
56 56 [255]
57 57
58 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