[Bug 3725] New: pretxncommit hook make working tree broken if it fails when commit --amend.

bugzilla-daemon at bz.selenic.com bugzilla-daemon at bz.selenic.com
Thu Dec 6 15:59:50 CST 2012


http://bz.selenic.com/show_bug.cgi?id=3725

          Priority: normal
            Bug ID: 3725
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: pretxncommit hook make working tree broken if it fails
                    when commit --amend.
          Severity: bug
    Classification: Unclassified
                OS: Windows
          Reporter: iwata0303 at gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 2.4.1
         Component: Mercurial
           Product: Mercurial

If pretxncommit fails when executing commit --amend, working tree is broken.

For reproduce:

1st: setting up repo
---------------------
$ mkdir test && cd test
$ hg init
$ echo foo>foo
$ hg add .
$ hg commit -m "intiial"
$
$ echo fooo>foo
$ hg commit -m "modify foo"

2nd: install pretxncommit hook.
--------------------------------
> def pretxncommit(ui, repo, **kwargs):
>     return True  # Fail always

3rd: commit --amend
---------------------
$ echo foooo>foo
$ hg commit foo --amend -m "modify foo (amend)"

Now, working tree is detached from tip revision.
And foo treated as already committed.
`hg status` reports below warning.
> warning: ignoring unknown working parent XXXXX!

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list