From patchwork Tue Jun 21 14:28:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1, of, 6, v7] rebase: pass repo, ui and opts objects to the RR class constructor From: Kostia Balytskyi X-Patchwork-Id: 15559 Message-Id: To: Date: Tue, 21 Jun 2016 07:28:27 -0700 # HG changeset patch # User Kostia Balytskyi # Date 1466518969 25200 # Tue Jun 21 07:22:49 2016 -0700 # Node ID cecea9a2281c8690db5aa26d086a5b7a624e2754 # Parent aa1d56003872cba207d908706da059141dd901a5 rebase: pass repo, ui and opts objects to the RR class constructor diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -121,7 +121,13 @@ def _revsetdestrebase(repo, subset, x): class rebaseruntime(object): """This class is a container for rebase runtime state""" - def __init__(self): + def __init__(self, repo, ui, opts=None): + if opts is None: + opts = {} + + self.repo = repo + self.ui = ui + self.opts = opts self.originalwd = None self.external = nullrev # Mapping between the old revision id and either what is the new rebased @@ -243,7 +249,7 @@ def rebase(ui, repo, **opts): unresolved conflicts. """ - rbsrt = rebaseruntime() + rbsrt = rebaseruntime(repo, ui, opts) lock = wlock = None try: