equal
deleted
inserted
replaced
119 sourceset = revset.getset(repo, revset.fullreposet(repo), x) |
119 sourceset = revset.getset(repo, revset.fullreposet(repo), x) |
120 return subset & revset.baseset([_destrebase(repo, sourceset)]) |
120 return subset & revset.baseset([_destrebase(repo, sourceset)]) |
121 |
121 |
122 class rebaseruntime(object): |
122 class rebaseruntime(object): |
123 """This class is a container for rebase runtime state""" |
123 """This class is a container for rebase runtime state""" |
124 def __init__(self): |
124 def __init__(self, repo, ui, opts=None): |
|
125 if opts is None: |
|
126 opts = {} |
|
127 |
|
128 self.repo = repo |
|
129 self.ui = ui |
|
130 self.opts = opts |
125 self.originalwd = None |
131 self.originalwd = None |
126 self.external = nullrev |
132 self.external = nullrev |
127 # Mapping between the old revision id and either what is the new rebased |
133 # Mapping between the old revision id and either what is the new rebased |
128 # revision or what needs to be done with the old revision. The state |
134 # revision or what needs to be done with the old revision. The state |
129 # dict will be what contains most of the rebase progress state. |
135 # dict will be what contains most of the rebase progress state. |
241 |
247 |
242 Returns 0 on success, 1 if nothing to rebase or there are |
248 Returns 0 on success, 1 if nothing to rebase or there are |
243 unresolved conflicts. |
249 unresolved conflicts. |
244 |
250 |
245 """ |
251 """ |
246 rbsrt = rebaseruntime() |
252 rbsrt = rebaseruntime(repo, ui, opts) |
247 |
253 |
248 lock = wlock = None |
254 lock = wlock = None |
249 try: |
255 try: |
250 wlock = repo.wlock() |
256 wlock = repo.wlock() |
251 lock = repo.lock() |
257 lock = repo.lock() |