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

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Oct 15 15:07:57 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 5678e47f32bca1a9630bac7a98618e45859e476a
# Parent  f8ce7ae07a44373cacbe9e58f8476861e0f342b8
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.
     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.


More information about the Mercurial-devel mailing list