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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Oct 16 16:29:47 CDT 2014

# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at 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

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.
     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.

More information about the Mercurial-devel mailing list