tests/test-commit-amend.t
changeset 17060 69fa0459dd3b
parent 17059 fba17a64fa49
child 17461 bacde764fba0
equal deleted inserted replaced
17059:fba17a64fa49 17060:69fa0459dd3b
    21 
    21 
    22   $ hg ci --amend
    22   $ hg ci --amend
    23   nothing changed
    23   nothing changed
    24   [1]
    24   [1]
    25 
    25 
    26   $ echo '[hooks]' >> $HGRCPATH
    26   $ cat >> $HGRCPATH <<EOF
    27   $ echo 'pretxncommit.foo = echo "pretxncommit $HG_NODE"; hg id -r $HG_NODE' >> $HGRCPATH
    27   > [hooks]
       
    28   > pretxncommit.foo = sh -c "echo \"pretxncommit \$HG_NODE\"; hg id -r \$HG_NODE"
       
    29   > EOF
    28 
    30 
    29 Amending changeset with changes in working dir:
    31 Amending changeset with changes in working dir:
    30 
    32 
    31   $ echo a >> a
    33   $ echo a >> a
    32   $ hg ci --amend -m 'amend base1'
    34   $ hg ci --amend -m 'amend base1'
    33   pretxncommit 9cd25b479c51be2f4ed2c38e7abdf7ce67d8e0dc
    35   pretxncommit 9cd25b479c51be2f4ed2c38e7abdf7ce67d8e0dc
    34   9cd25b479c51 tip
    36   9cd25b479c51 tip
    35   saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg
    37   saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob)
    36   $ echo 'pretxncommit.foo = ' >> $HGRCPATH
    38   $ echo 'pretxncommit.foo = ' >> $HGRCPATH
    37   $ hg diff -c .
    39   $ hg diff -c .
    38   diff -r ad120869acf0 -r 9cd25b479c51 a
    40   diff -r ad120869acf0 -r 9cd25b479c51 a
    39   --- a/a	Thu Jan 01 00:00:00 1970 +0000
    41   --- a/a	Thu Jan 01 00:00:00 1970 +0000
    40   +++ b/a	Thu Jan 01 00:00:00 1970 +0000
    42   +++ b/a	Thu Jan 01 00:00:00 1970 +0000