annotate tests/test-chainsaw-update.t @ 51823:5eb98ea78fd7

typing: make the manifest classes known to pytype These are the same changes as c1d7ac70980b and 45270e286bdc made to dirstate, for the same reasons. The migration away from decorating the classes with `@interfaceutil.implementer` was started back in 3e9a660b074a, but missed one.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 19 Aug 2024 22:27:43 -0400
parents d4095f7b000a
children 3b46e8e6a401
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
1 ============================================
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
2 Tests for the admin::chainsaw-update command
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
3 ============================================
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
4
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
5 setup
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
6 =====
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
7
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
8 $ hg init src
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
9 $ cd src
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
10 $ echo 1 > root
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
11 $ hg add root
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
12 $ hg ci -Am R_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
13 $ hg branch A
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
14 marked working directory as branch A
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
15 (branches are permanent and global, did you want a bookmark?)
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
16 $ echo 42 > bar
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
17 $ hg add bar
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
18 $ hg ci -Am A_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
19 $ echo 1337 > bar
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
20 $ hg ci -Am A_1
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
21 $ hg update 'desc(R_0)'
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
22 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
23 $ echo 1 > foo
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
24 $ hg add foo
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
25 $ hg ci -Am B_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
26 $ hg log -G
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
27 @ changeset: 3:bfcb8e629987
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
28 | tag: tip
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
29 | parent: 0:06f48e4098b8
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
30 | user: test
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
31 | date: Thu Jan 01 00:00:00 1970 +0000
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
32 | summary: B_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
33 |
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
34 | o changeset: 2:7fd8de258aa4
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
35 | | branch: A
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
36 | | user: test
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
37 | | date: Thu Jan 01 00:00:00 1970 +0000
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
38 | | summary: A_1
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
39 | |
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
40 | o changeset: 1:ae1692b8aadb
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
41 |/ branch: A
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
42 | user: test
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
43 | date: Thu Jan 01 00:00:00 1970 +0000
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
44 | summary: A_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
45 |
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
46 o changeset: 0:06f48e4098b8
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
47 user: test
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
48 date: Thu Jan 01 00:00:00 1970 +0000
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
49 summary: R_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
50
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
51 $ cd ..
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
52
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
53 Actual tests
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
54 ============
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
55
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
56 Initial cloning if needed
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
57 -------------------------
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
58
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
59 $ hg admin::chainsaw-update --dest repo --rev default --source ./src
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
60 no such directory: "repo"
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
61 creating repository at "repo"
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
62 recovering after interrupted transaction, if any
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
63 no interrupted transaction available
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
64 pulling from ./src
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
65 updating to revision 'default'
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
66 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
67 chainsaw-update to revision 'default' for repository at '$TESTTMP/repo' done
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
68
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
69 $ cd repo
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
70 $ hg log -G
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
71 @ changeset: 3:bfcb8e629987
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
72 | tag: tip
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
73 | parent: 0:06f48e4098b8
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
74 | user: test
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
75 | date: Thu Jan 01 00:00:00 1970 +0000
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
76 | summary: B_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
77 |
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
78 | o changeset: 2:7fd8de258aa4
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
79 | | branch: A
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
80 | | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
81 | | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
82 | | summary: A_1
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
83 | |
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
84 | o changeset: 1:ae1692b8aadb
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
85 |/ branch: A
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
86 | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
87 | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
88 | summary: A_0
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
89 |
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
90 o changeset: 0:06f48e4098b8
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
91 user: test
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
92 date: Thu Jan 01 00:00:00 1970 +0000
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
93 summary: R_0
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
94
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
95 $ hg status -A
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
96 C foo
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
97 C root
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
98 $ cat foo
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
99 1
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
100
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
101 Test lock breacking capabilities
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
102 --------------------------------
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
103
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
104 Demonstrate lock-breaking capabilities with locks that regular Mercurial
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
105 operation would not break, because the hostnames registered in locks differ
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
106 from the current hostname (happens a lot with succesive containers):
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
107
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
108 $ ln -s invalid.host.test/effffffc:171814 .hg/store/lock
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
109 $ ln -s invalid.host.test/effffffc:171814 .hg/wlock
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
110 $ hg debuglock
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
111 lock: (.*?), process 171814, host invalid.host.test/effffffc \((\d+)s\) (re)
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
112 wlock: (.*?), process 171814, host invalid.host.test/effffffc \((\d+)s\) (re)
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
113 [2]
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
114
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
115 $ hg admin::chainsaw-update --no-purge-ignored --dest . --rev default --source ../src
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
116 loaded repository at "."
51431
fe68a2dc0bf2 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents: 51429
diff changeset
117 had to break store lock
fe68a2dc0bf2 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents: 51429
diff changeset
118 had to break working copy lock
fe68a2dc0bf2 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents: 51429
diff changeset
119 recovering after interrupted transaction, if any
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
120 no interrupted transaction available
51431
fe68a2dc0bf2 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents: 51429
diff changeset
121 pulling from ../src
fe68a2dc0bf2 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents: 51429
diff changeset
122 updating to revision 'default'
fe68a2dc0bf2 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents: 51429
diff changeset
123 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
fe68a2dc0bf2 chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents: 51429
diff changeset
124 chainsaw-update to revision 'default' for repository at '$TESTTMP/repo' done
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
125
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
126 Test file purging capabilities
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
127 ------------------------------
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
128
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
129 Let's also add local modifications (tracked and untracked) to demonstrate the
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
130 purging.
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
131
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
132 $ echo untracked > bar
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
133 $ echo modified > foo
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
134 $ hg status -A
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
135 M foo
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
136 ? bar
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
137 C root
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
138
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
139 $ echo 2 > ../src/foo
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
140 $ hg -R ../src commit -mB_1
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
141 $ hg admin::chainsaw-update --dest . --rev default --source ../src -q
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
142 no interrupted transaction available
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
143 $ hg log -G
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
144 @ changeset: 4:973ab81c95fb
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
145 | tag: tip
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
146 | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
147 | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
148 | summary: B_1
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
149 |
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
150 o changeset: 3:bfcb8e629987
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
151 | parent: 0:06f48e4098b8
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
152 | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
153 | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
154 | summary: B_0
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
155 |
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
156 | o changeset: 2:7fd8de258aa4
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
157 | | branch: A
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
158 | | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
159 | | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
160 | | summary: A_1
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
161 | |
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
162 | o changeset: 1:ae1692b8aadb
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
163 |/ branch: A
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
164 | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
165 | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
166 | summary: A_0
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
167 |
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
168 o changeset: 0:06f48e4098b8
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
169 user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
170 date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
171 summary: R_0
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
172
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
173 $ hg status -A
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
174 C foo
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
175 C root
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
176 $ cat foo
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
177 2
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
178
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
179 Now behaviour with respect to ignored files: they are not purged if
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
180 the --no-purge-ignored flag is passed, but they are purged by default
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
181
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
182 $ echo bar > .hgignore
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
183 $ hg ci -Aqm hgignore
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
184 $ echo ignored > bar
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
185 $ hg status --all
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
186 I bar
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
187 C .hgignore
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
188 C foo
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
189 C root
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
190
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
191 $ hg admin::chainsaw-update --no-purge-ignored --dest . --rev default --source ../src -q
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
192 no interrupted transaction available
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
193 $ hg status --all
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
194 I bar
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
195 C .hgignore
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
196 C foo
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
197 C root
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
198 $ cat bar
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
199 ignored
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
200
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
201 $ hg admin::chainsaw-update --dest . --rev default --source ../src -q
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
202 no interrupted transaction available
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
203 $ hg status --all
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
204 C .hgignore
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
205 C foo
51432
e79c7320605f chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51431
diff changeset
206 C root
51429
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
207 $ test -f bar
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
208 [1]
bc88aa7472de chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff changeset
209
51433
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
210 test --minimal-initial-cloning variant
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
211 --------------------------------------
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
212
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
213 With `--minimal-initial-cloning`, there is no "requesting all changes"
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
214 message. Hence clone bundles would be bypassed (TODO test both cases
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
215 # with an actual clone-bundle)
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
216
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
217 $ cd ..
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
218 $ hg admin::chainsaw-update --dest repo2 --rev default --source src --initial-clone-minimal
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
219 no such directory: "repo2"
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
220 creating repository at "repo2"
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
221 recovering after interrupted transaction, if any
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
222 no interrupted transaction available
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
223 pulling from src
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
224 updating to revision 'default'
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
225 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
226 chainsaw-update to revision 'default' for repository at '$TESTTMP/repo2' done
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
227
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
228 $ cd repo2
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
229 $ hg log -G
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
230 @ changeset: 2:973ab81c95fb
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
231 | tag: tip
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
232 | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
233 | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
234 | summary: B_1
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
235 |
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
236 o changeset: 1:bfcb8e629987
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
237 | user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
238 | date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
239 | summary: B_0
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
240 |
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
241 o changeset: 0:06f48e4098b8
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
242 user: test
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
243 date: Thu Jan 01 00:00:00 1970 +0000
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
244 summary: R_0
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
245
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
246 $ hg status -A
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
247 C foo
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
248 C root
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
249 $ cat foo
d36a81d70f25 chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents: 51432
diff changeset
250 2