Mercurial > hg
annotate tests/test-obsolete-checkheads.t @ 48549:28f0092ec89f
exchange: add fast path for subrepo check on push
Try to check if .hgsub and .hgsubstate exist at all before looking
for them in every changeset to be pushed. The latter can be quite
expensive for large repositories and the existance check is almost free.
Differential Revision: https://phab.mercurial-scm.org/D11956
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Mon, 03 Jan 2022 01:09:56 +0100 |
parents | 9261f6c1d39b |
children |
rev | line source |
---|---|
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
1 Check that obsolete properly strip heads |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
2 $ cat >> $HGRCPATH << EOF |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
3 > [phases] |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
4 > # public changeset are not obsolete |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
5 > publish=false |
45765
ed84a4d48910
config: add a new [command-templates] section for templates defined by hg
Martin von Zweigbergk <martinvonz@google.com>
parents:
42893
diff
changeset
|
6 > [command-templates] |
ed84a4d48910
config: add a new [command-templates] section for templates defined by hg
Martin von Zweigbergk <martinvonz@google.com>
parents:
42893
diff
changeset
|
7 > log='{node|short} ({phase}) {desc|firstline}\n' |
22955
fab9dda0f2a3
obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents:
20117
diff
changeset
|
8 > [experimental] |
34866
1644623ab096
config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents:
34661
diff
changeset
|
9 > evolution.createmarkers=True |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
10 > EOF |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
11 $ mkcommit() { |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
12 > echo "$1" > "$1" |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
13 > hg add "$1" |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
14 > hg ci -m "add $1" |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
15 > } |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
16 $ getid() { |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
17 > hg id --debug -ir "desc('$1')" |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
18 > } |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
19 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
20 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
21 $ hg init remote |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
22 $ cd remote |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
23 $ mkcommit base |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
24 $ hg phase --public . |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
25 $ cd .. |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
26 $ cp -R remote base |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
27 $ hg clone remote local |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
28 updating to branch default |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
30 $ cd local |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
31 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
32 New head replaces old head |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
33 ========================== |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
34 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
35 setup |
17834
743d04dd48ec
push: refuse to push bumped changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17564
diff
changeset
|
36 (we add the 1 flags to prevent bumped error during the test) |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
37 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
38 $ mkcommit old |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
39 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
40 pushing to $TESTTMP/remote |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
41 searching for changes |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
42 adding changesets |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
43 adding manifests |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
44 adding file changes |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
45 added 1 changesets with 1 changes to 1 files |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
46 $ hg up -q '.^' |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
47 $ mkcommit new |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
48 created new head |
17834
743d04dd48ec
push: refuse to push bumped changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17564
diff
changeset
|
49 $ hg debugobsolete --flags 1 `getid old` `getid new` |
42893
34a46d48d24e
debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
39899
diff
changeset
|
50 1 new obsolescence markers |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
32095
diff
changeset
|
51 obsoleted 1 changesets |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
52 $ hg log -G --hidden |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
53 @ 71e3228bffe1 (draft) add new |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
54 | |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
55 | x c70b08862e08 (draft) add old |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
56 |/ |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
57 o b4952fcf48cf (public) add base |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
58 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
59 $ cp -R ../remote ../backup1 |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
60 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
61 old exists remotely as draft. It is obsoleted by new that we now push. |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
62 Push should not warn about creating new head |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
63 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
64 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
65 pushing to $TESTTMP/remote |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
66 searching for changes |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
67 adding changesets |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
68 adding manifests |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
69 adding file changes |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
70 added 1 changesets with 1 changes to 1 files (+1 heads) |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
71 |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
72 old head is now public (public local version) |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
73 ============================================= |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
74 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
75 setup |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
76 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
77 $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
78 $ cp -R ../backup1 ../remote |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
79 $ hg -R ../remote phase --public c70b08862e08 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
80 $ hg pull -v |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
81 pulling from $TESTTMP/remote |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
82 searching for changes |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
83 no changes found |
38250
d0abd7949ea3
phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net>
parents:
38249
diff
changeset
|
84 1 local changesets published |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
85 $ hg log -G --hidden |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
86 @ 71e3228bffe1 (draft) add new |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
87 | |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
88 | o c70b08862e08 (public) add old |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
89 |/ |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
90 o b4952fcf48cf (public) add base |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
91 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
92 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
93 Abort: old will still be an head because it's public. |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
94 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
95 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
96 pushing to $TESTTMP/remote |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
97 searching for changes |
45908
122f0b59f5f0
errors: remove trailing "!" in messages about creating new heads on push
Martin von Zweigbergk <martinvonz@google.com>
parents:
45765
diff
changeset
|
98 abort: push creates new remote head 71e3228bffe1 |
29973
4ddb05751b12
discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
22955
diff
changeset
|
99 (merge or see 'hg help push' for details about pushing new heads) |
46119
9261f6c1d39b
errors: raise StateError when push fails because it creates new heads
Martin von Zweigbergk <martinvonz@google.com>
parents:
45908
diff
changeset
|
100 [20] |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
101 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
102 old head is now public (public remote version) |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
103 ============================================== |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
104 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
105 TODO: Not implemented yet. |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
106 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
107 # setup |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
108 # |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
109 # $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
110 # $ cp -R ../backup1 ../remote |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
111 # $ hg -R ../remote phase --public c70b08862e08 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
112 # $ hg phase --draft --force c70b08862e08 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
113 # $ hg log -G --hidden |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
114 # @ 71e3228bffe1 (draft) add new |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
115 # | |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
116 # | x c70b08862e08 (draft) add old |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
117 # |/ |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
118 # o b4952fcf48cf (public) add base |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
119 # |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
120 # |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
121 # |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
122 # Abort: old will still be an head because it's public. |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
123 # |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
124 # $ hg push |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
125 # pushing to $TESTTMP/remote |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
126 # searching for changes |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
127 # abort: push creates new remote head 71e3228bffe1! |
29979
40ffa8bff73a
tests: favor single quotes for wrapping hg help ...
timeless <timeless@mozdev.org>
parents:
29973
diff
changeset
|
128 # (merge or see 'hg help push' for details about pushing new heads) |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
129 # [255] |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
130 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
131 old head is obsolete but replacement is not pushed |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
132 ================================================== |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
133 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
134 setup |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
135 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
136 $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
137 $ cp -R ../backup1 ../remote |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
138 $ hg phase --draft --force '(0::) - 0' |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
139 $ hg up -q '.^' |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
140 $ mkcommit other |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
141 created new head |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
142 $ hg log -G --hidden |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
143 @ d7d41ccbd4de (draft) add other |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
144 | |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
145 | o 71e3228bffe1 (draft) add new |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
146 |/ |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
147 | x c70b08862e08 (draft) add old |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
148 |/ |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
149 o b4952fcf48cf (public) add base |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
150 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
151 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
152 old exists remotely as draft. It is obsoleted by new but we don't push new. |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
153 Push should abort on new head |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
154 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
155 $ hg push -r 'desc("other")' |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
156 pushing to $TESTTMP/remote |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
157 searching for changes |
45908
122f0b59f5f0
errors: remove trailing "!" in messages about creating new heads on push
Martin von Zweigbergk <martinvonz@google.com>
parents:
45765
diff
changeset
|
158 abort: push creates new remote head d7d41ccbd4de |
29973
4ddb05751b12
discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
22955
diff
changeset
|
159 (merge or see 'hg help push' for details about pushing new heads) |
46119
9261f6c1d39b
errors: raise StateError when push fails because it creates new heads
Martin von Zweigbergk <martinvonz@google.com>
parents:
45908
diff
changeset
|
160 [20] |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
161 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
162 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
163 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
164 Both precursors and successors are already know remotely. Descendant adds heads |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
165 =============================================================================== |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
166 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
167 setup. (The obsolete marker is known locally only |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
168 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
169 $ cd .. |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
170 $ rm -rf local |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
171 $ hg clone remote local |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
172 updating to branch default |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
173 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
174 $ cd local |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
175 $ mkcommit old |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
176 old already tracked! |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
177 nothing changed |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
178 [1] |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
179 $ hg up -q '.^' |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
180 $ mkcommit new |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
181 created new head |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
182 $ hg push -f |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
183 pushing to $TESTTMP/remote |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
184 searching for changes |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
185 adding changesets |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
186 adding manifests |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
187 adding file changes |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
188 added 1 changesets with 1 changes to 1 files (+1 heads) |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
189 $ mkcommit desc1 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
190 $ hg up -q '.^' |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
191 $ mkcommit desc2 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
192 created new head |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
193 $ hg debugobsolete `getid old` `getid new` |
42893
34a46d48d24e
debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
39899
diff
changeset
|
194 1 new obsolescence markers |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
32095
diff
changeset
|
195 obsoleted 1 changesets |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
196 $ hg log -G --hidden |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
197 @ 5fe37041cc2b (draft) add desc2 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
198 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
199 | o a3ef1d111c5f (draft) add desc1 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
200 |/ |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
201 o 71e3228bffe1 (draft) add new |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
202 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
203 | x c70b08862e08 (draft) add old |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
204 |/ |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
205 o b4952fcf48cf (public) add base |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
206 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
207 $ hg log -G --hidden -R ../remote |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
208 o 71e3228bffe1 (draft) add new |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
209 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
210 | o c70b08862e08 (draft) add old |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
211 |/ |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
212 @ b4952fcf48cf (public) add base |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
213 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
214 $ cp -R ../remote ../backup2 |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
215 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
216 Push should not warn about adding new heads. We create one, but we'll delete |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
217 one anyway. |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
218 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
219 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
220 pushing to $TESTTMP/remote |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
221 searching for changes |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
222 adding changesets |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
223 adding manifests |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
224 adding file changes |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
225 added 2 changesets with 2 changes to 2 files (+1 heads) |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
226 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
227 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
228 Remote head is unknown but obsoleted by a local changeset |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
229 ========================================================= |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
230 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
231 setup |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
232 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
233 $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
234 $ cp -R ../backup1 ../remote |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
235 $ cd .. |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
236 $ rm -rf local |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
237 $ hg clone remote local -r 0 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
238 adding changesets |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
239 adding manifests |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
240 adding file changes |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
241 added 1 changesets with 1 changes to 1 files |
34661
eb586ed5d8ce
transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
33773
diff
changeset
|
242 new changesets b4952fcf48cf |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
243 updating to branch default |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
244 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
245 $ cd local |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
246 $ mkcommit new |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
247 $ hg -R ../remote id --debug -r tip |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
248 c70b08862e0838ea6d7c59c85da2f1ed6c8d67da tip |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
249 $ hg id --debug -r tip |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
250 71e3228bffe1886550777233d6c97bb5a6b2a650 tip |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
251 $ hg debugobsolete c70b08862e0838ea6d7c59c85da2f1ed6c8d67da 71e3228bffe1886550777233d6c97bb5a6b2a650 |
42893
34a46d48d24e
debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
39899
diff
changeset
|
252 1 new obsolescence markers |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
253 $ hg log -G --hidden |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
254 @ 71e3228bffe1 (draft) add new |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
255 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
256 o b4952fcf48cf (public) add base |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
257 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
258 $ hg log -G --hidden -R ../remote |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
259 o c70b08862e08 (draft) add old |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
260 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
261 @ b4952fcf48cf (public) add base |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
262 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
263 |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
264 We do not have enought data to take the right decision, we should fail |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
265 |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
266 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
267 pushing to $TESTTMP/remote |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
268 searching for changes |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
269 remote has heads on branch 'default' that are not known locally: c70b08862e08 |
45908
122f0b59f5f0
errors: remove trailing "!" in messages about creating new heads on push
Martin von Zweigbergk <martinvonz@google.com>
parents:
45765
diff
changeset
|
270 abort: push creates new remote head 71e3228bffe1 |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
271 (pull and merge or see 'hg help push' for details about pushing new heads) |
46119
9261f6c1d39b
errors: raise StateError when push fails because it creates new heads
Martin von Zweigbergk <martinvonz@google.com>
parents:
45908
diff
changeset
|
272 [20] |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
273 |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
274 Pulling the missing data makes it work |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
275 |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
276 $ hg pull |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
277 pulling from $TESTTMP/remote |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
278 searching for changes |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
279 adding changesets |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
280 adding manifests |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
281 adding file changes |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
282 added 1 changesets with 1 changes to 1 files (+1 heads) |
39899
f9232b0310ef
pullreport: issue a message about "extinct" pulled changesets
Boris Feld <boris.feld@octobus.net>
parents:
38250
diff
changeset
|
283 (1 other changesets obsolete on arrival) |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
284 (run 'hg heads' to see heads) |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
285 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
286 pushing to $TESTTMP/remote |
17548
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
287 searching for changes |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
288 adding changesets |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
289 adding manifests |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
290 adding file changes |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
291 added 1 changesets with 1 changes to 1 files (+1 heads) |
32095
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
292 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
293 Old head is pruned without parent data and new unrelated head added |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
294 =================================================================== |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
295 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
296 setup |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
297 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
298 $ cd .. |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
299 $ rm -R remote local |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
300 $ cp -R backup1 remote |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
301 $ hg clone remote local -qr c70b08862e08 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
302 $ cd local |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
303 $ hg up -q '.^' |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
304 $ mkcommit new-unrelated |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
305 created new head |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
306 $ hg debugobsolete `getid old` |
42893
34a46d48d24e
debugobsolete: also issue the "new obsmarkers" messsage
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
39899
diff
changeset
|
307 1 new obsolescence markers |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
32095
diff
changeset
|
308 obsoleted 1 changesets |
32095
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
309 $ hg log -G --hidden |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
310 @ 350a93b716be (draft) add new-unrelated |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
311 | |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
312 | x c70b08862e08 (draft) add old |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
313 |/ |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
314 o b4952fcf48cf (public) add base |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
315 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
316 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
317 $ hg push |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
34866
diff
changeset
|
318 pushing to $TESTTMP/remote |
32095
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
319 searching for changes |
45908
122f0b59f5f0
errors: remove trailing "!" in messages about creating new heads on push
Martin von Zweigbergk <martinvonz@google.com>
parents:
45765
diff
changeset
|
320 abort: push creates new remote head 350a93b716be |
32095
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
321 (merge or see 'hg help push' for details about pushing new heads) |
46119
9261f6c1d39b
errors: raise StateError when push fails because it creates new heads
Martin von Zweigbergk <martinvonz@google.com>
parents:
45908
diff
changeset
|
322 [20] |