Mercurial > hg
annotate tests/test-obsolete-checkheads.t @ 34993:625d5ebce066
templatekw: add verbosity keyword to select template by -q/-v/--debug flag
This can be used in conjunction with the ifeq() function.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 21 Oct 2017 17:46:41 +0900 |
parents | 1644623ab096 |
children | 4441705b7111 |
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 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
6 > [ui] |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
7 > logtemplate='{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 |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
40 pushing to $TESTTMP/remote (glob) |
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` |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
32095
diff
changeset
|
50 obsoleted 1 changesets |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
51 $ 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
|
52 @ 71e3228bffe1 (draft) add new |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
53 | |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
54 | 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
|
55 |/ |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
56 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
|
57 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
58 $ 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
|
59 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
60 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
|
61 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
|
62 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
63 $ hg push |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
64 pushing to $TESTTMP/remote (glob) |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
65 searching for changes |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
66 adding changesets |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
67 adding manifests |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
68 adding file changes |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
69 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
|
70 |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
71 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
|
72 ============================================= |
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 setup |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
75 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
76 $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
77 $ 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
|
78 $ 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
|
79 $ hg pull -v |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
80 pulling from $TESTTMP/remote (glob) |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
81 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
|
82 no changes found |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
83 $ 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
|
84 @ 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
|
85 | |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
86 | 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
|
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 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
|
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 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
91 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
|
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 $ hg push |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
94 pushing to $TESTTMP/remote (glob) |
17547
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
95 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
|
96 abort: push creates new remote head 71e3228bffe1! |
29973
4ddb05751b12
discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
22955
diff
changeset
|
97 (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
|
98 [255] |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
99 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
100 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
|
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 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
103 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
|
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 # setup |
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 # $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
108 # $ 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
|
109 # $ 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
|
110 # $ hg phase --draft --force c70b08862e08 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
111 # $ 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
|
112 # @ 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
|
113 # | |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
114 # | 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
|
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 # 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
|
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 # |
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 # 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
|
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 # $ 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
|
123 # 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
|
124 # 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
|
125 # 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
|
126 # (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
|
127 # [255] |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
128 |
e6de4761d26f
checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17546
diff
changeset
|
129 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
|
130 ================================================== |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
131 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
132 setup |
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 $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
135 $ 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
|
136 $ 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
|
137 $ hg up -q '.^' |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
138 $ mkcommit other |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
139 created new head |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
140 $ 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
|
141 @ d7d41ccbd4de (draft) add other |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
142 | |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
143 | 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
|
144 |/ |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
145 | 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
|
146 |/ |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
147 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
|
148 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
149 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
150 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
|
151 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
|
152 |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
153 $ hg push -r 'desc("other")' |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
154 pushing to $TESTTMP/remote (glob) |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
155 searching for changes |
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
156 abort: push creates new remote head d7d41ccbd4de! |
29973
4ddb05751b12
discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents:
22955
diff
changeset
|
157 (merge or see 'hg help push' for details about pushing new heads) |
17546
488e470634d8
test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
158 [255] |
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
|
159 |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
160 |
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 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
|
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 |
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 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
|
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 $ 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
|
168 $ 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
|
169 $ 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
|
170 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
|
171 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
|
172 $ 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
|
173 $ 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
|
174 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
|
175 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
|
176 [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
|
177 $ 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
|
178 $ 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
|
179 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
|
180 $ hg push -f |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
181 pushing to $TESTTMP/remote (glob) |
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
|
182 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
|
183 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
|
184 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
|
185 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
|
186 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
|
187 $ 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
|
188 $ 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
|
189 $ 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
|
190 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
|
191 $ hg debugobsolete `getid old` `getid new` |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
32095
diff
changeset
|
192 obsoleted 1 changesets |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
193 $ 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
|
194 @ 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
|
195 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
196 | 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
|
197 |/ |
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 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
|
199 | |
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 | 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
|
201 |/ |
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 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
|
203 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
204 $ 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
|
205 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
|
206 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
207 | 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
|
208 |/ |
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 @ 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
|
210 |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
211 $ 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
|
212 |
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 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
|
214 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
|
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 $ hg push |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
217 pushing to $TESTTMP/remote (glob) |
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
|
218 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
|
219 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
|
220 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
|
221 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
|
222 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
|
223 |
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 |
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 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
|
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 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
|
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 $ rm -fr ../remote |
30556
c059286a0f9c
tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents:
29979
diff
changeset
|
231 $ 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
|
232 $ 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
|
233 $ 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
|
234 $ 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
|
235 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
|
236 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
|
237 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
|
238 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
|
239 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
|
240 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
|
241 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
|
242 $ 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
|
243 $ 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
|
244 $ 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
|
245 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
|
246 $ 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
|
247 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
|
248 $ hg debugobsolete c70b08862e0838ea6d7c59c85da2f1ed6c8d67da 71e3228bffe1886550777233d6c97bb5a6b2a650 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
249 $ 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
|
250 @ 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
|
251 | |
eaa5fcc5bd20
checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
17547
diff
changeset
|
252 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
|
253 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
20049
diff
changeset
|
254 $ 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
|
255 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
|
256 | |
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 @ 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
|
258 |
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 |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
260 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
|
261 |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
262 $ hg push |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
263 pushing to $TESTTMP/remote (glob) |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
264 searching for changes |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
265 remote has heads on branch 'default' that are not known locally: c70b08862e08 |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
266 abort: push creates new remote head 71e3228bffe1! |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
267 (pull and merge or see 'hg help push' for details about pushing new heads) |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
268 [255] |
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
|
269 |
32009
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
270 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
|
271 |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
272 $ hg pull |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
273 pulling from $TESTTMP/remote (glob) |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
274 searching for changes |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
275 adding changesets |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
276 adding manifests |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
277 adding file changes |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
278 added 1 changesets with 1 changes to 1 files (+1 heads) |
c6cb21ddf74a
checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
30556
diff
changeset
|
279 (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
|
280 $ hg push |
17564
6d0efc802856
test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents:
17549
diff
changeset
|
281 pushing to $TESTTMP/remote (glob) |
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
|
282 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
|
283 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
|
284 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
|
285 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
|
286 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
|
287 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
288 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
|
289 =================================================================== |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
290 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
291 setup |
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 $ cd .. |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
294 $ 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
|
295 $ 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
|
296 $ 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
|
297 $ cd local |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
298 $ hg up -q '.^' |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
299 $ mkcommit new-unrelated |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
300 created new head |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
301 $ hg debugobsolete `getid old` |
33542
b11e8c67fb0f
debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents:
32095
diff
changeset
|
302 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
|
303 $ 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
|
304 @ 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
|
305 | |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
306 | 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
|
307 |/ |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
308 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
|
309 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
310 |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
311 $ hg push |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
312 pushing to $TESTTMP/remote (glob) |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
313 searching for changes |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
314 abort: push creates new remote head 350a93b716be! |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
315 (merge or see 'hg help push' for details about pushing new heads) |
c52728b383b4
discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents:
32009
diff
changeset
|
316 [255] |