<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 20, 2017 at 4:28 PM, Martin von Zweigbergk <span dir="ltr"><<a href="mailto:martinvonz@google.com" target="_blank">martinvonz@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Martin von Zweigbergk <<a href="mailto:martinvonz@google.com">martinvonz@google.com</a>><br>
# Date 1497935677 25200<br>
#      Mon Jun 19 22:14:37 2017 -0700<br>
# Node ID 8dd6087bc108e13f7da4e7f8419dd7<wbr>26cbb790ee<br>
# Parent  6d79e9109908c2cb468c9eeaf8869a<wbr>a1926fbea8<br>
clonebundle: update hook arguments (BC)<br></blockquote><div><br></div><div>Queued, thanks.</div><div><br></div><div>Also, I was curious what applybundle() does and the todo comment in it is... special. So perhaps there is more refactor work left for this bundle APIs.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
By calling applybundle() with 'clonebundles' and the url instead of<br>
calling processbundle(), the hooks will get different arguments:<br>
HG_SOURCE will be 'clonebundles' instead of 'bundle2' and HG_URL will<br>
be the url instead of 'bundle2'. This is consistent with the bundle1<br>
behavior and seems like a bug fix, but I'm marking it BC anyway.<br>
<br>
diff --git a/mercurial/exchange.py b/mercurial/exchange.py<br>
--- a/mercurial/exchange.py<br>
+++ b/mercurial/exchange.py<br>
@@ -1997,7 +1997,7 @@<br>
             cg = readbundle(ui, fh, 'stream')<br>
<br>
             if isinstance(cg, bundle2.unbundle20):<br>
-                bundle2.processbundle(repo, cg, lambda: tr)<br>
+                bundle2.applybundle(repo, cg, tr, 'clonebundles', url)<br>
             elif isinstance(cg, streamclone.<wbr>streamcloneapplier):<br>
                 cg.apply(repo)<br>
             else:<br>
</blockquote></div><br></div></div>