--retry can be used instead of --continue when histedit failed on "exec" (due to it returning a non-zero exit code) and the user wants to repeate that command rather than continuing past it
--show-plan will print the remaining plan of histedit during an interrupted histedit
Details
- Reviewers
stash - Group Reviewers
Restricted Project - Commits
- rFBHGX2b0d67e8ecc6: histedit: add --retry and --show-plan options
cd fb-hgext/tests/ && rt
Diff Detail
- Repository
- rFBHGX Facebook Mercurial Extensions
- Branch
- default
- Lint
Lint OK - Unit
Unit Tests OK
Event Timeline
I have updated the title. See https://www.mercurial-scm.org/wiki/ContributingChanges for the rules. (I think test-check-commit-hg.t would fail in this case).
The main question is about locks
hgext3rd/fbhistedit.py | ||
---|---|---|
167 | Instead of putting this lines inside every function I suggest to import histedit extension from hgext import ( histedit, ) and check that extension is present in extsetup() try: return extensions.find('histedit') except KeyError: ui.warn(_('histedit extension not found\n') % name) return None | |
179–184 | It would be cool to send upstream patches to refactor histedit.py so that adding new goals is trivial. | |
208 | Nit: I think *args is more common than *freeargs | |
208–217 | It seems that this function is identical to histedit() command from histedit.py. I don't think you need to reimplement it | |
239 | I'm not sure why you release the locks here. It seems that all original goals won't use locks, we probably don't want it. | |
248–257 | Can you also add tests that cover these two cases? |
hgext3rd/fbhistedit.py | ||
---|---|---|
167 | We agreed offline that the extensions.find('histedit') done in local scope is important when user provides a custom histedit in config, because a global import would ignore that config | |
179–184 | With this one in place adding new goals should be easy. At least we don't overcomplicate the upstream code | |
208 | I mimicked the naming from original histedit extension. I don't mind changing it though | |
208–217 | I will try to address this one | |
239 | because orig takes them again, since I wrapcommand histedit. When I apply your suggestion then it won't be necessary anymore | |
248–257 | will do |
I think it's better to just raise error.Abort(_('fbhistedit: ...'))
Sorry for not making it clear