Show More
@@ -567,8 +567,6 b' class rebaseruntime(object):' | |||||
567 | revtoreuse = max(self.state) |
|
567 | revtoreuse = max(self.state) | |
568 |
|
568 | |||
569 | dsguard = None |
|
569 | dsguard = None | |
570 | if ui.configbool('rebase', 'singletransaction'): |
|
|||
571 | dsguard = dirstateguard.dirstateguard(repo, 'rebase') |
|
|||
572 | if self.inmemory: |
|
570 | if self.inmemory: | |
573 | newnode = concludememorynode(repo, revtoreuse, p1, |
|
571 | newnode = concludememorynode(repo, revtoreuse, p1, | |
574 | self.external, |
|
572 | self.external, | |
@@ -578,6 +576,8 b' class rebaseruntime(object):' | |||||
578 | keepbranches=self.keepbranchesf, |
|
576 | keepbranches=self.keepbranchesf, | |
579 | date=self.date, wctx=self.wctx) |
|
577 | date=self.date, wctx=self.wctx) | |
580 | else: |
|
578 | else: | |
|
579 | if ui.configbool('rebase', 'singletransaction'): | |||
|
580 | dsguard = dirstateguard.dirstateguard(repo, 'rebase') | |||
581 | with util.acceptintervention(dsguard): |
|
581 | with util.acceptintervention(dsguard): | |
582 | newnode = concludenode(repo, revtoreuse, p1, self.external, |
|
582 | newnode = concludenode(repo, revtoreuse, p1, self.external, | |
583 | commitmsg=commitmsg, |
|
583 | commitmsg=commitmsg, | |
@@ -851,8 +851,14 b' def _origrebase(ui, repo, inmemory=False' | |||||
851 | singletr = ui.configbool('rebase', 'singletransaction') |
|
851 | singletr = ui.configbool('rebase', 'singletransaction') | |
852 | if singletr: |
|
852 | if singletr: | |
853 | tr = repo.transaction('rebase') |
|
853 | tr = repo.transaction('rebase') | |
|
854 | ||||
|
855 | # If `rebase.singletransaction` is enabled, wrap the entire operation in | |||
|
856 | # one transaction here. Otherwise, transactions are obtained when | |||
|
857 | # committing each node, which is slower but allows partial success. | |||
854 | with util.acceptintervention(tr): |
|
858 | with util.acceptintervention(tr): | |
855 | if singletr: |
|
859 | # Same logic for the dirstate guard, except we don't create one when | |
|
860 | # rebasing in-memory (it's not needed). | |||
|
861 | if singletr and not inmemory: | |||
856 | dsguard = dirstateguard.dirstateguard(repo, 'rebase') |
|
862 | dsguard = dirstateguard.dirstateguard(repo, 'rebase') | |
857 | with util.acceptintervention(dsguard): |
|
863 | with util.acceptintervention(dsguard): | |
858 | rbsrt._performrebase(tr) |
|
864 | rbsrt._performrebase(tr) | |
@@ -1032,8 +1038,8 b' def externalparent(repo, state, destance' | |||||
1032 | def concludememorynode(repo, rev, p1, p2, wctx=None, |
|
1038 | def concludememorynode(repo, rev, p1, p2, wctx=None, | |
1033 | commitmsg=None, editor=None, extrafn=None, |
|
1039 | commitmsg=None, editor=None, extrafn=None, | |
1034 | keepbranches=False, date=None): |
|
1040 | keepbranches=False, date=None): | |
1035 |
'''Commit the |
|
1041 | '''Commit the memory changes with parents p1 and p2. Reuse commit info from | |
1036 | but also store useful information in extra. |
|
1042 | rev but also store useful information in extra. | |
1037 | Return node of committed revision.''' |
|
1043 | Return node of committed revision.''' | |
1038 | ctx = repo[rev] |
|
1044 | ctx = repo[rev] | |
1039 | if commitmsg is None: |
|
1045 | if commitmsg is None: |
General Comments 0
You need to be logged in to leave comments.
Login now