mercurial/context.py
changeset 44050 2ecbc4ec87d8
parent 44039 f652b7ddc1d4
child 44051 436d106de670
--- a/mercurial/context.py	Thu Jan 09 15:41:40 2020 -0800
+++ b/mercurial/context.py	Fri Jan 10 17:03:23 2020 -0800
@@ -2445,6 +2445,9 @@
                 # necessary for memctx to register a deletion.
                 return None
 
+        if branch is None:
+            branch = self._wrappedctx.branch()
+
         return memctx(
             self._repo,
             parents,