##// END OF EJS Templates
histedit: add progress support
timeless -
r27451:f209c851 default
parent child Browse files
Show More
@@ -1082,15 +1082,21 b' def _histedit(ui, repo, state, *freeargs'
1082 if action.verb == 'fold' and nextact and nextact.verb == 'fold':
1082 if action.verb == 'fold' and nextact and nextact.verb == 'fold':
1083 state.actions[idx].__class__ = _multifold
1083 state.actions[idx].__class__ = _multifold
1084
1084
1085 total = len(state.actions)
1086 pos = 0
1085 while state.actions:
1087 while state.actions:
1086 state.write()
1088 state.write()
1087 actobj = state.actions.pop(0)
1089 actobj = state.actions.pop(0)
1090 pos += 1
1091 ui.progress(_("editing"), pos, actobj.torule(),
1092 _('changes'), total)
1088 ui.debug('histedit: processing %s %s\n' % (actobj.verb,\
1093 ui.debug('histedit: processing %s %s\n' % (actobj.verb,\
1089 actobj.torule()))
1094 actobj.torule()))
1090 parentctx, replacement_ = actobj.run()
1095 parentctx, replacement_ = actobj.run()
1091 state.parentctxnode = parentctx.node()
1096 state.parentctxnode = parentctx.node()
1092 state.replacements.extend(replacement_)
1097 state.replacements.extend(replacement_)
1093 state.write()
1098 state.write()
1099 ui.progress(_("editing"), None)
1094
1100
1095 hg.update(repo, state.parentctxnode, quietempty=True)
1101 hg.update(repo, state.parentctxnode, quietempty=True)
1096
1102
@@ -234,10 +234,14 b' tip before edit'
234 summary: f
234 summary: f
235
235
236
236
237 $ hg histedit e860deea161a --commands - 2>&1 <<EOF | fixbundle
237 $ hg --config progress.debug=1 --debug \
238 > histedit e860deea161a --commands - 2>&1 <<EOF | \
239 > egrep 'editing|unresolved'
238 > pick e860deea161a e
240 > pick e860deea161a e
239 > fold a00ad806cb55 f
241 > fold a00ad806cb55 f
240 > EOF
242 > EOF
243 editing: pick e860deea161a 4 e 1/2 changes (50.00%)
244 editing: fold a00ad806cb55 5 f 2/2 changes (100.00%)
241 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
245 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
242 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
246 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
243 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
247 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now