Mercurial > hg
annotate tests/test-simple-update.t @ 49762:c4d587fa161c
peer: pass the `path` to the statichttp peer
We now have all peer able to receive and store a `path` object. Hooray.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 02 Dec 2022 19:34:01 +0100 |
parents | 8d72e29ad1e0 |
children | 2f2682f40ea0 |
rev | line source |
---|---|
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
12365
diff
changeset
|
1 $ hg init test |
12279 | 2 $ cd test |
3 $ echo foo>foo | |
4 $ hg addremove | |
5 adding foo | |
6 $ hg commit -m "1" | |
331 | 7 |
12279 | 8 $ hg verify |
9 checking changesets | |
10 checking manifests | |
11 crosschecking files in changesets and manifests | |
12 checking files | |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
38731
diff
changeset
|
13 checked 1 changesets with 1 changes to 1 files |
12279 | 14 |
15 $ hg clone . ../branch | |
16 updating to branch default | |
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 $ cd ../branch | |
19 $ hg co | |
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
21 $ echo bar>>foo | |
45456
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
22 $ hg commit -m "2" -d '1 0' |
331 | 23 |
12279 | 24 $ cd ../test |
25 | |
26 $ hg pull ../branch | |
27 pulling from ../branch | |
28 searching for changes | |
29 adding changesets | |
30 adding manifests | |
31 adding file changes | |
32 added 1 changesets with 1 changes to 1 files | |
45456
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
33 new changesets 84b9316f7b31 |
38250
d0abd7949ea3
phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net>
parents:
38249
diff
changeset
|
34 1 local changesets published |
12279 | 35 (run 'hg update' to get a working copy) |
331 | 36 |
12279 | 37 $ hg verify |
38 checking changesets | |
39 checking manifests | |
40 crosschecking files in changesets and manifests | |
41 checking files | |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
38731
diff
changeset
|
42 checked 2 changesets with 2 changes to 1 files |
12279 | 43 |
44 $ hg co | |
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
46 | |
47 $ cat foo | |
48 foo | |
49 bar | |
50 | |
51 $ hg manifest --debug | |
52 6f4310b00b9a147241b071a60c28a650827fb03d 644 foo | |
53 | |
13960
190e5f2043d9
update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents:
13956
diff
changeset
|
54 update to rev 0 with a date |
190e5f2043d9
update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents:
13956
diff
changeset
|
55 |
190e5f2043d9
update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents:
13956
diff
changeset
|
56 $ hg upd -d foo 0 |
190e5f2043d9
update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents:
13956
diff
changeset
|
57 abort: you can't specify a revision and a date |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45456
diff
changeset
|
58 [10] |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
13960
diff
changeset
|
59 |
45456
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
60 update by date |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
61 |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
62 $ hg update -d '<1970-01-01 00:00:02 +0000' |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
63 found revision 1 from Thu Jan 01 00:00:01 1970 +0000 |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
64 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
65 $ hg update -d '<1970-01-01 00:00:01 +0000' |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
66 found revision 1 from Thu Jan 01 00:00:01 1970 +0000 |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
67 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
68 $ hg update -d '<1970-01-01 00:00:00 +0000' |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
69 found revision 0 from Thu Jan 01 00:00:00 1970 +0000 |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
70 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
71 |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
72 $ hg update -d '>1970-01-01 00:00:02 +0000' |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
73 abort: revision matching date not found |
45827
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45456
diff
changeset
|
74 [10] |
45456
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
75 $ hg update -d '>1970-01-01 00:00:01 +0000' |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
76 found revision 1 from Thu Jan 01 00:00:01 1970 +0000 |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
77 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
78 $ hg update -d '>1970-01-01 00:00:00 +0000' |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
79 found revision 1 from Thu Jan 01 00:00:01 1970 +0000 |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
80 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
81 |
41020
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
82 update to default destination (with empty revspec) |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
83 |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
84 $ hg update -q null |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
85 $ hg update |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
86 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
87 $ hg id |
45456
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
88 84b9316f7b31 tip |
41020
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
89 |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
90 $ hg update -q null |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
91 $ hg update -r '' |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
93 $ hg id |
45456
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
94 84b9316f7b31 tip |
41020
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
95 |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
96 $ hg update -q null |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
97 $ hg update '' |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
98 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
99 $ hg id |
45456
65960fe9a769
test-simple-update: add test for -d DATE option
Yuya Nishihara <yuya@tcha.org>
parents:
42522
diff
changeset
|
100 84b9316f7b31 tip |
41020
fbd5e2f0bba7
update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents:
39707
diff
changeset
|
101 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
13960
diff
changeset
|
102 $ cd .. |
31117
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
103 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
104 update with worker processes |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
105 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
106 #if no-windows |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
107 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
108 $ cat <<EOF > forceworker.py |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
109 > from mercurial import extensions, worker |
38731
ef3838a47503
worker: ability to disable thread unsafe tasks
Gregory Szorc <gregory.szorc@gmail.com>
parents:
38250
diff
changeset
|
110 > def nocost(orig, ui, costperop, nops, threadsafe=True): |
31117
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
111 > return worker._numworkers(ui) > 1 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
112 > def uisetup(ui): |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
113 > extensions.wrapfunction(worker, 'worthwhile', nocost) |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
114 > EOF |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
115 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
116 $ hg init worker |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
117 $ cd worker |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
118 $ cat <<EOF >> .hg/hgrc |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
119 > [extensions] |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
120 > forceworker = $TESTTMP/forceworker.py |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
121 > [worker] |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
122 > numcpus = 4 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
123 > EOF |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
39489
diff
changeset
|
124 $ for i in `"$PYTHON" $TESTDIR/seq.py 1 100`; do |
31117
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
125 > echo $i > $i |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
126 > done |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
127 $ hg ci -qAm 'add 100 files' |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
128 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
129 $ hg update null |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
130 0 files updated, 0 files merged, 100 files removed, 0 files unresolved |
31118
a91c62752d08
worker: flush messages written by child processes before exit
Yuya Nishihara <yuya@tcha.org>
parents:
31117
diff
changeset
|
131 $ hg update -v | grep 100 |
a91c62752d08
worker: flush messages written by child processes before exit
Yuya Nishihara <yuya@tcha.org>
parents:
31117
diff
changeset
|
132 getting 100 |
31117
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
133 100 files updated, 0 files merged, 0 files removed, 0 files unresolved |
42521
64a873ca7135
tests: show bug in update introduced in 87a34c767384
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
41020
diff
changeset
|
134 $ hg status |
31117
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
135 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
136 $ cd .. |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
137 |
92bca12328d1
worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents:
16913
diff
changeset
|
138 #endif |