##// END OF EJS Templates
rebase: add the --inmemory option flag; assign a wctx object for the rebase...
Phil Cohen -
r35291:482614b3 default
parent child Browse files
Show More
@@ -179,6 +179,7 b' class rebaseruntime(object):'
179 self.keepopen = opts.get('keepopen', False)
179 self.keepopen = opts.get('keepopen', False)
180 self.obsoletenotrebased = {}
180 self.obsoletenotrebased = {}
181 self.obsoletewithoutsuccessorindestination = set()
181 self.obsoletewithoutsuccessorindestination = set()
182 self.inmemory = opts.get('inmemory', False)
182
183
183 @property
184 @property
184 def repo(self):
185 def repo(self):
@@ -383,6 +384,12 b' class rebaseruntime(object):'
383
384
384 def _performrebase(self, tr):
385 def _performrebase(self, tr):
385 repo, ui = self.repo, self.ui
386 repo, ui = self.repo, self.ui
387 # Assign a working copy object.
388 if self.inmemory:
389 from mercurial.context import overlayworkingctx
390 self.wctx = overlayworkingctx(self.repo)
391 else:
392 self.wctx = self.repo[None]
386 if self.keepbranchesf:
393 if self.keepbranchesf:
387 # insert _savebranch at the start of extrafns so if
394 # insert _savebranch at the start of extrafns so if
388 # there's a user-provided extrafn it can clobber branch if
395 # there's a user-provided extrafn it can clobber branch if
@@ -608,6 +615,7 b' class rebaseruntime(object):'
608 ('i', 'interactive', False, _('(DEPRECATED)')),
615 ('i', 'interactive', False, _('(DEPRECATED)')),
609 ('t', 'tool', '', _('specify merge tool')),
616 ('t', 'tool', '', _('specify merge tool')),
610 ('c', 'continue', False, _('continue an interrupted rebase')),
617 ('c', 'continue', False, _('continue an interrupted rebase')),
618 ('', 'inmemory', False, _('run rebase in-memory (EXPERIMENTAL)')),
611 ('a', 'abort', False, _('abort an interrupted rebase'))] +
619 ('a', 'abort', False, _('abort an interrupted rebase'))] +
612 cmdutil.formatteropts,
620 cmdutil.formatteropts,
613 _('[-s REV | -b REV] [-d REV] [OPTION]'))
621 _('[-s REV | -b REV] [-d REV] [OPTION]'))
@@ -726,6 +734,8 b' def rebase(ui, repo, **opts):'
726
734
727 """
735 """
728 opts = pycompat.byteskwargs(opts)
736 opts = pycompat.byteskwargs(opts)
737 if 'inmemory' not in opts:
738 opts['inmemory'] = False
729 rbsrt = rebaseruntime(repo, ui, opts)
739 rbsrt = rebaseruntime(repo, ui, opts)
730
740
731 with repo.wlock(), repo.lock():
741 with repo.wlock(), repo.lock():
General Comments 0
You need to be logged in to leave comments. Login now