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
--- 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: