Show More
@@ -1700,9 +1700,13 b' class localrepository(object):' | |||||
1700 | trp = weakref.proxy(tr) |
|
1700 | trp = weakref.proxy(tr) | |
1701 |
|
1701 | |||
1702 | if ctx.files(): |
|
1702 | if ctx.files(): | |
1703 | m1 = p1.manifest() |
|
1703 | m1ctx = p1.manifestctx() | |
1704 | m2 = p2.manifest() |
|
1704 | m2ctx = p2.manifestctx() | |
1705 | m = m1.copy() |
|
1705 | mctx = m1ctx.copy() | |
|
1706 | ||||
|
1707 | m = mctx.read() | |||
|
1708 | m1 = m1ctx.read() | |||
|
1709 | m2 = m2ctx.read() | |||
1706 |
|
1710 | |||
1707 | # check in files |
|
1711 | # check in files | |
1708 | added = [] |
|
1712 | added = [] | |
@@ -1736,7 +1740,7 b' class localrepository(object):' | |||||
1736 | drop = [f for f in removed if f in m] |
|
1740 | drop = [f for f in removed if f in m] | |
1737 | for f in drop: |
|
1741 | for f in drop: | |
1738 | del m[f] |
|
1742 | del m[f] | |
1739 |
mn = |
|
1743 | mn = mctx.write(trp, linkrev, | |
1740 |
|
|
1744 | p1.manifestnode(), p2.manifestnode(), | |
1741 |
|
|
1745 | added, drop) | |
1742 | files = changed + removed |
|
1746 | files = changed + removed |
@@ -1320,14 +1320,14 b' class manifestlog(object):' | |||||
1320 | mancache[node] = m |
|
1320 | mancache[node] = m | |
1321 | return m |
|
1321 | return m | |
1322 |
|
1322 | |||
1323 | def add(self, m, transaction, link, p1, p2, added, removed): |
|
|||
1324 | return self._revlog.add(m, transaction, link, p1, p2, added, removed) |
|
|||
1325 |
|
||||
1326 | class memmanifestctx(object): |
|
1323 | class memmanifestctx(object): | |
1327 | def __init__(self, repo): |
|
1324 | def __init__(self, repo): | |
1328 | self._repo = repo |
|
1325 | self._repo = repo | |
1329 | self._manifestdict = manifestdict() |
|
1326 | self._manifestdict = manifestdict() | |
1330 |
|
1327 | |||
|
1328 | def _revlog(self): | |||
|
1329 | return self._repo.manifestlog._revlog | |||
|
1330 | ||||
1331 | def new(self): |
|
1331 | def new(self): | |
1332 | return memmanifestctx(self._repo) |
|
1332 | return memmanifestctx(self._repo) | |
1333 |
|
1333 | |||
@@ -1339,6 +1339,10 b' class memmanifestctx(object):' | |||||
1339 | def read(self): |
|
1339 | def read(self): | |
1340 | return self._manifestdict |
|
1340 | return self._manifestdict | |
1341 |
|
1341 | |||
|
1342 | def write(self, transaction, link, p1, p2, added, removed): | |||
|
1343 | return self._revlog().add(self._manifestdict, transaction, link, p1, p2, | |||
|
1344 | added, removed) | |||
|
1345 | ||||
1342 | class manifestctx(object): |
|
1346 | class manifestctx(object): | |
1343 | """A class representing a single revision of a manifest, including its |
|
1347 | """A class representing a single revision of a manifest, including its | |
1344 | contents, its parent revs, and its linkrev. |
|
1348 | contents, its parent revs, and its linkrev. | |
@@ -1430,6 +1434,9 b' class memtreemanifestctx(object):' | |||||
1430 | self._dir = dir |
|
1434 | self._dir = dir | |
1431 | self._treemanifest = treemanifest() |
|
1435 | self._treemanifest = treemanifest() | |
1432 |
|
1436 | |||
|
1437 | def _revlog(self): | |||
|
1438 | return self._repo.manifestlog._revlog | |||
|
1439 | ||||
1433 | def new(self, dir=''): |
|
1440 | def new(self, dir=''): | |
1434 | return memtreemanifestctx(self._repo, dir=dir) |
|
1441 | return memtreemanifestctx(self._repo, dir=dir) | |
1435 |
|
1442 | |||
@@ -1441,6 +1448,10 b' class memtreemanifestctx(object):' | |||||
1441 | def read(self): |
|
1448 | def read(self): | |
1442 | return self._treemanifest |
|
1449 | return self._treemanifest | |
1443 |
|
1450 | |||
|
1451 | def write(self, transaction, link, p1, p2, added, removed): | |||
|
1452 | return self._revlog().add(self._treemanifest, transaction, link, p1, p2, | |||
|
1453 | added, removed) | |||
|
1454 | ||||
1444 | class treemanifestctx(object): |
|
1455 | class treemanifestctx(object): | |
1445 | def __init__(self, repo, dir, node): |
|
1456 | def __init__(self, repo, dir, node): | |
1446 | self._repo = repo |
|
1457 | self._repo = repo |
General Comments 0
You need to be logged in to leave comments.
Login now