[PATCH 11 of 11] upgrade: drop the prefix to the '_finishdatamigration' function

Augie Fackler raf at durin42.com
Tue Apr 11 11:00:26 EDT 2017


On Mon, Apr 10, 2017 at 06:49:02PM +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
> # Date 1491840382 -7200
> #      Mon Apr 10 18:06:22 2017 +0200
> # Node ID 9edd96848f91a5dfe6e713846b968483a8a28618
> # Parent  ac8de371f662e5647d68cd67b721d6a0c37f1340
> # EXP-Topic upgraderepo
> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
> #              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 9edd96848f91
> upgrade: drop the prefix to the '_finishdatamigration' function

Queued these. While you're in here, please take a moment to consider
what the right public API surface area should be for this module, and
prefix all functions that shouldn't be in that surface area with a _
as a followup.

(In general I'd like us to get better about being intentional about
layers within Mercurial and this seems like a great place to start.)

>
> Now that we are in the 'upgrade' module we can simplify the name.
>
> diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
> --- a/mercurial/upgrade.py
> +++ b/mercurial/upgrade.py
> @@ -487,7 +487,7 @@ def _filterstorefile(srcrepo, dstrepo, r
>
>      return True
>
> -def _upgradefinishdatamigration(ui, srcrepo, dstrepo, requirements):
> +def _finishdatamigration(ui, srcrepo, dstrepo, requirements):
>      """Hook point for extensions to perform additional actions during upgrade.
>
>      This function is called after revlogs and store files have been copied but
> @@ -534,7 +534,7 @@ def _upgraderepo(ui, srcrepo, dstrepo, r
>          dst = dstrepo.store.vfs.join(p)
>          util.copyfile(src, dst, copystat=True)
>
> -    _upgradefinishdatamigration(ui, srcrepo, dstrepo, requirements)
> +    _finishdatamigration(ui, srcrepo, dstrepo, requirements)
>
>      ui.write(_('data fully migrated to temporary repository\n'))
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list