tests/test-commit-amend.t
changeset 45827 8d72e29ad1e0
parent 42621 99ebde4fec99
child 45853 b4694ef45db5
equal deleted inserted replaced
45826:21733e8c924f 45827:8d72e29ad1e0
    81   commit: 1 modified, 1 added, 1 unknown
    81   commit: 1 modified, 1 added, 1 unknown
    82   update: (current)
    82   update: (current)
    83   phases: 2 draft
    83   phases: 2 draft
    84   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend
    84   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend
    85   abort: empty commit message
    85   abort: empty commit message
    86   [255]
    86   [10]
    87   $ hg summary
    87   $ hg summary
    88   parent: 1:43f1ba15f28a tip
    88   parent: 1:43f1ba15f28a tip
    89    amend base1
    89    amend base1
    90   branch: default
    90   branch: default
    91   commit: 1 modified, 1 added, 1 unknown
    91   commit: 1 modified, 1 added, 1 unknown
   348   > echo "" > "$1"
   348   > echo "" > "$1"
   349   > __EOF__
   349   > __EOF__
   350   $ echo a >> a
   350   $ echo a >> a
   351   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend
   351   $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend
   352   abort: empty commit message
   352   abort: empty commit message
   353   [255]
   353   [10]
   354   $ hg book
   354   $ hg book
   355      book1                     1:a3b65065808c
   355      book1                     1:a3b65065808c
   356    * book2                     1:a3b65065808c
   356    * book2                     1:a3b65065808c
   357   $ hg revert -Caq
   357   $ hg revert -Caq
   358   $ rm editor.sh
   358   $ rm editor.sh
   882   $ echo foo > foo
   882   $ echo foo > foo
   883   $ hg add foo
   883   $ hg add foo
   884   $ hg ci -m..
   884   $ hg ci -m..
   885   $ hg ci --amend --close-branch -m 'closing'
   885   $ hg ci --amend --close-branch -m 'closing'
   886   abort: can only close branch heads
   886   abort: can only close branch heads
   887   [255]
   887   [10]
   888 
   888 
   889 This silliness fails:
   889 This silliness fails:
   890 
   890 
   891   $ hg branch silliness
   891   $ hg branch silliness
   892   marked working directory as branch silliness
   892   marked working directory as branch silliness
   893   $ echo b >> b
   893   $ echo b >> b
   894   $ hg ci --close-branch -m'open and close'
   894   $ hg ci --close-branch -m'open and close'
   895   abort: branch "silliness" has no heads to close
   895   abort: branch "silliness" has no heads to close
   896   [255]
   896   [10]
   897 
   897 
   898 Test that amend with --secret creates new secret changeset forcibly
   898 Test that amend with --secret creates new secret changeset forcibly
   899 ---------------------------------------------------------------------
   899 ---------------------------------------------------------------------
   900 
   900 
   901   $ hg phase '.^::.'
   901   $ hg phase '.^::.'