comparison hgext/histedit.py @ 52283:fad30cb98579

histedit-continue: wire up `hg continue` and `histedit`
author Brian Hulette <bhulette@apache.org>
date Wed, 30 Oct 2024 19:38:56 -0700
parents f4733654f144
children
comparison
equal deleted inserted replaced
52282:51a350a22d0c 52283:fad30cb98579
2346 state.replacements.extend(replacements) 2346 state.replacements.extend(replacements)
2347 2347
2348 return state 2348 return state
2349 2349
2350 2350
2351 def hgcontinuehistedit(ui, repo):
2352 fm = ui.formatter(b'continue', {})
2353 fm.startitem()
2354
2355 state = histeditstate(repo)
2356 with repo.wlock() as wlock, repo.lock() as lock:
2357 state.wlock = wlock
2358 state.lock = lock
2359 state.read()
2360 state = bootstrapcontinue(ui, state, None)
2361 _continuehistedit(ui, repo, state)
2362 _finishhistedit(ui, repo, state, fm)
2363 fm.end()
2364
2365
2351 def between(repo, old, new, keep): 2366 def between(repo, old, new, keep):
2352 """select and validate the set of revision to edit 2367 """select and validate the set of revision to edit
2353 2368
2354 When keep is false, the specified set can't have children.""" 2369 When keep is false, the specified set can't have children."""
2355 revs = repo.revs(b'%n::%n', old, new) 2370 revs = repo.revs(b'%n::%n', old, new)
2681 b'histedit', 2696 b'histedit',
2682 fname=b'histedit-state', 2697 fname=b'histedit-state',
2683 allowcommit=True, 2698 allowcommit=True,
2684 continueflag=True, 2699 continueflag=True,
2685 abortfunc=hgaborthistedit, 2700 abortfunc=hgaborthistedit,
2701 continuefunc=hgcontinuehistedit,
2686 ) 2702 )