##// END OF EJS Templates
histedit: avoid repeating name of state file in a few places...
Martin von Zweigbergk -
r38822:28d8b5f4 default
parent child Browse files
Show More
@@ -1084,7 +1084,7 b' def _validateargs(ui, repo, state, freea'
1084 raise error.Abort(_('only --commands argument allowed with '
1084 raise error.Abort(_('only --commands argument allowed with '
1085 '--edit-plan'))
1085 '--edit-plan'))
1086 else:
1086 else:
1087 if os.path.exists(os.path.join(repo.path, 'histedit-state')):
1087 if state.inprogress():
1088 raise error.Abort(_('history edit already in progress, try '
1088 raise error.Abort(_('history edit already in progress, try '
1089 '--continue or --abort'))
1089 '--continue or --abort'))
1090 if outg:
1090 if outg:
@@ -1624,8 +1624,8 b' def cleanupnode(ui, repo, nodes, nobacku'
1624 def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs):
1624 def stripwrapper(orig, ui, repo, nodelist, *args, **kwargs):
1625 if isinstance(nodelist, str):
1625 if isinstance(nodelist, str):
1626 nodelist = [nodelist]
1626 nodelist = [nodelist]
1627 if os.path.exists(os.path.join(repo.path, 'histedit-state')):
1627 state = histeditstate(repo)
1628 state = histeditstate(repo)
1628 if state.inprogress():
1629 state.read()
1629 state.read()
1630 histedit_nodes = {action.node for action
1630 histedit_nodes = {action.node for action
1631 in state.actions if action.node}
1631 in state.actions if action.node}
@@ -1638,9 +1638,9 b' def stripwrapper(orig, ui, repo, nodelis'
1638 extensions.wrapfunction(repair, 'strip', stripwrapper)
1638 extensions.wrapfunction(repair, 'strip', stripwrapper)
1639
1639
1640 def summaryhook(ui, repo):
1640 def summaryhook(ui, repo):
1641 if not os.path.exists(repo.vfs.join('histedit-state')):
1641 state = histeditstate(repo)
1642 if not state.inprogress():
1642 return
1643 return
1643 state = histeditstate(repo)
1644 state.read()
1644 state.read()
1645 if state.actions:
1645 if state.actions:
1646 # i18n: column positioning for "hg summary"
1646 # i18n: column positioning for "hg summary"
General Comments 0
You need to be logged in to leave comments. Login now