tests/test-mq-qrefresh-replace-log-message.t
changeset 21924 5375ba75df40
parent 21713 7a51bced398b
child 21930 a5168eb9b2bc
equal deleted inserted replaced
21923:e582e20cd3e6 21924:5375ba75df40
    24 
    24 
    25   $ hg log -l1 --template "{desc}\n"
    25   $ hg log -l1 --template "{desc}\n"
    26   First commit message
    26   First commit message
    27 
    27 
    28 Testing changing message with -m
    28 Testing changing message with -m
    29 (this tests also that '--edit' can be used with '--message')
    29 (this tests also that '--edit' can be used with '--message', and
       
    30 that '[committemplate] changeset' definition and commit log specific
       
    31 template keyword 'extramsg' work well)
       
    32 
       
    33   $ cat >> .hg/hgrc <<EOF
       
    34   > [committemplate]
       
    35   > changeset = HG: this is customized commit template
       
    36   >     {desc}\n\n
       
    37   >     HG: Enter commit message.  Lines beginning with 'HG:' are removed.
       
    38   >     HG: {extramsg}
       
    39   >     HG: --
       
    40   >     HG: user: {author}
       
    41   >     HG: branch '{branch}'\n{file_adds %
       
    42   >    "HG: added {file}\n"     }{file_mods %
       
    43   >    "HG: changed {file}\n"   }{file_dels %
       
    44   >    "HG: removed {file}\n"   }{if(files, "",
       
    45   >    "HG: no files changed\n")}
       
    46   > EOF
    30 
    47 
    31   $ echo bbbb > file
    48   $ echo bbbb > file
    32   $ HGEDITOR=cat hg qrefresh -m "Second commit message" -e
    49   $ HGEDITOR=cat hg qrefresh -m "Second commit message" -e
       
    50   HG: this is customized commit template
    33   Second commit message
    51   Second commit message
    34   
    52   
    35   
    53   
    36   HG: Enter commit message.  Lines beginning with 'HG:' are removed.
    54   HG: Enter commit message.  Lines beginning with 'HG:' are removed.
    37   HG: Leave message empty to use default message.
    55   HG: Leave message empty to use default message.
    38   HG: --
    56   HG: --
    39   HG: user: test
    57   HG: user: test
    40   HG: branch 'default'
    58   HG: branch 'default'
    41   HG: added file
    59   HG: added file
       
    60 
       
    61   $ cat >> .hg/hgrc <<EOF
       
    62   > # disable customizing for subsequent tests
       
    63   > [committemplate]
       
    64   > changeset =
       
    65   > EOF
    42 
    66 
    43 Should display 'Second commit message'
    67 Should display 'Second commit message'
    44 
    68 
    45   $ hg log -l1 --template "{desc}\n"
    69   $ hg log -l1 --template "{desc}\n"
    46   Second commit message
    70   Second commit message