annotate tests/test-simple-update.t @ 41667:8fa1a5fb8a28

largefiles: get cwd and relative paths from repo instead of matcher As far as I can tell, the matcher returned from matchandpats() got its cwd from the context object, which in turn got it from the repo, so this should be equivalent. Differential Revision: https://phab.mercurial-scm.org/D5922
author Martin von Zweigbergk <martinvonz@google.com>
date Sat, 09 Feb 2019 16:43:20 -0800
parents fbd5e2f0bba7
children 64a873ca7135
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 12365
diff changeset
1 $ hg init test
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
2 $ cd test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
3 $ echo foo>foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
4 $ hg addremove
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
5 adding foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
6 $ hg commit -m "1"
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
8 $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
9 checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
10 checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
11 crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
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
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
14
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
15 $ hg clone . ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
16 updating to branch default
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
18 $ cd ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
19 $ hg co
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
20 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
21 $ echo bar>>foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
22 $ hg commit -m "2"
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
23
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
24 $ cd ../test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
25
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
26 $ hg pull ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
27 pulling from ../branch
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
28 searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
29 adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
30 adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
31 adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
32 added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 32940
diff changeset
33 new changesets 30aff43faee1
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
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
35 (run 'hg update' to get a working copy)
331
55f63f3b6a54 Add a simple testing framework
mpm@selenic.com
parents:
diff changeset
36
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
37 $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
38 checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
39 checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
40 crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
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
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
43
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
44 $ hg co
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
46
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
47 $ cat foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
48 foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
49 bar
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
50
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
51 $ hg manifest --debug
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
52 6f4310b00b9a147241b071a60c28a650827fb03d 644 foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3736
diff changeset
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
190e5f2043d9 update: fix check for no rev when a date is given
Idan Kamara <idankk86@gmail.com>
parents: 13956
diff changeset
58 [255]
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13960
diff changeset
59
41020
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
60 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
61
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
62 $ 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
63 $ hg update
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
64 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
65 $ hg id
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
66 30aff43faee1 tip
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
67
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
68 $ 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
69 $ hg update -r ''
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
70 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
71 $ hg id
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
72 30aff43faee1 tip
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
73
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
74 $ 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
75 $ hg update ''
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
76 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
77 $ hg id
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
78 30aff43faee1 tip
fbd5e2f0bba7 update: do not pass in user revspec as default destination (issue6044)
Yuya Nishihara <yuya@tcha.org>
parents: 39707
diff changeset
79
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13960
diff changeset
80 $ cd ..
31117
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
81
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
82 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
83
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
84 #if no-windows
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
85
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
86 $ 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
87 > from mercurial import extensions, worker
38731
ef3838a47503 worker: ability to disable thread unsafe tasks
Gregory Szorc <gregory.szorc@gmail.com>
parents: 38250
diff changeset
88 > 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
89 > 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
90 > def uisetup(ui):
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
91 > 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
92 > EOF
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
93
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
94 $ hg init worker
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
95 $ cd worker
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
96 $ 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
97 > [extensions]
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
98 > 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
99 > [worker]
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
100 > numcpus = 4
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
101 > EOF
39707
5abc47d4ca6b tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents: 39489
diff changeset
102 $ 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
103 > echo $i > $i
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
104 > done
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
105 $ 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
106
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
107 $ hg update null
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
108 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
109 $ hg update -v | grep 100
a91c62752d08 worker: flush messages written by child processes before exit
Yuya Nishihara <yuya@tcha.org>
parents: 31117
diff changeset
110 getting 100
31117
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
111 100 files updated, 0 files merged, 0 files removed, 0 files unresolved
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
112
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
113 $ cd ..
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
114
92bca12328d1 worker: add basic test to ensure child processes are managed well
Yuya Nishihara <yuya@tcha.org>
parents: 16913
diff changeset
115 #endif