[PATCH 1 of 6 v7] rebase: pass repo, ui and opts objects to the RR class constructor

Kostia Balytskyi ikostia at fb.com
Tue Jun 21 14:28:27 UTC 2016


# HG changeset patch
# User Kostia Balytskyi <ikostia at fb.com>
# 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:


More information about the Mercurial-devel mailing list