tests/test-amend.t
branchstable
changeset 3183 884a3b8aadd6
parent 2776 4dd84054ebbb
child 2929 06844693bb21
equal deleted inserted replaced
2722:44a6e6fbf80b 3183:884a3b8aadd6
     1   $ cat >> $HGRCPATH <<EOF
     1   $ cat >> $HGRCPATH <<EOF
     2   > [extensions]
     2   > [extensions]
     3   > hgext.graphlog=
       
     4   > EOF
     3   > EOF
     5   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
     4   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
     6 
     5 
     7   $ glog() {
     6   $ glog() {
     8   >   hg glog --template '{rev}@{branch}({phase}) {desc|firstline}\n' "$@"
     7   >   hg log -G --template '{rev}@{branch}({phase}) {desc|firstline}\n' "$@"
     9   > }
     8   > }
    10 
     9 
    11   $ hg init repo --traceback
    10   $ hg init repo --traceback
    12   $ cd repo
    11   $ cd repo
    13   $ echo a > a
    12   $ echo a > a
   130   
   129   
   131       See 'hg commit' for details about committing changes.
   130       See 'hg commit' for details about committing changes.
   132   
   131   
   133       If you don't specify -m, the parent's message will be reused.
   132       If you don't specify -m, the parent's message will be reused.
   134   
   133   
   135       Behind the scenes, Mercurial first commits the update as a regular child
   134       If --extra is specified, the behavior of 'hg amend' is reversed: Changes
   136       of the current parent. Then it creates a new commit on the parent's
   135       to selected files in the checked out revision appear again as uncommitted
   137       parents with the updated contents. Then it changes the working copy parent
   136       changed in the working directory.
   138       to this new combined changeset. Finally, the old changeset and its update
       
   139       are hidden from 'hg log' (unless you use --hidden with log).
       
   140   
   137   
   141       Returns 0 on success, 1 if nothing changed.
   138       Returns 0 on success, 1 if nothing changed.
   142   
   139   
   143   options ([+] can be repeated):
   140   options ([+] can be repeated):
   144   
   141   
   145    -A --addremove           mark new/missing files as added/removed before
   142    -A --addremove           mark new/missing files as added/removed before
   146                             committing
   143                             committing
       
   144    -a --all                 match all files
   147    -e --edit                invoke editor on commit messages
   145    -e --edit                invoke editor on commit messages
       
   146       --extract             extract changes from the commit to the working copy
   148       --close-branch        mark a branch as closed, hiding it from the branch
   147       --close-branch        mark a branch as closed, hiding it from the branch
   149                             list
   148                             list
   150    -s --secret              use the secret phase for committing
   149    -s --secret              use the secret phase for committing
   151    -I --include PATTERN [+] include names matching the given patterns
   150    -I --include PATTERN [+] include names matching the given patterns
   152    -X --exclude PATTERN [+] exclude names matching the given patterns
   151    -X --exclude PATTERN [+] exclude names matching the given patterns