Mercurial > public > mercurial-scm > hg-stable
diff mercurial/repair.py @ 32948:af31d531dda0
changegroup: let callers pass in transaction to apply() (API)
I think passing in the transaction makes it a little clearer and more
consistent with bundle2.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Jun 2017 22:46:38 -0700 |
parents | d11e2343762b |
children | 8e3021fd1a44 |
line wrap: on
line diff
--- a/mercurial/repair.py Thu Jun 15 23:09:14 2017 -0700 +++ b/mercurial/repair.py Thu Jun 15 22:46:38 2017 -0700 @@ -208,8 +208,8 @@ url=tmpbundleurl) else: txnname = "strip\n%s" % util.hidepassword(tmpbundleurl) - with repo.transaction(txnname): - gen.apply(repo, 'strip', tmpbundleurl, True) + with repo.transaction(txnname) as tr: + gen.apply(repo, tr, 'strip', tmpbundleurl, True) if not repo.ui.verbose: repo.ui.popbuffer() f.close()