Patchwork changegroup: inline 'publishing' variable in apply()

login
register
mail settings
Submitter via Mercurial-devel
Date June 19, 2017, 6:11 p.m.
Message ID <8ddb7c8ca815fde10d2d.1497895871@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/21506/
State Accepted
Headers show

Comments

via Mercurial-devel - June 19, 2017, 6:11 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1497855983 25200
#      Mon Jun 19 00:06:23 2017 -0700
# Node ID 8ddb7c8ca815fde10d2d1b7fc6ff69d5bf6ba15d
# Parent  661025fd3e1cd5d5e2dee12b7f64312d6cd48a0b
changegroup: inline 'publishing' variable in apply()
Gregory Szorc - June 20, 2017, 6:27 a.m.
On Mon, Jun 19, 2017 at 11:11 AM, Martin von Zweigbergk via Mercurial-devel
<mercurial-devel@mercurial-scm.org> wrote:

> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1497855983 25200
> #      Mon Jun 19 00:06:23 2017 -0700
> # Node ID 8ddb7c8ca815fde10d2d1b7fc6ff69d5bf6ba15d
> # Parent  661025fd3e1cd5d5e2dee12b7f64312d6cd48a0b
> changegroup: inline 'publishing' variable in apply()
>

Queued, thanks.


>
> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
> --- a/mercurial/changegroup.py
> +++ b/mercurial/changegroup.py
> @@ -377,7 +377,6 @@
>                      repo.hook('pretxnchangegroup', throw=True, **hookargs)
>
>                  added = [cl.node(r) for r in xrange(clstart, clend)]
> -                publishing = repo.publishing()
>                  if srctype in ('push', 'serve'):
>                      # Old servers can not push the boundary themselves.
>                      # New servers won't push the boundary if changeset
> already
> @@ -385,7 +384,7 @@
>                      #
>                      # We should not use added here but the list of all
> change in
>                      # the bundle
> -                    if publishing:
> +                    if repo.publishing():
>                          phases.advanceboundary(repo, tr, phases.public,
> cgnodes)
>                      else:
>                          # Those changesets have been pushed from the
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -377,7 +377,6 @@ 
                     repo.hook('pretxnchangegroup', throw=True, **hookargs)
 
                 added = [cl.node(r) for r in xrange(clstart, clend)]
-                publishing = repo.publishing()
                 if srctype in ('push', 'serve'):
                     # Old servers can not push the boundary themselves.
                     # New servers won't push the boundary if changeset already
@@ -385,7 +384,7 @@ 
                     #
                     # We should not use added here but the list of all change in
                     # the bundle
-                    if publishing:
+                    if repo.publishing():
                         phases.advanceboundary(repo, tr, phases.public, cgnodes)
                     else:
                         # Those changesets have been pushed from the