streamclone: move requirement update into consumev2 stable
authorBoris Feld <boris.feld@octobus.net>
Fri, 26 Jan 2018 15:51:07 +0100
branchstable
changeset 35804 2d3e486d09d0
parent 35803 3ad3aaeb1134
child 35805 784ac51f8bab
streamclone: move requirement update into consumev2 This change was suggested by Gregory Szorc.
mercurial/bundle2.py
mercurial/streamclone.py
--- a/mercurial/bundle2.py	Wed Jan 24 21:44:31 2018 +0100
+++ b/mercurial/bundle2.py	Fri Jan 26 15:51:07 2018 +0100
@@ -2155,11 +2155,3 @@
     repo.ui.debug('applying stream bundle\n')
     streamclone.applybundlev2(repo, part, filecount, bytecount,
                               requirements)
-
-    # new requirements = old non-format requirements +
-    #                    new format-related remote requirements
-    # requirements from the streamed-in repository
-    repo.requirements = set(requirements) | (
-            repo.requirements - repo.supportedformats)
-    repo._applyopenerreqs()
-    repo._writerequirements()
--- a/mercurial/streamclone.py	Wed Jan 24 21:44:31 2018 +0100
+++ b/mercurial/streamclone.py	Fri Jan 26 15:51:07 2018 +0100
@@ -632,3 +632,11 @@
                           ', '.join(sorted(missingreqs)))
 
     consumev2(repo, fp, filecount, filesize)
+
+    # new requirements = old non-format requirements +
+    #                    new format-related remote requirements
+    # requirements from the streamed-in repository
+    repo.requirements = set(requirements) | (
+            repo.requirements - repo.supportedformats)
+    repo._applyopenerreqs()
+    repo._writerequirements()