D2993: bundle2: add 'source' atrribute to bundleoperation class

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sat Mar 31 10:23:29 UTC 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This will help us in easily finding out which command leads to the current
  operation without hacking on the transaction.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2993

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -299,7 +299,7 @@
     * a way to construct a bundle response when applicable.
     """
 
-    def __init__(self, repo, transactiongetter, captureoutput=True):
+    def __init__(self, repo, transactiongetter, captureoutput=True, source=''):
         self.repo = repo
         self.ui = repo.ui
         self.records = unbundlerecords()
@@ -309,6 +309,7 @@
         self._gettransaction = transactiongetter
         # carries value that can modify part behavior
         self.modes = {}
+        self.source = source
 
     def gettransaction(self):
         transaction = self._gettransaction()



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list