Patchwork D2996: bundle2: make source a mandatory argument for bundle2.applybundle() (API)

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

Comments

phabricator - March 31, 2018, 10:24 a.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Currently all the callers in the core pass the source argument, making it
  mandatory will help us storing right source value in bundleoperation() class.

REPOSITORY
  rHG Mercurial

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

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
@@ -342,7 +342,7 @@ 
     to be created"""
     raise TransactionUnavailable()
 
-def applybundle(repo, unbundler, tr, source=None, url=None, **kwargs):
+def applybundle(repo, unbundler, tr, source, url=None, **kwargs):
     # transform me into unbundler.apply() as soon as the freeze is lifted
     if isinstance(unbundler, unbundle20):
         tr.hookargs['bundle2'] = '1'