Patchwork [2,of,2] changegroup: stop returning and recording added nodes in 'cg.apply'

login
register
mail settings
Submitter Boris Feld
Date July 14, 2017, 1:44 p.m.
Message ID <ddf2ab3e3add92ed5cdd.1500039870@FB>
Download mbox | patch
Permalink /patch/22330/
State Accepted
Headers show

Comments

Boris Feld - July 14, 2017, 1:44 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1499972886 -7200
#      Thu Jul 13 21:08:06 2017 +0200
# Node ID ddf2ab3e3add92ed5cddbeb9a33679891d74094d
# Parent  23a2483541d50b8dce47a061a92a2b2089a42202
# EXP-Topic cleanup.changegroup
changegroup: stop returning and recording added nodes in 'cg.apply'

cg.apply used to returns the added nodes. Callers doesn't have a use for it
anymore, remove the added node and stops recording it in the current
operation.

This information was added in the current release cycle so no extensions
breakage should happens.
Augie Fackler - July 14, 2017, 4:40 p.m.
On Fri, Jul 14, 2017 at 03:44:30PM +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1499972886 -7200
> #      Thu Jul 13 21:08:06 2017 +0200
> # Node ID ddf2ab3e3add92ed5cddbeb9a33679891d74094d
> # Parent  23a2483541d50b8dce47a061a92a2b2089a42202
> # EXP-Topic cleanup.changegroup
> changegroup: stop returning and recording added nodes in 'cg.apply'

queued, thanks

Patch

diff -r 23a2483541d5 -r ddf2ab3e3add mercurial/bundle2.py
--- a/mercurial/bundle2.py	Thu Jul 13 21:10:55 2017 +0200
+++ b/mercurial/bundle2.py	Thu Jul 13 21:08:06 2017 +0200
@@ -403,10 +403,9 @@ 
     return op
 
 def _processchangegroup(op, cg, tr, source, url, **kwargs):
-    ret, addednodes = cg.apply(op.repo, tr, source, url, **kwargs)
+    ret = cg.apply(op.repo, tr, source, url, **kwargs)
     op.records.add('changegroup', {
         'return': ret,
-        'addednodes': addednodes,
     })
     return ret
 
diff -r 23a2483541d5 -r ddf2ab3e3add mercurial/changegroup.py
--- a/mercurial/changegroup.py	Thu Jul 13 21:10:55 2017 +0200
+++ b/mercurial/changegroup.py	Thu Jul 13 21:08:06 2017 +0200
@@ -408,7 +408,7 @@ 
             ret = deltaheads - 1
         else:
             ret = deltaheads + 1
-        return ret, added
+        return ret
 
 class cg2unpacker(cg1unpacker):
     """Unpacker for cg2 streams.