##// END OF EJS Templates
manifest: introduce memmanifestctx and memtreemanifestctx...
Durham Goode -
r30342:fe1ee393 default
parent child Browse files
Show More
@@ -1323,6 +1323,17 b' class manifestlog(object):'
1323 1323 def add(self, m, transaction, link, p1, p2, added, removed):
1324 1324 return self._revlog.add(m, transaction, link, p1, p2, added, removed)
1325 1325
1326 class memmanifestctx(object):
1327 def __init__(self, repo):
1328 self._repo = repo
1329 self._manifestdict = manifestdict()
1330
1331 def new(self):
1332 return memmanifestctx(self._repo)
1333
1334 def read(self):
1335 return self._manifestdict
1336
1326 1337 class manifestctx(object):
1327 1338 """A class representing a single revision of a manifest, including its
1328 1339 contents, its parent revs, and its linkrev.
@@ -1346,6 +1357,9 b' class manifestctx(object):'
1346 1357 def node(self):
1347 1358 return self._node
1348 1359
1360 def new(self):
1361 return memmanifestctx(self._repo)
1362
1349 1363 def read(self):
1350 1364 if not self._data:
1351 1365 if self._node == revlog.nullid:
@@ -1400,6 +1414,18 b' class manifestctx(object):'
1400 1414 def find(self, key):
1401 1415 return self.read().find(key)
1402 1416
1417 class memtreemanifestctx(object):
1418 def __init__(self, repo, dir=''):
1419 self._repo = repo
1420 self._dir = dir
1421 self._treemanifest = treemanifest()
1422
1423 def new(self, dir=''):
1424 return memtreemanifestctx(self._repo, dir=dir)
1425
1426 def read(self):
1427 return self._treemanifest
1428
1403 1429 class treemanifestctx(object):
1404 1430 def __init__(self, repo, dir, node):
1405 1431 self._repo = repo
@@ -1443,6 +1469,9 b' class treemanifestctx(object):'
1443 1469 def node(self):
1444 1470 return self._node
1445 1471
1472 def new(self, dir=''):
1473 return memtreemanifestctx(self._repo, dir=dir)
1474
1446 1475 def readdelta(self, shallow=False):
1447 1476 '''Returns a manifest containing just the entries that are present
1448 1477 in this manifest, but not in its p1 manifest. This is efficient to read
General Comments 0
You need to be logged in to leave comments. Login now