Reg: force commit option in Hg
TK Soh
teekaysoh at gmail.com
Wed Aug 25 10:55:30 UTC 2010
On Wed, Aug 25, 2010 at 4:59 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 08/25/2010 10:43 AM, Petchimuthu wrote:
>>
>> Hi,
>> I want to change the incorrect commit message to a particular
>> changeset in my local repository.
>>
>> Is it possible in hg?
>
> No. Mercurial has been designed to have immutable history, and working
> around that is not recommended. But if you want to do it see
> http://mercurial.selenic.com/wiki/EditingHistory
While I agree in principle that the history should be immutable, I do
hope there's a way to update the commit message without really
altering the history.
Over the years, I've observed that mistakes in commit messages seem
relatively common, especially for users new to committing changes or
when large amount of changes are involved. Often time, it's too late
for changes when the mistakes are discovered.
>> If not then i will recommit the file without changing the content. That's
>> why i asked about force option..
>
> A Mercurial changeset by design (mostly) tracks changes in files. If you for
> some reason want to make a artificial change and thus make a commit message
> show up in the file log then just change some whitespace.
>
> /Mads
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
More information about the Mercurial
mailing list