Show More
@@ -1434,9 +1434,9 b' def commitmemorynode(repo, p1, p2, wctx,' | |||||
1434 | if b'branch' in extra: |
|
1434 | if b'branch' in extra: | |
1435 | branch = extra[b'branch'] |
|
1435 | branch = extra[b'branch'] | |
1436 |
|
1436 | |||
|
1437 | wctx.setparents(repo[p1].node(), repo[p2].node()) | |||
1437 | memctx = wctx.tomemctx( |
|
1438 | memctx = wctx.tomemctx( | |
1438 | commitmsg, |
|
1439 | commitmsg, | |
1439 | parents=(p1, p2), |
|
|||
1440 | date=date, |
|
1440 | date=date, | |
1441 | extra=extra, |
|
1441 | extra=extra, | |
1442 | user=user, |
|
1442 | user=user, |
@@ -2161,6 +2161,10 b' class overlayworkingctx(committablectx):' | |||||
2161 | # ``overlayworkingctx`` (e.g. with --collapse). |
|
2161 | # ``overlayworkingctx`` (e.g. with --collapse). | |
2162 | util.clearcachedproperty(self, b'_manifest') |
|
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 | def data(self, path): |
|
2168 | def data(self, path): | |
2165 | if self.isdirty(path): |
|
2169 | if self.isdirty(path): | |
2166 | if self._cache[path][b'exists']: |
|
2170 | if self._cache[path][b'exists']: | |
@@ -2415,9 +2419,9 b' class overlayworkingctx(committablectx):' | |||||
2415 | ``text`` is the commit message. |
|
2419 | ``text`` is the commit message. | |
2416 | ``parents`` (optional) are rev numbers. |
|
2420 | ``parents`` (optional) are rev numbers. | |
2417 | """ |
|
2421 | """ | |
2418 |
# Default parents to the wrapped context |
|
2422 | # Default parents to the wrapped context if not passed. | |
2419 | if parents is None: |
|
2423 | if parents is None: | |
2420 |
parents = self. |
|
2424 | parents = self.parents() | |
2421 | if len(parents) == 1: |
|
2425 | if len(parents) == 1: | |
2422 | parents = (parents[0], None) |
|
2426 | parents = (parents[0], None) | |
2423 |
|
2427 |
General Comments 0
You need to be logged in to leave comments.
Login now