Mercurial > evolve
annotate tests/test-obsolete-push.t @ 6176:32faf1cd209f mercurial-6.0
test-compat: back out changeset 0c052cf84944
CORE-TEST-OUTPUT-UPDATE: 38941a28406a
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 22 Feb 2022 07:14:09 +0300 |
parents | c979af037915 |
children |
rev | line source |
---|---|
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
1 $ cat >> $HGRCPATH <<EOF |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
2 > [extensions] |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
3 > EOF |
1806
9f42f819267b
evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1732
diff
changeset
|
4 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
4246
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
5 $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
6 |
1732
f4047fba5e90
templates: change {obsolete} to emit only "obsolete" or ""
Martin von Zweigbergk <martinvonz@google.com>
parents:
1631
diff
changeset
|
7 $ template='{rev}:{node|short}@{branch}({separate("/", obsolete, phase)}) {desc|firstline}\n' |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
8 $ glog() { |
2776
4dd84054ebbb
test: remove reference to the graphlog extension
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
2525
diff
changeset
|
9 > hg log -G --template "$template" "$@" |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
10 > } |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
11 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
12 Test outgoing, common A is suspended, B unstable and C secret, remote |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
13 has A and B, neither A or C should be in outgoing. |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
14 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
15 $ hg init source |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
16 $ cd source |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
17 $ echo a > a |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
18 $ hg ci -qAm A a |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
19 $ echo b > b |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
20 $ hg ci -qAm B b |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
21 $ hg up 0 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
22 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
23 $ echo c > c |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
24 $ hg ci -qAm C c |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
25 $ hg phase --secret --force . |
1631
7463f5880ce9
prune: remove the kill alias
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
1185
diff
changeset
|
26 $ hg prune 0 1 |
688
f2c3fd21fa63
prune: add an informative message about the number of pruned changesets
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
491
diff
changeset
|
27 2 changesets pruned |
3013
945a0989e41b
packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3000
diff
changeset
|
28 1 new orphan changesets |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
29 $ glog --hidden |
1732
f4047fba5e90
templates: change {obsolete} to emit only "obsolete" or ""
Martin von Zweigbergk <martinvonz@google.com>
parents:
1631
diff
changeset
|
30 @ 2:244232c2222a@default(secret) C |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
31 | |
1732
f4047fba5e90
templates: change {obsolete} to emit only "obsolete" or ""
Martin von Zweigbergk <martinvonz@google.com>
parents:
1631
diff
changeset
|
32 | x 1:6c81ed0049f8@default(obsolete/draft) B |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
33 |/ |
1732
f4047fba5e90
templates: change {obsolete} to emit only "obsolete" or ""
Martin von Zweigbergk <martinvonz@google.com>
parents:
1631
diff
changeset
|
34 x 0:1994f17a630e@default(obsolete/draft) A |
300
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
35 |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
36 $ hg init ../clone |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
37 $ cat > ../clone/.hg/hgrc <<EOF |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
38 > [phases] |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
39 > publish = false |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
40 > EOF |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
41 $ hg outgoing ../clone --template "$template" |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
42 comparing with ../clone |
3b1f326878e5
obsolete: suspended changeset with secret only children should be secret too
Patrick Mezard <patrick@mezard.eu>
parents:
diff
changeset
|
43 searching for changes |
1732
f4047fba5e90
templates: change {obsolete} to emit only "obsolete" or ""
Martin von Zweigbergk <martinvonz@google.com>
parents:
1631
diff
changeset
|
44 0:1994f17a630e@default(obsolete/draft) A |
2286
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
45 $ cd .. |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
46 |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
47 Test options to prevent implicite publishing of changesets |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
48 ---------------------------------------------------------- |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
49 |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
50 |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
51 $ hg clone source strict-publish-client --pull |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
52 requesting all changes |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
53 adding changesets |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
54 adding manifests |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
55 adding file changes |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
56 added 1 changesets with 1 changes to 1 files |
2525
5adb8bdb935e
compatibility: backport mercurial 176d1a0ce385
Boris Feld <boris.feld@octobus.net>
parents:
2286
diff
changeset
|
57 2 new obsolescence markers |
3075
8feb2cae7eae
test: adapt to output change from eb586ed5d8ce
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3013
diff
changeset
|
58 new changesets 1994f17a630e |
2286
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
59 updating to branch default |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
61 $ cd strict-publish-client |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
62 $ echo c > c |
5933
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
63 $ hg ci -qAm C c --secret |
2286
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
64 |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
65 abort behavior |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
66 |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
67 $ cat >> .hg/hgrc <<eof |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
68 > [experimental] |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
69 > auto-publish = abort |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
70 > eof |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
71 $ hg push -r . |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
72 pushing to $TESTTMP/source |
5933
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
73 searching for changes |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
74 no changes found (ignored 1 secret changesets) |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
75 [1] |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
76 $ hg push |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
77 pushing to $TESTTMP/source |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
78 searching for changes |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
79 no changes found (ignored 1 secret changesets) |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
80 [1] |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
81 $ hg phase --draft |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
82 $ hg push -r . |
c979af037915
evolve: use "served" repo filter to guess what the server will publish
Anton Shestakov <av6@dwimlabs.net>
parents:
5816
diff
changeset
|
83 pushing to $TESTTMP/source |
2286
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
84 abort: push would publish 1 changesets |
4287
b7b6a4524ef7
safeguard: don't reimplement auto-publish if it's in core (will be in 4.9)
Anton Shestakov <av6@dwimlabs.net>
parents:
4246
diff
changeset
|
85 (* 'experimental.auto-publish' config) (glob) |
2286
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
86 [255] |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
87 $ hg push |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
88 pushing to $TESTTMP/source |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
89 abort: push would publish 1 changesets |
4287
b7b6a4524ef7
safeguard: don't reimplement auto-publish if it's in core (will be in 4.9)
Anton Shestakov <av6@dwimlabs.net>
parents:
4246
diff
changeset
|
90 (* 'experimental.auto-publish' config) (glob) |
2286
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
91 [255] |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
92 |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
93 warning behavior |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
94 |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
95 $ echo 'auto-publish = warn' >> .hg/hgrc |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
96 $ hg push |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
97 pushing to $TESTTMP/source |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
98 1 changesets about to be published |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
99 searching for changes |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
100 adding changesets |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
101 adding manifests |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
102 adding file changes |
a4c5744a7b93
safeguard: add an option to disable automatic publishing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
1806
diff
changeset
|
103 added 0 changesets with 0 changes to 1 files |
4246
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
104 |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
105 --publish overrides auto-publish |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
106 |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
107 $ echo d > d |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
108 $ hg ci -qAm D d |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
109 $ hg push -r . --publish --config experimental.auto-publish=abort |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
110 pushing to $TESTTMP/source |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
111 searching for changes |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
112 adding changesets |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
113 adding manifests |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
114 adding file changes |
2d9902f0ff17
safeguard: allow push to succeed (and without warning) with --publish
Anton Shestakov <av6@dwimlabs.net>
parents:
3075
diff
changeset
|
115 added 1 changesets with 1 changes to 1 files |