Mercurial > public > mercurial-scm > hg
comparison mercurial/interfaces/repository.py @ 52480:01818a59f463
interfaces: convert `imanifestrevisionwritable` to a Protocol class
Same as cdd4bc69bfc1 for `imanifestrevisionstored`.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 10 Dec 2024 21:55:13 -0500 |
parents | 99ca58c7cd0d |
children | ed70604d6e07 |
comparison
equal
deleted
inserted
replaced
52479:99ca58c7cd0d | 52480:01818a59f463 |
---|---|
1277 | 1277 |
1278 Returns a 2-tuple of ``(node, flags)`` or raises ``KeyError``. | 1278 Returns a 2-tuple of ``(node, flags)`` or raises ``KeyError``. |
1279 """ | 1279 """ |
1280 | 1280 |
1281 | 1281 |
1282 class imanifestrevisionwritable(imanifestrevisionbase): | 1282 class imanifestrevisionwritable(imanifestrevisionbase, Protocol): |
1283 """Interface representing a manifest revision that can be committed.""" | 1283 """Interface representing a manifest revision that can be committed.""" |
1284 | 1284 |
1285 @abc.abstractmethod | |
1285 def write( | 1286 def write( |
1286 self, transaction, linkrev, p1node, p2node, added, removed, match=None | 1287 self, transaction, linkrev, p1node, p2node, added, removed, match=None |
1287 ): | 1288 ): |
1288 """Add this revision to storage. | 1289 """Add this revision to storage. |
1289 | 1290 |