Patchwork D8993: git: actually copy treemanifest instances in .copy() (issue6398)

login
register
mail settings
Submitter phabricator
Date Sept. 7, 2020, 9:30 p.m.
Message ID <differential-rev-PHID-DREV-nxsgxdibd5bnr4yhstbl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47102/
State Superseded
Headers show

Comments

phabricator - Sept. 7, 2020, 9:30 p.m.
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8993

AFFECTED FILES
  hgext/git/manifest.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/git/manifest.py b/hgext/git/manifest.py
--- a/hgext/git/manifest.py
+++ b/hgext/git/manifest.py
@@ -1,6 +1,7 @@ 
 from __future__ import absolute_import
 
 from mercurial import (
+    error,
     match as matchmod,
     pathutil,
     pycompat,
@@ -217,7 +218,7 @@ 
             return b''
 
     def copy(self):
-        pass
+        return gittreemanifest(self._git_repo, self._tree, dict(self._pending_changes))
 
     def items(self):
         for f in self: