Patchwork D1656: synthrepo: create filectx instance in 'filectxfn' callback

login
register
mail settings
Submitter phabricator
Date Dec. 12, 2017, 10:15 p.m.
Message ID <b6bf877cd2ad00c102581f92995f085e@localhost.localdomain>
Download mbox | patch
Permalink /patch/26244/
State Not Applicable
Headers show

Comments

phabricator - Dec. 12, 2017, 10:15 p.m.
This revision was automatically updated to reflect the committed changes.
martinvonz marked an inline comment as done.
Closed by commit rHG304179b21bff: synthrepo: create filectx instance in &#039;filectxfn&#039; callback (authored by martinvonz, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D1656?vs=4380&id=4390#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1656?vs=4380&id=4390

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

AFFECTED FILES
  contrib/synthrepo.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers, durin42, yuja
Cc: yuja, mercurial-devel

Patch

diff --git a/contrib/synthrepo.py b/contrib/synthrepo.py
--- a/contrib/synthrepo.py
+++ b/contrib/synthrepo.py
@@ -369,14 +369,14 @@ 
             while not validpath(path):
                 path = pickpath()
             data = '%s contents\n' % path
-            files[path] = context.memfilectx(repo, path, data)
+            files[path] = data
             dir = os.path.dirname(path)
             while dir and dir not in dirs:
                 dirs.add(dir)
                 dir = os.path.dirname(dir)
 
         def filectxfn(repo, memctx, path):
-            return files[path]
+            return context.memfilectx(repo, path, files[path])
 
         ui.progress(_synthesizing, None)
         message = 'synthesized wide repo with %d files' % (len(files),)