##// END OF EJS Templates
commit: use separate variable for p1 manifest and new manifest...
Martin von Zweigbergk -
r22909:4545c5b5 default
parent child Browse files
Show More
@@ -1387,8 +1387,9 b' class localrepository(object):'
1387 trp = weakref.proxy(tr)
1387 trp = weakref.proxy(tr)
1388
1388
1389 if ctx.files():
1389 if ctx.files():
1390 m1 = p1.manifest().copy()
1390 m1 = p1.manifest()
1391 m2 = p2.manifest()
1391 m2 = p2.manifest()
1392 m = m1.copy()
1392
1393
1393 # check in files
1394 # check in files
1394 new = {}
1395 new = {}
@@ -1404,7 +1405,7 b' class localrepository(object):'
1404 else:
1405 else:
1405 new[f] = self._filecommit(fctx, m1, m2, linkrev,
1406 new[f] = self._filecommit(fctx, m1, m2, linkrev,
1406 trp, changed)
1407 trp, changed)
1407 m1.set(f, fctx.flags())
1408 m.set(f, fctx.flags())
1408 except OSError, inst:
1409 except OSError, inst:
1409 self.ui.warn(_("trouble committing %s!\n") % f)
1410 self.ui.warn(_("trouble committing %s!\n") % f)
1410 raise
1411 raise
@@ -1415,13 +1416,14 b' class localrepository(object):'
1415 raise
1416 raise
1416
1417
1417 # update manifest
1418 # update manifest
1418 m1.update(new)
1419 m.update(new)
1419 removed = [f for f in sorted(removed) if f in m1 or f in m2]
1420 removed = [f for f in sorted(removed) if f in m1 or f in m2]
1420 drop = [f for f in removed if f in m1]
1421 drop = [f for f in removed if f in m]
1421 for f in drop:
1422 for f in drop:
1422 del m1[f]
1423 del m[f]
1423 mn = self.manifest.add(m1, trp, linkrev, p1.manifestnode(),
1424 mn = self.manifest.add(m, trp, linkrev,
1424 p2.manifestnode(), new, drop)
1425 p1.manifestnode(), p2.manifestnode(),
1426 new, drop)
1425 files = changed + removed
1427 files = changed + removed
1426 else:
1428 else:
1427 mn = p1.manifestnode()
1429 mn = p1.manifestnode()
General Comments 0
You need to be logged in to leave comments. Login now