##// END OF EJS Templates
overlayworkginctx: implement a setparents() to mirror dirstate.setparents()...
Martin von Zweigbergk -
r44503:436d106d default
parent child Browse files
Show More
@@ -1434,9 +1434,9 b' def commitmemorynode(repo, p1, p2, wctx,'
1434 1434 if b'branch' in extra:
1435 1435 branch = extra[b'branch']
1436 1436
1437 wctx.setparents(repo[p1].node(), repo[p2].node())
1437 1438 memctx = wctx.tomemctx(
1438 1439 commitmsg,
1439 parents=(p1, p2),
1440 1440 date=date,
1441 1441 extra=extra,
1442 1442 user=user,
@@ -2161,6 +2161,10 b' class overlayworkingctx(committablectx):'
2161 2161 # ``overlayworkingctx`` (e.g. with --collapse).
2162 2162 util.clearcachedproperty(self, b'_manifest')
2163 2163
2164 def setparents(self, p1node, p2node=nullid):
2165 assert p1node == self._wrappedctx.node()
2166 self._parents = [self._wrappedctx, self._repo.unfiltered()[p2node]]
2167
2164 2168 def data(self, path):
2165 2169 if self.isdirty(path):
2166 2170 if self._cache[path][b'exists']:
@@ -2415,9 +2419,9 b' class overlayworkingctx(committablectx):'
2415 2419 ``text`` is the commit message.
2416 2420 ``parents`` (optional) are rev numbers.
2417 2421 """
2418 # Default parents to the wrapped contexts' if not passed.
2422 # Default parents to the wrapped context if not passed.
2419 2423 if parents is None:
2420 parents = self._wrappedctx.parents()
2424 parents = self.parents()
2421 2425 if len(parents) == 1:
2422 2426 parents = (parents[0], None)
2423 2427
General Comments 0
You need to be logged in to leave comments. Login now