annotate tests/test-obsolete-checkheads.t @ 32402:c8e10565a113

error: add a new exception named WdirUnsupported This series intents to support wdir() predicate with different operators like ~, ^. Currently the storage class don't support wdir(). This exception is introduced so that it can be raised from places where wdir() is passed and is not supported and we can catch this where we want to support the predicate. Also throwing an error at low level and catching at some higher level is better than using if-else especially for perf.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 19 May 2017 19:10:37 +0530
parents c52728b383b4
children b11e8c67fb0f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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]
fab9dda0f2a3 obsolete: update tests to use obsolete options
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
9 > evolution=createmarkers
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`
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
50 $ 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
51 @ 71e3228bffe1 (draft) add new
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
52 |
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
53 | 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
54 |/
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
55 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
56
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
57 $ 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
58
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
59 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
60 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
61
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
62 $ hg push
17564
6d0efc802856 test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents: 17549
diff changeset
63 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
64 searching for changes
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
65 adding changesets
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
66 adding manifests
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
67 adding file changes
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
68 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
69
17547
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
70 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
71 =============================================
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 setup
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 $ rm -fr ../remote
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
76 $ 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
77 $ 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
78 $ hg pull -v
17564
6d0efc802856 test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents: 17549
diff changeset
79 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
80 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
81 no changes found
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
82 $ 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
83 @ 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
84 |
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
85 | 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
86 |/
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
87 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
88
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 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
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 $ hg push
17564
6d0efc802856 test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents: 17549
diff changeset
93 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
94 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
95 abort: push creates new remote head 71e3228bffe1!
29973
4ddb05751b12 discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents: 22955
diff changeset
96 (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
97 [255]
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
98
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
99 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
100 ==============================================
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 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
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 # setup
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
105 #
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
106 # $ rm -fr ../remote
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
107 # $ 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
108 # $ 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
109 # $ hg phase --draft --force c70b08862e08
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
110 # $ 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
111 # @ 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
112 # |
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
113 # | 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
114 # |/
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
115 # 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
116 #
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 # 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
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 # $ 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
122 # 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
123 # 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
124 # 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
125 # (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
126 # [255]
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
127
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
128 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
129 ==================================================
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 setup
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 $ rm -fr ../remote
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
134 $ 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
135 $ 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
136 $ hg up -q '.^'
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
137 $ mkcommit other
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
138 created new head
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
139 $ 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
140 @ d7d41ccbd4de (draft) add other
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
141 |
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
142 | 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
143 |/
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
144 | 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
145 |/
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
146 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
147
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 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
150 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
151
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
152 $ hg push -r 'desc("other")'
17564
6d0efc802856 test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents: 17549
diff changeset
153 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
154 searching for changes
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
155 abort: push creates new remote head d7d41ccbd4de!
29973
4ddb05751b12 discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents: 22955
diff changeset
156 (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
157 [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
158
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 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
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 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
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 $ 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
167 $ 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
168 $ 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
169 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
170 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
171 $ 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
172 $ 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
173 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
174 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
175 [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
176 $ 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
177 $ 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
178 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
179 $ hg push -f
17564
6d0efc802856 test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents: 17549
diff changeset
180 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
181 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
182 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
183 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
184 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
185 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
186 $ 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
187 $ 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
188 $ 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
189 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
190 $ hg debugobsolete `getid old` `getid new`
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
191 $ 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
192 @ 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
193 |
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 | 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
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 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
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 | 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
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 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
201
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
202 $ 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
203 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
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 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
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 @ 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
208
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
209 $ 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
210
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 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
212 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
213
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 $ hg push
17564
6d0efc802856 test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents: 17549
diff changeset
215 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
216 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
217 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
218 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
219 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
220 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
221
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
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 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
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
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 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
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 $ rm -fr ../remote
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
229 $ 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
230 $ 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
231 $ 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
232 $ 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
233 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
234 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
235 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
236 added 1 changesets with 1 changes to 1 files
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 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
238 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
239 $ 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
240 $ 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
241 $ 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
242 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
243 $ 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
244 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
245 $ hg debugobsolete c70b08862e0838ea6d7c59c85da2f1ed6c8d67da 71e3228bffe1886550777233d6c97bb5a6b2a650
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
246 $ 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
247 @ 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
248 |
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 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
250
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
251 $ 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
252 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
253 |
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 @ 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
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
32009
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
257 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
258
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
259 $ hg push
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
260 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
261 searching for changes
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
262 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
263 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
264 (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
265 [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
266
32009
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
267 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
268
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
269 $ hg pull
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
270 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
271 searching for changes
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
272 adding changesets
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
273 adding manifests
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
274 adding file changes
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
275 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
276 (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
277 $ hg push
17564
6d0efc802856 test-obsolete-checkheads: fix on windows
Patrick Mezard <patrick@mezard.eu>
parents: 17549
diff changeset
278 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
279 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
280 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
281 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
282 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
283 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
284
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
285 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
286 ===================================================================
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 setup
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 $ cd ..
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
291 $ 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
292 $ 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
293 $ 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
294 $ cd local
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
295 $ hg up -q '.^'
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
296 $ mkcommit new-unrelated
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
297 created new head
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
298 $ hg debugobsolete `getid old`
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
299 $ 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
300 @ 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
301 |
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
302 | 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
303 |/
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
304 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
305
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
306
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
307 $ hg push
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
308 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
309 searching for changes
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
310 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
311 (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
312 [255]