annotate tests/test-obsolete-checkheads.t @ 39270:37e56607cbb9

lfs: add a progress bar when searching for blobs to upload The search itself can take an extreme amount of time if there are a lot of revisions involved. I've got a local repo that took 6 minutes to push 1850 commits, and 60% of that time was spent here (there are ~70K files): \ 58.1% wrapper.py: extractpointers line 297: pointers = extractpointers(... | 57.7% wrapper.py: pointersfromctx line 352: for p in pointersfromctx(ct... | 57.4% wrapper.py: pointerfromctx line 397: p = pointerfromctx(ctx, f, ... \ 38.7% context.py: __contains__ line 368: if f not in ctx: | 38.7% util.py: __get__ line 82: return key in self._manifest | 38.7% context.py: _manifest line 1416: result = self.func(obj) | 38.7% manifest.py: read line 472: return self._manifestctx.re... \ 25.6% revlog.py: revision line 1562: text = rl.revision(self._node) \ 12.8% revlog.py: _chunks line 2217: bins = self._chunks(chain, ... | 12.0% revlog.py: decompressline 2112: ladd(decomp(buffer(data, ch... \ 7.8% revlog.py: checkhash line 2232: self.checkhash(text, node, ... | 7.8% revlog.py: hash line 2315: if node != self.hash(text, ... | 7.8% revlog.py: hash line 2242: return hash(text, p1, p2) \ 12.0% manifest.py: __init__ line 1565: self._data = manifestdict(t... \ 16.8% context.py: filenode line 378: if not _islfs(fctx.filelog(... | 15.7% util.py: __get__ line 706: return self._filelog | 14.8% context.py: _filelog line 1416: result = self.func(obj) | 14.8% localrepo.py: file line 629: return self._repo.file(self... | 14.8% filelog.py: __init__ line 1134: return filelog.filelog(self... | 14.5% revlog.py: __init__ line 24: censorable=True)
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 24 Aug 2018 17:45:46 -0400
parents d0abd7949ea3
children f9232b0310ef
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]
34866
1644623ab096 config: use 'experimental.evolution.create-markers'
Boris Feld <boris.feld@octobus.net>
parents: 34661
diff changeset
9 > evolution.createmarkers=True
17546
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
10 > EOF
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
11 $ mkcommit() {
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
12 > echo "$1" > "$1"
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
13 > hg add "$1"
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
14 > hg ci -m "add $1"
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
15 > }
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
16 $ getid() {
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
17 > hg id --debug -ir "desc('$1')"
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
18 > }
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
19
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
20
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
21 $ hg init remote
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
22 $ cd remote
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
23 $ mkcommit base
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
24 $ hg phase --public .
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
25 $ cd ..
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
26 $ cp -R remote base
17546
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
27 $ hg clone remote local
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
28 updating to branch default
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
30 $ cd local
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
31
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
32 New head replaces old head
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
33 ==========================
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
34
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
35 setup
17834
743d04dd48ec push: refuse to push bumped changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17564
diff changeset
36 (we add the 1 flags to prevent bumped error during the test)
17546
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
37
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
38 $ mkcommit old
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
39 $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
40 pushing to $TESTTMP/remote
17546
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
41 searching for changes
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
42 adding changesets
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
43 adding manifests
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
44 adding file changes
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
45 added 1 changesets with 1 changes to 1 files
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
46 $ hg up -q '.^'
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
47 $ mkcommit new
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
48 created new head
17834
743d04dd48ec push: refuse to push bumped changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17564
diff changeset
49 $ hg debugobsolete --flags 1 `getid old` `getid new`
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
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
64 pushing to $TESTTMP/remote
17546
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
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
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
80 pulling from $TESTTMP/remote
17547
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
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
38250
d0abd7949ea3 phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net>
parents: 38249
diff changeset
83 1 local changesets published
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
84 $ 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
85 @ 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
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 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
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 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
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
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
92 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
93
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
94 $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
95 pushing to $TESTTMP/remote
17547
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
96 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
97 abort: push creates new remote head 71e3228bffe1!
29973
4ddb05751b12 discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents: 22955
diff changeset
98 (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
99 [255]
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 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
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
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
104 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
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 # setup
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
107 #
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
108 # $ rm -fr ../remote
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
109 # $ 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
110 # $ 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
111 # $ hg phase --draft --force c70b08862e08
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
112 # $ 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
113 # @ 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
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 # | 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
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 # 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
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 #
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
121 # 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
122 #
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
123 # $ 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
124 # 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
125 # 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
126 # 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
127 # (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
128 # [255]
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
129
e6de4761d26f checkheads: attend to phases when computing new heads with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17546
diff changeset
130 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
131 ==================================================
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 setup
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
134
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
135 $ rm -fr ../remote
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
136 $ 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
137 $ 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
138 $ hg up -q '.^'
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
139 $ mkcommit other
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
140 created new head
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
141 $ 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
142 @ d7d41ccbd4de (draft) add other
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 | 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
145 |/
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
146 | 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
147 |/
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
148 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
149
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
150
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
151 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
152 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
153
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
154 $ hg push -r 'desc("other")'
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
155 pushing to $TESTTMP/remote
17546
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
156 searching for changes
488e470634d8 test: add testing of checkheads behavior with obsolete
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
157 abort: push creates new remote head d7d41ccbd4de!
29973
4ddb05751b12 discovery: use single quotes in use warning
timeless <timeless@mozdev.org>
parents: 22955
diff changeset
158 (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
159 [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
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
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 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
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
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 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
167
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 $ 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
169 $ 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
170 $ 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
171 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
172 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
173 $ 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
174 $ 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
175 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
176 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
177 [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
178 $ 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
179 $ 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
180 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
181 $ hg push -f
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
182 pushing to $TESTTMP/remote
17548
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
183 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
184 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
185 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
186 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
187 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
188 $ 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
189 $ 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
190 $ 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
191 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
192 $ 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
193 obsoleted 1 changesets
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
194 $ 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
195 @ 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
196 |
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 | 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
198 |/
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
199 o 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
200 |
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
201 | 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
202 |/
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
203 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
204
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
205 $ 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
206 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
207 |
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
208 | o 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
209 |/
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
210 @ 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
211
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
212 $ 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
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 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
215 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
216
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 $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
218 pushing to $TESTTMP/remote
17548
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
219 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
220 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
221 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
222 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
223 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
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 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
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
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 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
230
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
231 $ rm -fr ../remote
30556
c059286a0f9c tests: replace "cp -r" with "cp -R"
Jun Wu <quark@fb.com>
parents: 29979
diff changeset
232 $ 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
233 $ 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
234 $ 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
235 $ 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
236 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
237 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
238 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
239 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
240 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
241 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
242 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
243 $ 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
244 $ 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
245 $ 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
246 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
247 $ 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
248 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
249 $ hg debugobsolete c70b08862e0838ea6d7c59c85da2f1ed6c8d67da 71e3228bffe1886550777233d6c97bb5a6b2a650
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
250 $ 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
251 @ 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
252 |
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 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
254
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 20049
diff changeset
255 $ 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
256 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
257 |
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 @ 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
259
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
260
32009
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
261 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
262
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
263 $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
264 pushing to $TESTTMP/remote
32009
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
265 searching for changes
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
266 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
267 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
268 (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
269 [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
270
32009
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
271 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
272
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
273 $ hg pull
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
274 pulling from $TESTTMP/remote
32009
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
275 searching for changes
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
276 adding changesets
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
277 adding manifests
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
278 adding file changes
c6cb21ddf74a checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30556
diff changeset
279 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
280 (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
281 $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
282 pushing to $TESTTMP/remote
17548
eaa5fcc5bd20 checkheads: check successors for new heads in both missing and common
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17547
diff changeset
283 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
284 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
285 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
286 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
287 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
288
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
289 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
290 ===================================================================
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
291
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
292 setup
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
293
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
294 $ cd ..
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
295 $ 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
296 $ 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
297 $ 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
298 $ cd local
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
299 $ hg up -q '.^'
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
300 $ mkcommit new-unrelated
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
301 created new head
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
302 $ hg debugobsolete `getid old`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 32095
diff changeset
303 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
304 $ 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
305 @ 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
306 |
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
307 | 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
308 |/
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
309 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
310
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
311
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
312 $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34866
diff changeset
313 pushing to $TESTTMP/remote
32095
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
314 searching for changes
c52728b383b4 discovery: prevent crash caused by prune marker having no parent data
Yuya Nishihara <yuya@tcha.org>
parents: 32009
diff changeset
315 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
316 (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
317 [255]