Patchwork [1,of,4,STABLE,follow-up] streamclone: rename '_emit' to '_emit2' for clarity

login
register
mail settings
Submitter Boris Feld
Date Jan. 26, 2018, 4:07 p.m.
Message ID <7d4c20e651bebd76f091.1516982849@FB>
Download mbox | patch
Permalink /patch/27065/
State Accepted
Headers show

Comments

Boris Feld - Jan. 26, 2018, 4:07 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1516826268 -3600
#      Wed Jan 24 21:37:48 2018 +0100
# Branch stable
# Node ID 7d4c20e651bebd76f09183681ba9d743834dc53d
# Parent  de23345e2b6b880880896e27e5e2f745efa3799b
# EXP-Topic b2-stream
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 7d4c20e651be
streamclone: rename '_emit' to '_emit2' for clarity

This change was suggested by Gregory Szorc.
Gregory Szorc - Jan. 29, 2018, 7:49 p.m.
On Fri, Jan 26, 2018 at 8:07 AM, Boris Feld <boris.feld@octobus.net> wrote:

> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1516826268 -3600
> #      Wed Jan 24 21:37:48 2018 +0100
> # Branch stable
> # Node ID 7d4c20e651bebd76f09183681ba9d743834dc53d
> # Parent  de23345e2b6b880880896e27e5e2f745efa3799b
> # EXP-Topic b2-stream
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> 7d4c20e651be
> streamclone: rename '_emit' to '_emit2' for clarity
>

Queued for stable. Thank you for the minor fixups.


>
> This change was suggested by Gregory Szorc.
>
> diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py
> --- a/mercurial/streamclone.py
> +++ b/mercurial/streamclone.py
> @@ -484,7 +484,7 @@ def _makemap(repo):
>
>      return vfsmap
>
> -def _emit(repo, entries, totalfilesize):
> +def _emit2(repo, entries, totalfilesize):
>      """actually emit the stream bundle"""
>      vfsmap = _makemap(repo)
>      progress = repo.ui.progress
> @@ -555,7 +555,7 @@ def generatev2(repo):
>                  totalfilesize += repo.cachevfs.lstat(name).st_size
>                  entries.append((_srccache, name, _filefull, None))
>
> -        chunks = _emit(repo, entries, totalfilesize)
> +        chunks = _emit2(repo, entries, totalfilesize)
>          first = next(chunks)
>          assert first is None
>
>

Patch

diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py
--- a/mercurial/streamclone.py
+++ b/mercurial/streamclone.py
@@ -484,7 +484,7 @@  def _makemap(repo):
 
     return vfsmap
 
-def _emit(repo, entries, totalfilesize):
+def _emit2(repo, entries, totalfilesize):
     """actually emit the stream bundle"""
     vfsmap = _makemap(repo)
     progress = repo.ui.progress
@@ -555,7 +555,7 @@  def generatev2(repo):
                 totalfilesize += repo.cachevfs.lstat(name).st_size
                 entries.append((_srccache, name, _filefull, None))
 
-        chunks = _emit(repo, entries, totalfilesize)
+        chunks = _emit2(repo, entries, totalfilesize)
         first = next(chunks)
         assert first is None