tests/test-amend.t
author Boris Feld <boris.feld@octobus.net>
Sun, 04 Jun 2017 20:53:36 +0200
changeset 2579 a0f055600512
parent 2578 7795a86ba326
child 2587 cbc7a69116bd
permissions -rw-r--r--
effectflag: activate effect flag on test-drop.t test file Prepare activation of effect flag by default by activating it on test-drop.t test file first.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
263
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
2578
7795a86ba326 effectflag: activate effect flag on test-amend.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
     2
  > [experimental]
7795a86ba326 effectflag: activate effect flag on test-amend.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
     3
  > evolution.effect-flags = yes
263
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
     4
  > [extensions]
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
     5
  > hgext.graphlog=
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
     6
  > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1673
diff changeset
     7
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
263
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
     8
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
     9
  $ glog() {
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    10
  >   hg glog --template '{rev}@{branch}({phase}) {desc|firstline}\n' "$@"
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    11
  > }
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    12
630
722b52c75f02 compat: adapt to upstreaming of divergent logic
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 491
diff changeset
    13
  $ hg init repo --traceback
263
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    14
  $ cd repo
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    15
  $ echo a > a
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    16
  $ hg ci -Am adda
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    17
  adding a
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    18
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 976
diff changeset
    19
Test that amend captures branches
263
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    20
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    21
  $ hg branch foo
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    22
  marked working directory as branch foo
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    23
  (branches are permanent and global, did you want a bookmark?)
974
5808aad40aca amend: in tests, do not rely on defaults -- always use explicit -d
Greg Ward <greg@gerg.ca>
parents: 742
diff changeset
    24
  $ hg amend -d '0 0'
441
d702f0d26c6a obsolete: remove debugsuccessors
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 385
diff changeset
    25
  $ hg debugobsolete
2578
7795a86ba326 effectflag: activate effect flag on test-amend.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    26
  07f4944404050f47db2e5c5071e0e84e7a27bba9 6a022cbb61d5ba0f03f98ff2d36319dfea1034ae 0 (*) {'ef1': '*', 'user': 'test'} (glob)
7795a86ba326 effectflag: activate effect flag on test-amend.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    27
  b2e32ffb533cbe1d5759638c0cd4e8abc43b2738 0 {07f4944404050f47db2e5c5071e0e84e7a27bba9} (*) {'ef1': '*', 'user': 'test'} (glob)
263
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    28
  $ hg branch
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    29
  foo
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    30
  $ hg branches
742
760d01a549a6 amend: use core mechanism for amend
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 699
diff changeset
    31
  foo                            2:6a022cbb61d5
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    32
  $ glog
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    33
  @  2@foo(draft) adda
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    34
  
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    35
Test no-op
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    36
974
5808aad40aca amend: in tests, do not rely on defaults -- always use explicit -d
Greg Ward <greg@gerg.ca>
parents: 742
diff changeset
    37
  $ hg amend -d '0 0'
742
760d01a549a6 amend: use core mechanism for amend
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 699
diff changeset
    38
  nothing changed
760d01a549a6 amend: use core mechanism for amend
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 699
diff changeset
    39
  [1]
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    40
  $ glog
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    41
  @  2@foo(draft) adda
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    42
  
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    43
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    44
Test forcing the message to the same value, no intermediate revision.
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    45
974
5808aad40aca amend: in tests, do not rely on defaults -- always use explicit -d
Greg Ward <greg@gerg.ca>
parents: 742
diff changeset
    46
  $ hg amend -d '0 0' -m 'adda'
742
760d01a549a6 amend: use core mechanism for amend
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 699
diff changeset
    47
  nothing changed
760d01a549a6 amend: use core mechanism for amend
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 699
diff changeset
    48
  [1]
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    49
  $ glog
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    50
  @  2@foo(draft) adda
263
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    51
  
de62daaf2054 amend: drop --branches, pick it from working directory
Patrick Mezard <patrick@mezard.eu>
parents:
diff changeset
    52
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    53
Test collapsing into an existing revision, no intermediate revision.
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    54
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    55
  $ echo a >> a
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    56
  $ hg ci -m changea
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    57
  $ echo a > a
445
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    58
  $ hg status
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    59
  M a
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    60
  $ hg pstatus
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    61
  $ hg diff
742
760d01a549a6 amend: use core mechanism for amend
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 699
diff changeset
    62
  diff -r f7a50201fe3a a
445
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    63
  --- a/a	Thu Jan 01 00:00:00 1970 +0000
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    64
  +++ b/a	* +0000 (glob)
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    65
  @@ -1,2 +1,1 @@
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    66
   a
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    67
  -a
52b5e14c63d5 obsolete: enforce pdiff and pstatus alias in the extension
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 444
diff changeset
    68
  $ hg pdiff
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    69
  $ hg ci -m reseta
441
d702f0d26c6a obsolete: remove debugsuccessors
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 385
diff changeset
    70
  $ hg debugobsolete
2578
7795a86ba326 effectflag: activate effect flag on test-amend.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    71
  07f4944404050f47db2e5c5071e0e84e7a27bba9 6a022cbb61d5ba0f03f98ff2d36319dfea1034ae 0 (*) {'ef1': '*', 'user': 'test'} (glob)
7795a86ba326 effectflag: activate effect flag on test-amend.t test file
Boris Feld <boris.feld@octobus.net>
parents: 1806
diff changeset
    72
  b2e32ffb533cbe1d5759638c0cd4e8abc43b2738 0 {07f4944404050f47db2e5c5071e0e84e7a27bba9} (*) {'ef1': '*', 'user': 'test'} (glob)
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    73
  $ hg phase 2
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    74
  2: draft
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    75
  $ glog
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    76
  @  4@foo(draft) reseta
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    77
  |
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    78
  o  3@foo(draft) changea
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    79
  |
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    80
  o  2@foo(draft) adda
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    81
  
975
09d6036ad596 amend: explicitly test -d option
Greg Ward <greg@gerg.ca>
parents: 974
diff changeset
    82
Specify precise commit date with -d
09d6036ad596 amend: explicitly test -d option
Greg Ward <greg@gerg.ca>
parents: 974
diff changeset
    83
  $ hg amend -d '2001-02-03 04:05:06 +0700'
09d6036ad596 amend: explicitly test -d option
Greg Ward <greg@gerg.ca>
parents: 974
diff changeset
    84
  $ hg parents --template '{rev}  {date|date}\n'
09d6036ad596 amend: explicitly test -d option
Greg Ward <greg@gerg.ca>
parents: 974
diff changeset
    85
  5  Sat Feb 03 04:05:06 2001 +0700
265
24943df310d4 amend: do not traceback on no-ops
Patrick Mezard <patrick@mezard.eu>
parents: 263
diff changeset
    86
976
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    87
Specify "now" as commit date with -D
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    88
  $ before=`date +%s`
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    89
  $ hg amend -D
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    90
  $ commit=`hg parents --template '{date|hgdate} rev{rev}\n'`
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    91
  $ after=`date +%s`
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    92
  $ (echo $before ; echo $commit; echo $after) | sort -k1 -n -s
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    93
  \d+ (re)
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    94
  \d+ 0 rev6 (re)
bed842762447 amend: add -D/--current-date option, just like mq's qrefresh has
Greg Ward <greg@gerg.ca>
parents: 975
diff changeset
    95
  \d+ (re)
985
6a37044ec0b3 amend: add -U/--current-user option (inspired by mq)
Greg Ward <greg@gerg.ca>
parents: 984
diff changeset
    96
6a37044ec0b3 amend: add -U/--current-user option (inspired by mq)
Greg Ward <greg@gerg.ca>
parents: 984
diff changeset
    97
Specify current user as committer with -U
6a37044ec0b3 amend: add -U/--current-user option (inspired by mq)
Greg Ward <greg@gerg.ca>
parents: 984
diff changeset
    98
  $ HGUSER=newbie hg amend -U
6a37044ec0b3 amend: add -U/--current-user option (inspired by mq)
Greg Ward <greg@gerg.ca>
parents: 984
diff changeset
    99
  $ hg parents --template '{rev}  {author}\n'
6a37044ec0b3 amend: add -U/--current-user option (inspired by mq)
Greg Ward <greg@gerg.ca>
parents: 984
diff changeset
   100
  7  newbie
1140
b7d85cd8ec7b amend: allow the --logfile argument to work properly
Matt Harbison <matt_harbison@yahoo.com>
parents: 1067
diff changeset
   101
b7d85cd8ec7b amend: allow the --logfile argument to work properly
Matt Harbison <matt_harbison@yahoo.com>
parents: 1067
diff changeset
   102
Check that --logfile works
b7d85cd8ec7b amend: allow the --logfile argument to work properly
Matt Harbison <matt_harbison@yahoo.com>
parents: 1067
diff changeset
   103
  $ echo "logfile message" > logfile.txt
b7d85cd8ec7b amend: allow the --logfile argument to work properly
Matt Harbison <matt_harbison@yahoo.com>
parents: 1067
diff changeset
   104
  $ hg amend -l logfile.txt
b7d85cd8ec7b amend: allow the --logfile argument to work properly
Matt Harbison <matt_harbison@yahoo.com>
parents: 1067
diff changeset
   105
  $ hg log -r . -T "{desc}\n"
b7d85cd8ec7b amend: allow the --logfile argument to work properly
Matt Harbison <matt_harbison@yahoo.com>
parents: 1067
diff changeset
   106
  logfile message
1142
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   107
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   108
# Make sure we don't get reparented to -1 with no username (issue4211)
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   109
  $ HGUSER=
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   110
  $ hg amend -e --config ui.username= -m "empty user"
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   111
  abort: no username supplied
1673
8e879d59b20e tests: change quoting pattern to match core's conventions
Laurent Charignon <lcharignon@fb.com>
parents: 1584
diff changeset
   112
  (use 'hg config --edit' to set your username)
1142
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   113
  [255]
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   114
  $ hg sum
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   115
  parent: 8:* tip (glob)
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   116
   logfile message
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   117
  branch: foo
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   118
  commit: 1 unknown (clean)
9d85fd6e1474 test-amend: add a test for amend with no configured username (issue4211)
Matt Harbison <matt_harbison@yahoo.com>
parents: 1140
diff changeset
   119
  update: (current)
1453
8ca31deb8db7 merge with stable
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1452
diff changeset
   120
  phases: 3 draft
1296
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   121
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   122
Check the help
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   123
  $ hg amend -h
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   124
  hg amend [OPTION]... [FILE]...
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   125
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   126
  aliases: refresh
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   127
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   128
  combine a changeset with updates and replace it with a new one
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   129
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   130
      Commits a new changeset incorporating both the changes to the given files
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   131
      and all the changes from the current parent changeset into the repository.
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   132
  
1584
190e4e526c66 tests: change some double quotes to single quotes
Martin von Zweigbergk <martinvonz@google.com>
parents: 1453
diff changeset
   133
      See 'hg commit' for details about committing changes.
1296
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   134
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   135
      If you don't specify -m, the parent's message will be reused.
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   136
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   137
      Behind the scenes, Mercurial first commits the update as a regular child
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   138
      of the current parent. Then it creates a new commit on the parent's
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   139
      parents with the updated contents. Then it changes the working copy parent
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   140
      to this new combined changeset. Finally, the old changeset and its update
1584
190e4e526c66 tests: change some double quotes to single quotes
Martin von Zweigbergk <martinvonz@google.com>
parents: 1453
diff changeset
   141
      are hidden from 'hg log' (unless you use --hidden with log).
1296
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   142
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   143
      Returns 0 on success, 1 if nothing changed.
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   144
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   145
  options ([+] can be repeated):
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   146
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   147
   -A --addremove           mark new/missing files as added/removed before
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   148
                            committing
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   149
   -e --edit                invoke editor on commit messages
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   150
      --close-branch        mark a branch as closed, hiding it from the branch
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   151
                            list
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   152
   -s --secret              use the secret phase for committing
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   153
   -I --include PATTERN [+] include names matching the given patterns
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   154
   -X --exclude PATTERN [+] exclude names matching the given patterns
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   155
   -m --message TEXT        use text as commit message
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   156
   -l --logfile FILE        read commit message from file
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   157
   -d --date DATE           record the specified date as commit date
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   158
   -u --user USER           record the specified user as committer
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   159
   -D --current-date        record the current date as commit date
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   160
   -U --current-user        record the current user as committer
1452
1bcbd14cf159 merge back with 3.3 compat branch
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1451
diff changeset
   161
   -i --interactive         use interactive mode
1296
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   162
  
23819e1d61fd evolve: add -i flag to amend command
Laurent Charignon <lcharignon@fb.com>
parents: 1185
diff changeset
   163
  (some details hidden, use --verbose to show complete help)