[PATCH 4 of 4 V2] lfs: restore the local blob store after a repo upgrade

Yuya Nishihara yuya at tcha.org
Tue Dec 12 09:23:10 EST 2017


On Sat, 09 Dec 2017 20:57:11 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1512710310 18000
> #      Fri Dec 08 00:18:30 2017 -0500
> # Node ID d435feccadfa39d45fefc162ebda0efac2e2ba7c
> # Parent  f060232e47d7e6f480c102e091e444d5f79de889
> lfs: restore the local blob store after a repo upgrade

> +def upgradefinishdatamigration(orig, ui, srcrepo, dstrepo, requirements):
> +    orig(ui, srcrepo, dstrepo, requirements)
> +
> +    srclfsvfs = srcrepo.svfs.lfslocalblobstore.vfs
> +    dstlfsvfs = dstrepo.svfs.lfslocalblobstore.vfs
> +
> +    for dirpath, dirs, files in srclfsvfs.walk():
> +        for oid in files:
> +            srcrepo.ui.write(_('copying lfs blob %s\n') % oid)
               ^^^^^^^^^^
Nit: perhaps it's better to use 'ui' passed by argument, not srcrepo's.


More information about the Mercurial-devel mailing list