Show More
@@ -280,7 +280,6 b' class histeditstate(object):' | |||
|
280 | 280 | self.lock = lock |
|
281 | 281 | self.wlock = wlock |
|
282 | 282 | self.backupfile = None |
|
283 | self.tr = None | |
|
284 | 283 | if replacements is None: |
|
285 | 284 | self.replacements = [] |
|
286 | 285 | else: |
@@ -1110,7 +1109,7 b' def _continuehistedit(ui, repo, state):' | |||
|
1110 | 1109 | |
|
1111 | 1110 | total = len(state.actions) |
|
1112 | 1111 | pos = 0 |
|
1113 |
|
|
|
1112 | tr = None | |
|
1114 | 1113 | |
|
1115 | 1114 | # Force an initial state file write, so the user can run --abort/continue |
|
1116 | 1115 | # even if there's an exception before the first transaction serialize. |
@@ -1123,10 +1122,10 b' def _continuehistedit(ui, repo, state):' | |||
|
1123 | 1122 | # Don't use a 'with' for the transaction, since actions may close |
|
1124 | 1123 | # and reopen a transaction. For example, if the action executes an |
|
1125 | 1124 | # external process it may choose to commit the transaction first. |
|
1126 |
|
|
|
1125 | tr = repo.transaction('histedit') | |
|
1127 | 1126 | |
|
1128 | 1127 | while state.actions: |
|
1129 |
state.write(tr= |
|
|
1128 | state.write(tr=tr) | |
|
1130 | 1129 | actobj = state.actions[0] |
|
1131 | 1130 | pos += 1 |
|
1132 | 1131 | ui.progress(_("editing"), pos, actobj.torule(), |
@@ -1138,15 +1137,15 b' def _continuehistedit(ui, repo, state):' | |||
|
1138 | 1137 | state.replacements.extend(replacement_) |
|
1139 | 1138 | state.actions.pop(0) |
|
1140 | 1139 | |
|
1141 |
if |
|
|
1142 |
|
|
|
1140 | if tr is not None: | |
|
1141 | tr.close() | |
|
1143 | 1142 | except error.InterventionRequired: |
|
1144 |
if |
|
|
1145 |
|
|
|
1143 | if tr is not None: | |
|
1144 | tr.close() | |
|
1146 | 1145 | raise |
|
1147 | 1146 | except Exception: |
|
1148 |
if |
|
|
1149 |
|
|
|
1147 | if tr is not None: | |
|
1148 | tr.abort() | |
|
1150 | 1149 | raise |
|
1151 | 1150 | |
|
1152 | 1151 | state.write() |
General Comments 0
You need to be logged in to leave comments.
Login now