annotate .hgignore @ 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 1bb2df7523a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f2636cfed115 Initial import of hgsubversion into a public repository.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 syntax:glob
1480
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
2 *.egg-info
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
3 *.orig
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
4 *.py,cover
0
f2636cfed115 Initial import of hgsubversion into a public repository.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
5 *.pyc
292
761b095c11fb Also ignore .pyo files.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 137
diff changeset
6 *.pyo
21
8626f3d2e50b Add a small stack of tests that exercise some of the interesting special cases.
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
7 *.swp
54
db7a1ab8851a .hgignore: ignore emacs temporary files
Patrick Mezard <pmezard@gmail.com>
parents: 21
diff changeset
8 *~
1480
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
9 .DS_Store
21
8626f3d2e50b Add a small stack of tests that exercise some of the interesting special cases.
Augie Fackler <durin42@gmail.com>
parents: 0
diff changeset
10 .coverage
1480
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
11 .noseids
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
12 .project
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
13 .pydevproject
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
14 .settings
1481
1bb2df7523a3 hgignore: also ignore tox environments directory
Augie Fackler <raf@durin42.com>
parents: 1480
diff changeset
15 .tox
319
9c10656ce71e Ignore distutils generated files.
Augie Fackler <durin42@gmail.com>
parents: 292
diff changeset
16 MANIFEST
1480
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
17 build
60324fc7e4d7 hgignore: sort lines
Augie Fackler <raf@durin42.com>
parents: 909
diff changeset
18 cover
319
9c10656ce71e Ignore distutils generated files.
Augie Fackler <durin42@gmail.com>
parents: 292
diff changeset
19 dist
525
6b084ea39537 hgignore: ignore the version file
Augie Fackler <durin42@gmail.com>
parents: 353
diff changeset
20 hgsubversion/__version__.py
823
4244f8f37484 Ignore nbproject
César Izurieta <cesar@caih.org>
parents: 525
diff changeset
21 nbproject
903
fd9397c863d4 ignore the temp fixtures directory
Bryan O'Sullivan <bryano@fb.com>
parents: 830
diff changeset
22 tests/fixtures/temp