##// END OF EJS Templates
remove appendfile for the manifest when adding a changegroup...
Benoit Boissinot -
r2395:8ed45fb1 default
parent child Browse files
Show More
@@ -1498,8 +1498,8 class localrepository(object):
1498
1498
1499 tr = self.transaction()
1499 tr = self.transaction()
1500
1500
1501 # write changelog and manifest data to temp files so
1501 # write changelog data to temp files so concurrent readers will not see
1502 # concurrent readers will not see inconsistent view
1502 # inconsistent view
1503 cl = None
1503 cl = None
1504 try:
1504 try:
1505 cl = appendfile.appendchangelog(self.opener, self.changelog.version)
1505 cl = appendfile.appendchangelog(self.opener, self.changelog.version)
@@ -1515,11 +1515,6 class localrepository(object):
1515 cnr = cl.count() - 1
1515 cnr = cl.count() - 1
1516 changesets = cnr - cor
1516 changesets = cnr - cor
1517
1517
1518 mf = None
1519 try:
1520 mf = appendfile.appendmanifest(self.opener,
1521 self.manifest.version)
1522
1523 # pull off the manifest group
1518 # pull off the manifest group
1524 self.ui.status(_("adding manifests\n"))
1519 self.ui.status(_("adding manifests\n"))
1525 chunkiter = changegroup.chunkiter(source)
1520 chunkiter = changegroup.chunkiter(source)
@@ -1527,7 +1522,7 class localrepository(object):
1527 # if the result of the merge of 1 and 2 is the same in 3 and 4,
1522 # if the result of the merge of 1 and 2 is the same in 3 and 4,
1528 # no new manifest will be created and the manifest group will
1523 # no new manifest will be created and the manifest group will
1529 # be empty during the pull
1524 # be empty during the pull
1530 mf.addgroup(chunkiter, revmap, tr)
1525 self.manifest.addgroup(chunkiter, revmap, tr)
1531
1526
1532 # process the files
1527 # process the files
1533 self.ui.status(_("adding file changes\n"))
1528 self.ui.status(_("adding file changes\n"))
@@ -1544,22 +1539,14 class localrepository(object):
1544 revisions += fl.count() - o
1539 revisions += fl.count() - o
1545 files += 1
1540 files += 1
1546
1541
1547 # write order here is important so concurrent readers will see
1548 # consistent view of repo
1549 mf.writedata()
1550 finally:
1551 if mf:
1552 mf.cleanup()
1553 cl.writedata()
1542 cl.writedata()
1554 finally:
1543 finally:
1555 if cl:
1544 if cl:
1556 cl.cleanup()
1545 cl.cleanup()
1557
1546
1558 # make changelog and manifest see real files again
1547 # make changelog see real files again
1559 self.changelog = changelog.changelog(self.opener, self.changelog.version)
1548 self.changelog = changelog.changelog(self.opener, self.changelog.version)
1560 self.manifest = manifest.manifest(self.opener, self.manifest.version)
1561 self.changelog.checkinlinesize(tr)
1549 self.changelog.checkinlinesize(tr)
1562 self.manifest.checkinlinesize(tr)
1563
1550
1564 newheads = len(self.changelog.heads())
1551 newheads = len(self.changelog.heads())
1565 heads = ""
1552 heads = ""
General Comments 0
You need to be logged in to leave comments. Login now