git: actually copy treemanifest instances in .copy() (issue6398)
authorAugie Fackler <raf@durin42.com>
Mon, 07 Sep 2020 16:13:10 -0400
changeset 45417 c8695439d7e3
parent 45414 66a10bd1b8db
child 45418 4111954cf86d
git: actually copy treemanifest instances in .copy() (issue6398) The implementation here is so simple I honestly have no idea why I didn't do it at the time. Hopefully there's not some nuance past-me forgot to write down. Differential Revision: https://phab.mercurial-scm.org/D8993
hgext/git/manifest.py
--- a/hgext/git/manifest.py	Mon Sep 07 15:46:56 2020 -0400
+++ b/hgext/git/manifest.py	Mon Sep 07 16:13:10 2020 -0400
@@ -217,7 +217,9 @@
             return b''
 
     def copy(self):
-        pass
+        return gittreemanifest(
+            self._git_repo, self._tree, dict(self._pending_changes)
+        )
 
     def items(self):
         for f in self: