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

login
register
mail settings
Submitter phabricator
Date March 31, 2018, 10:23 a.m.
Message ID <differential-rev-PHID-DREV-n2mokja5vq6gtsbuyafx-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30058/
State Superseded
Headers show

Comments

phabricator - March 31, 2018, 10:23 a.m.
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




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

Patch

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()