Patchwork [3,of,3] bundle2: add a comment about addchangegroup source and url

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 15, 2014, 8:07 p.m.
Message ID <5678e47f32bca1a9630b.1413403677@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/6301/
State Superseded
Headers show

Comments

Pierre-Yves David - Oct. 15, 2014, 8:07 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1413275245 25200
#      Tue Oct 14 01:27:25 2014 -0700
# Node ID 5678e47f32bca1a9630bac7a98618e45859e476a
# Parent  f8ce7ae07a44373cacbe9e58f8476861e0f342b8
bundle2: add a comment about addchangegroup source and url
Pierre-Yves David - Oct. 16, 2014, 8:17 p.m.
On 10/15/2014 01:07 PM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1413275245 25200
> #      Tue Oct 14 01:27:25 2014 -0700
> # Node ID 5678e47f32bca1a9630bac7a98618e45859e476a
> # Parent  f8ce7ae07a44373cacbe9e58f8476861e0f342b8
> bundle2: add a comment about addchangegroup source and url

I''ll send a V2 because of rebase conflict.

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -819,10 +819,12 @@  def handlechangegroup(op, inpart):
     # The addchangegroup function will get a transaction object by itself, but
     # we need to make sure we trigger the creation of a transaction object used
     # for the whole processing scope.
     op.gettransaction()
     cg = changegroup.cg1unpacker(inpart, 'UN')
+    # the source and url passed here are overwritten by the one contained in
+    # the transaction.hookargs argument. So 'bundle2' is a place holder
     ret = changegroup.addchangegroup(op.repo, cg, 'bundle2', 'bundle2')
     op.records.add('changegroup', {'return': ret})
     if op.reply is not None:
         # This is definitly not the final form of this
         # return. But one need to start somewhere.