diff mercurial/bundle2.py @ 34328:4ef472b975ff

bundle2: only grab a transaction when 'phase-heads' affect the repository The next patch will use the 'phase-heads' part to exchange phase data relevant to the pulled set. 'handlephases' currently acquires a transaction even in case of no-op pull, which would results in an empty transaction and messing with the existing journal. Pass the transaction fetcher to updatephases so it can fetch it if necessary.
author Boris Feld <boris.feld@octobus.net>
date Wed, 20 Sep 2017 18:29:10 +0200
parents 12c42bcd4133
children 10e162bb9bf5
line wrap: on
line diff
--- a/mercurial/bundle2.py	Tue Sep 19 22:23:41 2017 +0200
+++ b/mercurial/bundle2.py	Wed Sep 20 18:29:10 2017 +0200
@@ -1840,7 +1840,7 @@
 def handlephases(op, inpart):
     """apply phases from bundle part to repo"""
     headsbyphase = phases.binarydecode(inpart)
-    phases.updatephases(op.repo.unfiltered(), op.gettransaction(), headsbyphase)
+    phases.updatephases(op.repo.unfiltered(), op.gettransaction, headsbyphase)
     op.records.add('phase-heads', {})
 
 @parthandler('reply:pushkey', ('return', 'in-reply-to'))