##// END OF EJS Templates
manifest: add copy to mfctx classes...
Durham Goode -
r30343:952e1916 default
parent child Browse files
Show More
@@ -1331,6 +1331,11 b' class memmanifestctx(object):'
1331 1331 def new(self):
1332 1332 return memmanifestctx(self._repo)
1333 1333
1334 def copy(self):
1335 memmf = memmanifestctx(self._repo)
1336 memmf._manifestdict = self.read().copy()
1337 return memmf
1338
1334 1339 def read(self):
1335 1340 return self._manifestdict
1336 1341
@@ -1360,6 +1365,11 b' class manifestctx(object):'
1360 1365 def new(self):
1361 1366 return memmanifestctx(self._repo)
1362 1367
1368 def copy(self):
1369 memmf = memmanifestctx(self._repo)
1370 memmf._manifestdict = self.read().copy()
1371 return memmf
1372
1363 1373 def read(self):
1364 1374 if not self._data:
1365 1375 if self._node == revlog.nullid:
@@ -1423,6 +1433,11 b' class memtreemanifestctx(object):'
1423 1433 def new(self, dir=''):
1424 1434 return memtreemanifestctx(self._repo, dir=dir)
1425 1435
1436 def copy(self):
1437 memmf = memtreemanifestctx(self._repo, dir=self._dir)
1438 memmf._treemanifest = self._treemanifest.copy()
1439 return memmf
1440
1426 1441 def read(self):
1427 1442 return self._treemanifest
1428 1443
@@ -1472,6 +1487,11 b' class treemanifestctx(object):'
1472 1487 def new(self, dir=''):
1473 1488 return memtreemanifestctx(self._repo, dir=dir)
1474 1489
1490 def copy(self):
1491 memmf = memtreemanifestctx(self._repo, dir=self._dir)
1492 memmf._treemanifest = self.read().copy()
1493 return memmf
1494
1475 1495 def readdelta(self, shallow=False):
1476 1496 '''Returns a manifest containing just the entries that are present
1477 1497 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