Reputation: 1600
I'm getting the following error when attempting to commit to a Hg repository:
Z:\wormcard_maker>hg commit -m "asdf"
transaction abort!
rollback completed
abort: phases.new-commit: not a valid phase name ('')
This happens over multiple different repositories and has survived re-cloning the repository and reinstalling Mercurial. I can commit to the repository fine from a different computer (running Linux).
I'm running Hg 4.8 as distributed with TortoiseHg 4.8 on Windows 7.
Upvotes: 7
Views: 1885
Reputation: 13037
Neither of the other answers worked for me - even though I had new-commit = secret
in the HGRC it still produced the error.
The workaround I found was to do this:
hg ci -m "message" --config phases.new-commit=secret
which did work, apparently by overriding whatever invalid phase name hg was trying to use. Even though I don't know why.
I assume this would work with other comments, not just ci
(aka commit
).
Upvotes: 0
Reputation: 13037
I tried using the THG setting but it didn't work; just kept producing the same error. (While doing this I noticed that the THG dropdown for the phase choices had a bunch of blank lines in it; so I think THG was confused.)
Instead I manually edited my HGRC file and made sure it contained:
[phases]
new-commit = secret
which worked.
You could obviously use draft
, etc. in place of secret
.
Upvotes: 0
Reputation: 86
In TortoiseHg just set the "File - Settings - Commit - New Commit Phase" option.
Upvotes: 7