Mercurial > hgsubversion
annotate tests/fixtures/dir_removal.svndump @ 1550:67b28d657f62
sqliterevmap: break ".hashes()" cycle in a safer way
The `fromsvn()` revset implementation could cause weakref error when using
sqliterevmap like:
File "hgsubversion/util.py", line 357, in <lambda>
return subset.filter(lambda r: tonode(r) in hashes)
File "hgsubversion/maps.py", line 542, in __contains__
return self.get(key) != None
File "hgsubversion/maps.py", line 533, in get
for row in self.revmap._query(
ReferenceError: weakly-referenced object no longer exists
Basically the seemingly harmless assignment could break surprisingly:
# dangerous: `hashes` does not have a reference of `meta.revmap` and may
# become unavailable after `meta`, `revmap` being released by refcount.
hashes = meta.revmap.hashes()
The above syntax is nice to support while avoiding cycles is also nice.
This patch removes `revmap._hashes` so the revmap no longer owns a reference
of a `ReverseRevMap` object so the `ReverseRevMap` object no longer needs to
use weakref for `self.revmap`.
This could actually be caught by `comprehensive/test_sqlite_revmap.py`.
I was not careful enough verifying the "fromsvn()" patch.
author | Jun Wu <quark@fb.com> |
---|---|
date | Thu, 21 Dec 2017 17:39:52 -0800 |
parents | 8c7dae2e0f54 |
children |
rev | line source |
---|---|
1509
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
1 SVN-fs-dump-format-version: 2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
3 UUID: 5554378f-55cc-437f-9045-6148f657307d |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
4 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
5 Revision-number: 0 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
6 Prop-content-length: 56 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
7 Content-length: 56 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
8 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
9 K 8 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
10 svn:date |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
11 V 27 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
12 2017-05-23T11:48:49.399395Z |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
13 PROPS-END |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
14 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
15 Revision-number: 1 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
16 Prop-content-length: 103 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
17 Content-length: 103 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
18 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
19 K 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
20 svn:author |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
21 V 8 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
22 testuser |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
23 K 8 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
24 svn:date |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
25 V 27 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
26 2017-05-23T11:49:53.974692Z |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
27 K 7 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
28 svn:log |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
29 V 1 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
30 1 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
31 PROPS-END |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
32 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
33 Node-path: dir1 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
34 Node-kind: dir |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
35 Node-action: add |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
36 Prop-content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
37 Content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
38 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
39 PROPS-END |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
40 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
41 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
42 Node-path: dir1/1.txt |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
43 Node-kind: file |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
44 Node-action: add |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
45 Text-content-md5: d41d8cd98f00b204e9800998ecf8427e |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
46 Text-content-sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
47 Prop-content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
48 Text-content-length: 0 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
49 Content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
50 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
51 PROPS-END |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
52 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
53 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
54 Node-path: dir2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
55 Node-kind: dir |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
56 Node-action: add |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
57 Prop-content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
58 Content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
59 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
60 PROPS-END |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
61 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
62 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
63 Node-path: dir2/2.txt |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
64 Node-kind: file |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
65 Node-action: add |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
66 Text-content-md5: d41d8cd98f00b204e9800998ecf8427e |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
67 Text-content-sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
68 Prop-content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
69 Text-content-length: 0 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
70 Content-length: 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
71 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
72 PROPS-END |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
73 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
74 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
75 Revision-number: 2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
76 Prop-content-length: 103 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
77 Content-length: 103 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
78 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
79 K 10 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
80 svn:author |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
81 V 8 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
82 testuser |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
83 K 8 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
84 svn:date |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
85 V 27 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
86 2017-05-23T11:50:14.852941Z |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
87 K 7 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
88 svn:log |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
89 V 1 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
90 2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
91 PROPS-END |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
92 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
93 Node-path: dir1/dir2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
94 Node-kind: dir |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
95 Node-action: add |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
96 Node-copyfrom-rev: 1 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
97 Node-copyfrom-path: dir2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
98 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
99 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
100 Node-path: dir2 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
101 Node-action: delete |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
102 |
8c7dae2e0f54
svnwrap: don't add paths to revision outside of subdir
Ivan Lezhankin <ilezhankin@yandex-team.ru>
parents:
diff
changeset
|
103 |