Mercurial > hg
annotate tests/test-debugextensions.t @ 29196:bf7b8157c483 stable
strip: invalidate phase cache after stripping changeset (issue5235)
When we remove a changeset from the changelog, the phase cache must be
invalidated, otherwise it could refer to changesets that are no longer in the
repo.
To reproduce the failure, I created an extension querying the phase cache after
the strip transaction is over.
To do that, I stripped two commits with a bookmark on one of them to force
another transaction (we open a transaction for moving bookmarks)
after the strip transaction.
Without the fix in this patch, the test leads to a stacktrace showing the issue:
repair.strip(ui, repo, revs, backup)
File "/Users/lcharignon/facebook-hg-rpms/hg-crew/mercurial/repair.py", line 205, in strip
tr.close()
File "/Users/lcharignon/facebook-hg-rpms/hg-crew/mercurial/transaction.py", line 44, in _active
return func(self, *args, **kwds)
File "/Users/lcharignon/facebook-hg-rpms/hg-crew/mercurial/transaction.py", line 490, in close
self._postclosecallback[cat](self)
File "$TESTTMP/crashstrip2.py", line 4, in test
[repo.changelog.node(r) for r in repo.revs("not public()")]
File "/Users/lcharignon/facebook-hg-rpms/hg-crew/mercurial/changelog.py", line 337, in node
return super(changelog, self).node(rev)
File "/Users/lcharignon/facebook-hg-rpms/hg-crew/mercurial/revlog.py", line 377, in node
return self.index[rev][7]
IndexError: revlog index out of range
The situation was encountered in inhibit (evolve's repo) where we would crash
following the volatile set invalidation submitted by Augie in
e6f490e328635312ee214a12bc7fd3c7d46bf9ce. Before his patch the issue was masked
as we were not accessing the phasecache after stripping a revision.
This bug uncovered another but in histedit (see explanation in issue5235).
I changed the histedit test accordingly to avoid fixing two things at once.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Thu, 12 May 2016 06:13:59 -0700 |
parents | a6573503342d |
children | 3ef9aa7ad1fc |
rev | line source |
---|---|
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
1 $ hg debugextensions |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
2 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
3 $ debugpath=`pwd`/extwithoutinfos.py |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
4 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
5 $ cat > extwithoutinfos.py <<EOF |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
6 > EOF |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
7 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
8 $ cat >> $HGRCPATH <<EOF |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
9 > [extensions] |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
10 > color= |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
11 > histedit= |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
12 > patchbomb= |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
13 > rebase= |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
14 > mq= |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
15 > ext1 = $debugpath |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
16 > EOF |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
17 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
18 $ hg debugextensions |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
19 color |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
20 ext1 (untested!) |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
21 histedit |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
22 mq |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
23 patchbomb |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
24 rebase |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
25 |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
26 $ hg debugextensions -v |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
27 color |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
28 location: */hgext/color.py* (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
29 tested with: internal |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
30 ext1 |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
31 location: */extwithoutinfos.py* (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
32 histedit |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
33 location: */hgext/histedit.py* (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
34 tested with: internal |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
35 mq |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
36 location: */hgext/mq.py* (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
37 tested with: internal |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
38 patchbomb |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
39 location: */hgext/patchbomb.py* (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
40 tested with: internal |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
41 rebase |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
42 location: */hgext/rebase.py* (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
43 tested with: internal |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
44 |
26430
1f8208a7277e
test-debugextensions: sanitize JSON output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
26351
diff
changeset
|
45 $ hg debugextensions -Tjson | sed 's|\\\\|/|g' |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
46 [ |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
47 { |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
48 "buglink": "", |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
49 "name": "color", |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
50 "source": "*/hgext/color.py*", (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
51 "testedwith": "internal" |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
52 }, |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
53 { |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
54 "buglink": "", |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
55 "name": "ext1", |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
56 "source": "*/extwithoutinfos.py*", (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
57 "testedwith": "" |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
58 }, |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
59 { |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
60 "buglink": "", |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
61 "name": "histedit", |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
62 "source": "*/hgext/histedit.py*", (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
63 "testedwith": "internal" |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
64 }, |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
65 { |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
66 "buglink": "", |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
67 "name": "mq", |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
68 "source": "*/hgext/mq.py*", (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
69 "testedwith": "internal" |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
70 }, |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
71 { |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
72 "buglink": "", |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
73 "name": "patchbomb", |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
74 "source": "*/hgext/patchbomb.py*", (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
75 "testedwith": "internal" |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
76 }, |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
77 { |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
78 "buglink": "", |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
79 "name": "rebase", |
28615
a6573503342d
test-debugextensions: passes with byte-compilation disabled (issue5147)
Kevin Bullock <kbullock@ringworld.org>
parents:
26430
diff
changeset
|
80 "source": "*/hgext/rebase.py*", (glob) |
26351
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
81 "testedwith": "internal" |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
82 } |
8c7d8d5e1e0f
mercurial: add debugextensions command (issue4676)
liscju <piotr.listkiewicz@gmail.com>
parents:
diff
changeset
|
83 ] |