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

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 16, 2014, 9:29 p.m.
Message ID <25973c9b697f0220b642.1413494987@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/6347/
State Accepted
Commit 4df9b5e62f702e74ed688ea0e5aa94057ac337c4
Headers show

Comments

Pierre-Yves David - Oct. 16, 2014, 9:29 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 25973c9b697f0220b642747a5b8f68fe49fa24d5
# Parent  cc7276a5a10ebf94ad1d742a6ad79a51ede6c6aa
bundle2: add a comment about addchangegroup source and url

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.