diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -252,7 +252,10 @@ class histeditstate(object): for replacement in self.replacements: fp.write('%s%s\n' % (node.hex(replacement[0]), ''.join(node.hex(r) for r in replacement[1]))) - fp.write('%s\n' % self.backupfile) + backupfile = self.backupfile + if not backupfile: + backupfile = '' + fp.write('%s\n' % backupfile) fp.close() def _load(self): @@ -890,21 +893,22 @@ def _histedit(ui, repo, state, *freeargs def bootstrapcontinue(ui, state, opts): repo = state.repo - action, currentnode = state.rules.pop(0) - - actobj = actiontable[action].fromrule(state, currentnode) + if state.rules: + action, currentnode = state.rules.pop(0) - s = repo.status() - if s.modified or s.added or s.removed or s.deleted: - actobj.continuedirty() + actobj = actiontable[action].fromrule(state, currentnode) + s = repo.status() if s.modified or s.added or s.removed or s.deleted: - raise util.Abort(_("working copy still dirty")) + actobj.continuedirty() + s = repo.status() + if s.modified or s.added or s.removed or s.deleted: + raise util.Abort(_("working copy still dirty")) - parentctx, replacements = actobj.continueclean() + parentctx, replacements = actobj.continueclean() - state.parentctxnode = parentctx.node() - state.replacements.extend(replacements) + state.parentctxnode = parentctx.node() + state.replacements.extend(replacements) return state diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -1,5 +1,12 @@ This file tests the behavior of run-tests.py itself. +Avoid interference from actual test env: + + $ unset HGTEST_JOBS + $ unset HGTEST_TIMEOUT + $ unset HGTEST_PORT + $ unset HGTEST_SHELL + Smoke test ============