annotate tests/test-clone-update-order.t @ 51460:cebd96dee99a

branchcache: move the filename to a class attribute This prepare the introduction of more variant of cache.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 25 Feb 2024 20:40:37 +0100
parents 55c6ebd11cb9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49621
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 45827
diff changeset
1 $ hg init repo
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 45827
diff changeset
2 $ cd repo
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
3 $ echo foo > bar
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
4 $ hg commit -Am default
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
5 adding bar
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
6 $ hg up -r null
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
7 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
8 $ hg branch mine
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
9 marked working directory as branch mine
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12847
diff changeset
10 (branches are permanent and global, did you want a bookmark?)
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
11 $ echo hello > world
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
12 $ hg commit -Am hello
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
13 adding world
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
14 $ hg up -r null
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
15 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
16 $ hg branch other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
17 marked working directory as branch other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
18 $ echo good > bye
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
19 $ hg commit -Am other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
20 adding bye
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
21 $ hg up -r mine
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
22 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
23
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
24 $ hg clone -U -u . .#other ../b -r 0 -r 1 -r 2 -b other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
25 abort: cannot specify both --noupdate and --updaterev
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 34661
diff changeset
26 [10]
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
27
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
28 $ hg clone -U .#other ../b -r 0 -r 1 -r 2 -b other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
29 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
30 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
31 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
32 added 3 changesets with 3 changes to 3 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25295
diff changeset
33 new changesets 8c68ee086fd0:fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
34 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
35
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
36 $ hg clone -u . .#other ../b -r 0 -r 1 -r 2 -b other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
37 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
38 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
39 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
40 added 3 changesets with 3 changes to 3 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25295
diff changeset
41 new changesets 8c68ee086fd0:fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
42 updating to branch mine
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
43 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
44 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
45
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
46 $ hg clone -u 0 .#other ../b -r 0 -r 1 -r 2 -b other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
47 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
48 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
49 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
50 added 3 changesets with 3 changes to 3 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25295
diff changeset
51 new changesets 8c68ee086fd0:fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
52 updating to branch default
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
53 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
54 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
55
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
56 $ hg clone -u 1 .#other ../b -r 0 -r 1 -r 2 -b other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
57 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
58 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
59 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
60 added 3 changesets with 3 changes to 3 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25295
diff changeset
61 new changesets 8c68ee086fd0:fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
62 updating to branch mine
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
64 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
65
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
66 $ hg clone -u 2 .#other ../b -r 0 -r 1 -r 2 -b other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
67 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
68 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
69 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
70 added 3 changesets with 3 changes to 3 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25295
diff changeset
71 new changesets 8c68ee086fd0:fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
72 updating to branch other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
73 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
74 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
75
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
76 Test -r mine ... mine is ignored:
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
77
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
78 $ hg clone -u 2 .#other ../b -r mine -r 0 -r 1 -r 2 -b other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
79 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
80 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
81 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
82 added 3 changesets with 3 changes to 3 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25295
diff changeset
83 new changesets 8c68ee086fd0:fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
84 updating to branch other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
85 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
86 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
87
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
88 $ hg clone .#other ../b -b default -b mine
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
89 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
90 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
91 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
92 added 3 changesets with 3 changes to 3 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 25295
diff changeset
93 new changesets 8c68ee086fd0:fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
94 updating to branch default
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
95 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
96 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
97
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
98 $ hg clone .#other ../b
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
99 adding changesets
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
100 adding manifests
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
101 adding file changes
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
102 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: 25295
diff changeset
103 new changesets fcc393352796
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
104 updating to branch other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
105 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
106 $ rm -rf ../b
10637
7ce62865d72a commands: document and test hg clone update priority
timeless <timeless@gmail.com>
parents:
diff changeset
107
12286
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
108 $ hg clone -U . ../c -r 1 -r 2 > /dev/null
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
109 $ hg clone ../c ../b
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
110 updating to branch other
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
111 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
112 $ rm -rf ../b ../c
63352a7a8c1c tests: unify test-clone-update-order
Adrian Buehlmann <adrian@cadifra.com>
parents: 10637
diff changeset
113