annotate tests/test-phase-archived.t @ 51395:a0d88b021a98

unbundle: faster computation of changed heads To compute the set of changed heads it's sufficient to look at the recent commits, instead of looking at all heads currently in existence.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 21 Dec 2023 17:38:04 +0000
parents 385a4f8056e5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41798
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
1 =========================================================
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
2 Test features and behaviors related to the archived phase
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
3 =========================================================
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
4
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
5 $ cat << EOF >> $HGRCPATH
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
6 > [format]
49451
0c70d888a484 phase: introduce a dedicated requirement for the `archived` phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41799
diff changeset
7 > exp-archived-phase=yes
41798
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
8 > [extensions]
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
9 > strip=
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
10 > [experimental]
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
11 > EOF
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
12
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
13 $ hg init repo
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
14 $ cd repo
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
15 $ echo root > a
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
16 $ hg add a
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
17 $ hg ci -m 'root'
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
18
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
19 Test that bundle can unarchive a changeset
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
20 ------------------------------------------
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
21
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
22 $ echo foo >> a
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
23 $ hg st
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
24 M a
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
25 $ hg ci -m 'unbundletesting'
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
26 $ hg log -G
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
27 @ changeset: 1:883aadbbf309
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
28 | tag: tip
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
29 | user: test
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
30 | date: Thu Jan 01 00:00:00 1970 +0000
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
31 | summary: unbundletesting
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
32 |
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
33 o changeset: 0:c1863a3840c6
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
34 user: test
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
35 date: Thu Jan 01 00:00:00 1970 +0000
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
36 summary: root
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
37
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
38 $ hg strip --soft --rev '.'
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
40 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/883aadbbf309-efc55adc-backup.hg
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
41 $ hg log -G
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
42 @ changeset: 0:c1863a3840c6
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
43 tag: tip
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
44 user: test
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
45 date: Thu Jan 01 00:00:00 1970 +0000
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
46 summary: root
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
47
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
48 $ hg log -G --hidden
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
49 o changeset: 1:883aadbbf309
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
50 | tag: tip
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
51 | user: test
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
52 | date: Thu Jan 01 00:00:00 1970 +0000
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
53 | summary: unbundletesting
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
54 |
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
55 @ changeset: 0:c1863a3840c6
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
56 user: test
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
57 date: Thu Jan 01 00:00:00 1970 +0000
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
58 summary: root
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
59
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
60 $ hg unbundle .hg/strip-backup/883aadbbf309-efc55adc-backup.hg
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
61 adding changesets
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
62 adding manifests
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
63 adding file changes
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
64 added 0 changesets with 0 changes to 1 files
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
65 (run 'hg update' to get a working copy)
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
66 $ hg log -G
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
67 o changeset: 1:883aadbbf309
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
68 | tag: tip
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
69 | user: test
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
70 | date: Thu Jan 01 00:00:00 1970 +0000
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
71 | summary: unbundletesting
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
72 |
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
73 @ changeset: 0:c1863a3840c6
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
74 user: test
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
75 date: Thu Jan 01 00:00:00 1970 +0000
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
76 summary: root
8c42b4a3d447 strip: introduce a soft strip option
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
77
41799
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
78
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
79 Test that history rewriting command can use the archived phase when allowed to
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
80 ------------------------------------------------------------------------------
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
81
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
82 $ hg up 'desc(unbundletesting)'
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
84 $ echo bar >> a
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
85 $ hg commit --amend --config experimental.cleanup-as-archived=yes
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
86 $ hg log -G
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
87 @ changeset: 2:d1e73e428f29
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
88 | tag: tip
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
89 | parent: 0:c1863a3840c6
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
90 | user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
91 | date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
92 | summary: unbundletesting
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
93 |
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
94 o changeset: 0:c1863a3840c6
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
95 user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
96 date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
97 summary: root
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
98
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
99 $ hg log -G --hidden
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
100 @ changeset: 2:d1e73e428f29
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
101 | tag: tip
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
102 | parent: 0:c1863a3840c6
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
103 | user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
104 | date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
105 | summary: unbundletesting
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
106 |
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
107 | o changeset: 1:883aadbbf309
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
108 |/ user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
109 | date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
110 | summary: unbundletesting
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
111 |
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
112 o changeset: 0:c1863a3840c6
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
113 user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
114 date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
115 summary: root
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
116
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
117 $ ls -1 .hg/strip-backup/
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
118 883aadbbf309-efc55adc-amend.hg
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
119 883aadbbf309-efc55adc-backup.hg
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
120 $ hg unbundle .hg/strip-backup/883aadbbf309*amend.hg
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
121 adding changesets
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
122 adding manifests
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
123 adding file changes
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
124 added 0 changesets with 0 changes to 1 files
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
125 (run 'hg update' to get a working copy)
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
126 $ hg log -G
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
127 @ changeset: 2:d1e73e428f29
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
128 | tag: tip
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
129 | parent: 0:c1863a3840c6
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
130 | user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
131 | date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
132 | summary: unbundletesting
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
133 |
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
134 | o changeset: 1:883aadbbf309
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
135 |/ user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
136 | date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
137 | summary: unbundletesting
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
138 |
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
139 o changeset: 0:c1863a3840c6
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
140 user: test
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
141 date: Thu Jan 01 00:00:00 1970 +0000
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
142 summary: root
64de5f44eec3 rewriting: add an option for rewrite commands to use the archived phase
Boris Feld <boris.feld@octobus.net>
parents: 41798
diff changeset
143
50391
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
144
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
145 Test that a strip will preserve unrelated changeset archived
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
146 ------------------------------------------------------------
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
147
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
148 prepare a suitable tree
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
149
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
150 $ echo foo > bar
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
151 $ hg add bar
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
152 $ hg commit -m 'some more commit'
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
153 $ hg log -G --hidden -T '{rev} {node|short} [{phase}] {desc|firstline}\n'
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
154 @ 3 f90bf4e57854 [draft] some more commit
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
155 |
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
156 o 2 d1e73e428f29 [draft] unbundletesting
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
157 |
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
158 | o 1 883aadbbf309 [draft] unbundletesting
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
159 |/
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
160 o 0 c1863a3840c6 [draft] root
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
161
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
162 $ hg strip --soft --rev '.'
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
163 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
164 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/f90bf4e57854-56b37ff2-backup.hg
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
165 $ hg log -G --hidden -T '{rev} {node|short} [{phase}] {desc|firstline}\n'
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
166 o 3 f90bf4e57854 [archived] some more commit
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
167 |
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
168 @ 2 d1e73e428f29 [draft] unbundletesting
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
169 |
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
170 | o 1 883aadbbf309 [draft] unbundletesting
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
171 |/
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
172 o 0 c1863a3840c6 [draft] root
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
173
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
174
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
175
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
176 Strips the other (lower rev-num) head
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
177
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
178 $ hg strip --rev 'min(head() and not .)'
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
179 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/883aadbbf309-efc55adc-backup.hg
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
180
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
181 The archived changeset should still be hidden
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
182
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
183 $ hg log -G -T '{rev} {node|short} [{phase}] {desc|firstline}\n'
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
184 @ 1 d1e73e428f29 [draft] unbundletesting
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
185 |
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
186 o 0 c1863a3840c6 [draft] root
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
187
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
188
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
189 It may still be around:
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
190
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
191 $ hg log --hidden -G -T '{rev} {node|short} [{phase}] {desc|firstline}\n'
50392
385a4f8056e5 bundle: include required phases when saving a bundle (issue6794)
Jason R. Coombs <jaraco@jaraco.com>, Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50391
diff changeset
192 o 2 f90bf4e57854 [archived] some more commit
50391
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
193 |
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
194 @ 1 d1e73e428f29 [draft] unbundletesting
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
195 |
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
196 o 0 c1863a3840c6 [draft] root
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
197
c8a91b0d1077 bundle: add test bundling changeset in the "archived" phase
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 49451
diff changeset
198