Mercurial > hg
annotate tests/test-chainsaw-update.t @ 51433:d36a81d70f25
chainsaw-update: taking care of initial cloning
Perhaps we should go just a bit lower level than this `instance()`,
since the main added value in our use-case is full path resolution,
that we need to do anyway for the rmtree cleanup.
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Fri, 23 Feb 2024 11:41:55 +0100 |
parents | e79c7320605f |
children | d4095f7b000a |
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 $ cat >> $HGRCPATH << EOF |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
9 > [extensions] |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
10 > chainsaw= |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
11 > EOF |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
12 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
13 $ hg init src |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
14 $ 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
|
15 $ 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
|
16 $ 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
|
17 $ 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
|
18 $ 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
|
19 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
|
20 (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
|
21 $ 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
|
22 $ 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
|
23 $ 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
|
24 $ 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
|
25 $ 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
|
26 $ 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
|
27 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
|
28 $ 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
|
29 $ 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
|
30 $ 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
|
31 $ 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
|
32 @ 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
|
33 | tag: tip |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
34 | 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
|
35 | user: test |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
36 | 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
|
37 | 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
|
38 | |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
39 | 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
|
40 | | branch: A |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
41 | | user: test |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
42 | | 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
|
43 | | 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
|
44 | | |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
45 | 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
|
46 |/ branch: A |
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: A_0 |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
50 | |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
51 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
|
52 user: test |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
53 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
|
54 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
|
55 |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
56 $ cd .. |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
57 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
58 Actual tests |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
59 ============ |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
60 |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
61 Initial cloning if needed |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
62 ------------------------- |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
63 |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
64 $ 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
|
65 no such directory: "repo" |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
66 creating repository at "repo" |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
67 recovering after interrupted transaction, if any |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
68 no interrupted transaction available |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
69 pulling from ./src |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
70 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
|
71 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
|
72 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
|
73 |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
74 $ 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
|
75 $ hg log -G |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
76 @ 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
|
77 | tag: tip |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
78 | 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
|
79 | user: test |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
80 | 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
|
81 | 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
|
82 | |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
83 | o changeset: 2:7fd8de258aa4 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
84 | | branch: A |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
85 | | user: test |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
86 | | 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
|
87 | | summary: A_1 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
88 | | |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
89 | o changeset: 1:ae1692b8aadb |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
90 |/ branch: A |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
91 | user: test |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
92 | 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
|
93 | summary: A_0 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
94 | |
51432
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
95 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
|
96 user: test |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
97 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
|
98 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
|
99 |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
100 $ 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
|
101 C foo |
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
102 C root |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
103 $ cat foo |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
104 1 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
105 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
106 Test lock breacking capabilities |
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 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
109 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
|
110 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
|
111 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
|
112 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
113 $ 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
|
114 $ 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
|
115 $ hg debuglock |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
116 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
|
117 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
|
118 [2] |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
119 |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
120 $ 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
|
121 loaded repository at "." |
51431
fe68a2dc0bf2
chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents:
51429
diff
changeset
|
122 had to break store lock |
fe68a2dc0bf2
chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents:
51429
diff
changeset
|
123 had to break working copy lock |
fe68a2dc0bf2
chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents:
51429
diff
changeset
|
124 recovering after interrupted transaction, if any |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
125 no interrupted transaction available |
51431
fe68a2dc0bf2
chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents:
51429
diff
changeset
|
126 pulling from ../src |
fe68a2dc0bf2
chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents:
51429
diff
changeset
|
127 updating to revision 'default' |
fe68a2dc0bf2
chainsaw-update: log actual locks breaking
Georges Racinet <georges.racinet@octobus.net>
parents:
51429
diff
changeset
|
128 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
|
129 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
|
130 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
131 Test file purging capabilities |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
132 ------------------------------ |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
133 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
134 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
|
135 purging. |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
136 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
137 $ echo untracked > bar |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
138 $ echo modified > foo |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
139 $ hg status -A |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
140 M foo |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
141 ? bar |
51432
e79c7320605f
chainsaw-update: use a graph with branching in graph
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
51431
diff
changeset
|
142 C root |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
143 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
144 $ echo 2 > ../src/foo |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
145 $ hg -R ../src commit -mB_1 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
146 $ 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
|
147 no interrupted transaction available |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
148 $ hg log -G |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
149 @ changeset: 4:973ab81c95fb |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
150 | tag: tip |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
151 | user: test |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
152 | 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
|
153 | summary: B_1 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
154 | |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
155 o changeset: 3:bfcb8e629987 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
156 | parent: 0:06f48e4098b8 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
157 | user: test |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
158 | 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
|
159 | summary: B_0 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
160 | |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
161 | o changeset: 2:7fd8de258aa4 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
162 | | branch: A |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
163 | | user: test |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
164 | | 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
|
165 | | summary: A_1 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
166 | | |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
167 | o changeset: 1:ae1692b8aadb |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
168 |/ branch: A |
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: A_0 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
172 | |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
173 o changeset: 0:06f48e4098b8 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
174 user: test |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
175 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
|
176 summary: R_0 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
177 |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
178 $ hg status -A |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
179 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
|
180 C root |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
181 $ cat foo |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
182 2 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
183 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
184 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
|
185 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
|
186 |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
187 $ echo bar > .hgignore |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
188 $ hg ci -Aqm hgignore |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
189 $ echo ignored > bar |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
190 $ hg status --all |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
191 I bar |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
192 C .hgignore |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
193 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
|
194 C root |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
195 |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
196 $ 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
|
197 no interrupted transaction available |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
198 $ hg status --all |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
199 I bar |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
200 C .hgignore |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
201 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
|
202 C root |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
203 $ cat bar |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
204 ignored |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
205 |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
206 $ 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
|
207 no interrupted transaction available |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
208 $ hg status --all |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
209 C .hgignore |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
210 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
|
211 C root |
51429
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
212 $ test -f bar |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
213 [1] |
bc88aa7472de
chainsaw: new extension for dangerous operations
Georges Racinet <georges.racinet@octobus.net>
parents:
diff
changeset
|
214 |
51433
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
215 test --minimal-initial-cloning variant |
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 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
218 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
|
219 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
|
220 # with an actual clone-bundle) |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
221 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
222 $ cd .. |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
223 $ 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
|
224 no such directory: "repo2" |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
225 creating repository at "repo2" |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
226 recovering after interrupted transaction, if any |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
227 no interrupted transaction available |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
228 pulling from src |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
229 updating to revision 'default' |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
230 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
|
231 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
|
232 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
233 $ cd repo2 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
234 $ hg log -G |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
235 @ changeset: 2:973ab81c95fb |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
236 | tag: tip |
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_1 |
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: 1:bfcb8e629987 |
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: B_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 o changeset: 0:06f48e4098b8 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
247 user: test |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
248 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
|
249 summary: R_0 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
250 |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
251 $ hg status -A |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
252 C foo |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
253 C root |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
254 $ cat foo |
d36a81d70f25
chainsaw-update: taking care of initial cloning
Georges Racinet <georges.racinet@octobus.net>
parents:
51432
diff
changeset
|
255 2 |