# HG changeset patch # User Yuya Nishihara # Date 2017-08-13 02:10:35 # Node ID b3a41f4d837b2b3d090e693c449cbe6a8256a50f # Parent 1bf5c5507614e9ae452178d4f1fb14c71c969029 bundle2: relax the condition to update transaction.hookargs This is just a micro optimization. If hookargs is empty, nothing should be necessary. diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -304,15 +304,15 @@ class bundleoperation(object): def gettransaction(self): transaction = self._gettransaction() - if self.hookargs is not None: + if self.hookargs: # the ones added to the transaction supercede those added # to the operation. self.hookargs.update(transaction.hookargs) transaction.hookargs = self.hookargs - # mark the hookargs as flushed. further attempts to add to - # hookargs will result in an abort. - self.hookargs = None + # mark the hookargs as flushed. further attempts to add to + # hookargs will result in an abort. + self.hookargs = None return transaction