##// END OF EJS Templates
histedit: create transaction outside of try...
Martin von Zweigbergk -
r33445:0491004e default
parent child Browse files
Show More
@@ -1107,14 +1107,13 def _continuehistedit(ui, repo, state):
1107 if action.verb == 'fold' and nextact and nextact.verb == 'fold':
1107 if action.verb == 'fold' and nextact and nextact.verb == 'fold':
1108 state.actions[idx].__class__ = _multifold
1108 state.actions[idx].__class__ = _multifold
1109
1109
1110 # Force an initial state file write, so the user can run --abort/continue
1111 # even if there's an exception before the first transaction serialize.
1112 state.write()
1113
1110 total = len(state.actions)
1114 total = len(state.actions)
1111 pos = 0
1115 pos = 0
1112 tr = None
1116 tr = None
1113
1114 # Force an initial state file write, so the user can run --abort/continue
1115 # even if there's an exception before the first transaction serialize.
1116 state.write()
1117 try:
1118 # Don't use singletransaction by default since it rolls the entire
1117 # Don't use singletransaction by default since it rolls the entire
1119 # transaction back if an unexpected exception happens (like a
1118 # transaction back if an unexpected exception happens (like a
1120 # pretxncommit hook throws, or the user aborts the commit msg editor).
1119 # pretxncommit hook throws, or the user aborts the commit msg editor).
@@ -1123,7 +1122,7 def _continuehistedit(ui, repo, state):
1123 # and reopen a transaction. For example, if the action executes an
1122 # and reopen a transaction. For example, if the action executes an
1124 # external process it may choose to commit the transaction first.
1123 # external process it may choose to commit the transaction first.
1125 tr = repo.transaction('histedit')
1124 tr = repo.transaction('histedit')
1126
1125 try:
1127 while state.actions:
1126 while state.actions:
1128 state.write(tr=tr)
1127 state.write(tr=tr)
1129 actobj = state.actions[0]
1128 actobj = state.actions[0]
General Comments 0
You need to be logged in to leave comments. Login now