tests/test-histedit-arguments.t
author Kevin Bullock <kbullock@ringworld.org>
Sun, 07 Sep 2014 11:46:11 -0500
changeset 22369 897041f6b025
parent 22152 d2a5986cb89d
parent 22368 802dffd62de5
child 24009 00d331763442
permissions -rw-r--r--
merge with stable
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19035
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
Test argument handling and various data parsing
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     2
==================================================
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     3
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     4
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
Enable extensions used by this test.
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
  $ cat >>$HGRCPATH <<EOF
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
  > [extensions]
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     8
  > histedit=
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     9
  > EOF
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    11
Repo setup.
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    12
  $ hg init foo
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    13
  $ cd foo
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    14
  $ echo alpha >> alpha
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    15
  $ hg addr
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    16
  adding alpha
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
  $ hg ci -m one
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    18
  $ echo alpha >> alpha
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
  $ hg ci -m two
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    20
  $ echo alpha >> alpha
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    21
  $ hg ci -m three
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    22
  $ echo alpha >> alpha
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    23
  $ hg ci -m four
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    24
  $ echo alpha >> alpha
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    25
  $ hg ci -m five
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    26
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    27
  $ hg log --style compact --graph
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    28
  @  4[tip]   08d98a8350f3   1970-01-01 00:00 +0000   test
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    29
  |    five
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    30
  |
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    31
  o  3   c8e68270e35a   1970-01-01 00:00 +0000   test
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    32
  |    four
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    33
  |
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    34
  o  2   eb57da33312f   1970-01-01 00:00 +0000   test
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    35
  |    three
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    36
  |
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    37
  o  1   579e40513370   1970-01-01 00:00 +0000   test
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    38
  |    two
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    39
  |
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    40
  o  0   6058cbb6cfd7   1970-01-01 00:00 +0000   test
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    41
       one
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    42
  
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    43
22368
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    44
histedit --continue/--abort with no existing state
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    45
--------------------------------------------------
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    46
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    47
  $ hg histedit --continue
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    48
  abort: no histedit in progress
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    49
  [255]
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    50
  $ hg histedit --abort
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    51
  abort: no histedit in progress
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    52
  [255]
802dffd62de5 histedit: abort gracefully on --continue/--abort with no state
Siddharth Agarwal <sid0@fb.com>
parents: 21858
diff changeset
    53
19035
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    54
Run a dummy edit to make sure we get tip^^ correctly via revsingle.
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    55
--------------------------------------------------------------------
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    56
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    57
  $ HGEDITOR=cat hg histedit "tip^^"
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    58
  pick eb57da33312f 2 three
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    59
  pick c8e68270e35a 3 four
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    60
  pick 08d98a8350f3 4 five
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    61
  
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    62
  # Edit history between eb57da33312f and 08d98a8350f3
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    63
  #
20503
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 19847
diff changeset
    64
  # Commits are listed from least to most recent
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 19847
diff changeset
    65
  #
19035
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    66
  # Commands:
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    67
  #  p, pick = use commit
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    68
  #  e, edit = use commit, but stop for amending
20511
5840da876235 histedit: shorten new fold message
Matt Mackall <mpm@selenic.com>
parents: 20503
diff changeset
    69
  #  f, fold = use commit, but combine it with the one above
22152
d2a5986cb89d histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents: 21858
diff changeset
    70
  #  r, roll = like fold, but discard this commit's description
19035
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    71
  #  d, drop = remove commit from history
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    72
  #  m, mess = edit message without changing commit content
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    73
  #
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    74
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    75
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    76
Run on a revision not ancestors of the current working directory.
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    77
--------------------------------------------------------------------
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    78
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    79
  $ hg up 2
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    80
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    81
  $ hg histedit -r 4
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    82
  abort: 08d98a8350f3 is not an ancestor of working directory
85974024ffa3 histedit-test: rename histedit-revspec into histedit-argument
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    83
  [255]
19039
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
    84
  $ hg up --quiet
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
    85
20806
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    86
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    87
Test that we pick the minimum of a revrange
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    88
---------------------------------------
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    89
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    90
  $ HGEDITOR=cat hg histedit '2::' --commands - << EOF
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    91
  > pick eb57da33312f 2 three
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    92
  > pick c8e68270e35a 3 four
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    93
  > pick 08d98a8350f3 4 five
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    94
  > EOF
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    95
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    96
  $ hg up --quiet
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    97
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    98
  $ HGEDITOR=cat hg histedit 'tip:2' --commands - << EOF
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
    99
  > pick eb57da33312f 2 three
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   100
  > pick c8e68270e35a 3 four
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   101
  > pick 08d98a8350f3 4 five
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   102
  > EOF
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   103
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   104
  $ hg up --quiet
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   105
19847
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   106
Run on a revision not descendants of the initial parent
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   107
--------------------------------------------------------------------
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   108
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   109
Test the message shown for inconsistent histedit state, which may be
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   110
created (and forgotten) by Mercurial earlier than 2.7. This emulates
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   111
Mercurial earlier than 2.7 by renaming ".hg/histedit-state"
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   112
temporarily.
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   113
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   114
  $ HGEDITOR=cat hg histedit -r 4 --commands - << EOF
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   115
  > edit 08d98a8350f3 4 five
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   116
  > EOF
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   117
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   118
  reverting alpha
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   119
  Make changes as needed, you may commit or record as needed now.
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   120
  When you are finished, run hg histedit --continue to resume.
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   121
  [1]
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   122
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   123
  $ mv .hg/histedit-state .hg/histedit-state.back
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   124
  $ hg update --quiet --clean 2
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   125
  $ mv .hg/histedit-state.back .hg/histedit-state
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   126
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   127
  $ hg histedit --continue
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   128
  abort: c8e68270e35a is not an ancestor of working directory
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   129
  (use "histedit --abort" to clear broken state)
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   130
  [255]
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   131
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   132
  $ hg histedit --abort
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   133
  $ hg update --quiet --clean
45c3086880c7 histedit: suggest "histedit --abort" for inconsistent histedit state
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 19048
diff changeset
   134
19040
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   135
Test that missing revisions are detected
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   136
---------------------------------------
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   137
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   138
  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   139
  > pick eb57da33312f 2 three
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   140
  > pick 08d98a8350f3 4 five
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   141
  > EOF
19048
1163ff06ce89 histedit: more precise user message when changeset is missing
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19047
diff changeset
   142
  abort: missing rules for changeset c8e68270e35a
1163ff06ce89 histedit: more precise user message when changeset is missing
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19047
diff changeset
   143
  (do you want to use the drop action?)
19040
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   144
  [255]
7eb6bfe0b5a2 histedit-test: test that missing revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19039
diff changeset
   145
19041
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   146
Test that extra revisions are detected
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   147
---------------------------------------
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   148
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   149
  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   150
  > pick 6058cbb6cfd7 0 one
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   151
  > pick c8e68270e35a 3 four
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   152
  > pick 08d98a8350f3 4 five
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   153
  > EOF
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   154
  abort: may not use changesets other than the ones listed
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   155
  [255]
3b52b15e0b3d histedit-test: test that extra revisions are detected
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19040
diff changeset
   156
19042
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   157
Test malformed line
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   158
---------------------------------------
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   159
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   160
  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   161
  > pickeb57da33312f2three
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   162
  > pick c8e68270e35a 3 four
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   163
  > pick 08d98a8350f3 4 five
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   164
  > EOF
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   165
  abort: malformed line "pickeb57da33312f2three"
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   166
  [255]
52366b37f897 histedit-test: test malformed line
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19041
diff changeset
   167
19043
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   168
Test unknown changeset
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   169
---------------------------------------
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   170
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   171
  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   172
  > pick 0123456789ab 2 three
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   173
  > pick c8e68270e35a 3 four
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   174
  > pick 08d98a8350f3 4 five
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   175
  > EOF
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   176
  abort: unknown changeset 0123456789ab listed
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   177
  [255]
7d27d80185f0 histedit-test: test unknown changeset
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19042
diff changeset
   178
19044
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   179
Test unknown command
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   180
---------------------------------------
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   181
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   182
  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   183
  > coin eb57da33312f 2 three
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   184
  > pick c8e68270e35a 3 four
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   185
  > pick 08d98a8350f3 4 five
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   186
  > EOF
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   187
  abort: unknown action "coin"
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   188
  [255]
f77c23ec09f7 histedit-test: test unknown command
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19043
diff changeset
   189
19047
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   190
Test duplicated changeset
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   191
---------------------------------------
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   192
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   193
So one is missing and one appear twice.
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   194
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   195
  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   196
  > pick eb57da33312f 2 three
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   197
  > pick eb57da33312f 2 three
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   198
  > pick 08d98a8350f3 4 five
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   199
  > EOF
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   200
  abort: duplicated command for changeset eb57da33312f
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   201
  [255]
81de87f8b480 histedit: protect against duplicated entries
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19044
diff changeset
   202
19039
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   203
Test short version of command
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   204
---------------------------------------
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   205
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   206
Note: we use varying amounts of white space between command name and changeset
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   207
short hash. This tests issue3893.
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   208
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   209
  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   210
  > pick eb57da33312f 2 three
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   211
  > p    c8e68270e35a 3 four
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   212
  > f 08d98a8350f3 4 five
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   213
  > EOF
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   214
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   215
  reverting alpha
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   216
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   217
  four
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   218
  ***
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   219
  five
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   220
  
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   221
  
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   222
  
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   223
  HG: Enter commit message.  Lines beginning with 'HG:' are removed.
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   224
  HG: Leave message empty to abort commit.
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   225
  HG: --
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   226
  HG: user: test
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   227
  HG: branch 'default'
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   228
  HG: changed alpha
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   229
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   230
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
41669a18a7d6 histedit: handle multiple spaces between action and hash (issue3893)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 19035
diff changeset
   231
  saved backup bundle to $TESTTMP/foo/.hg/strip-backup/*-backup.hg (glob)
20806
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   232
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   233
  $ hg update -q 2
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   234
  $ echo x > x
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   235
  $ hg add x
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   236
  $ hg commit -m'x' x
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   237
  created new head
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   238
  $ hg histedit -r 'heads(all())'
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   239
  abort: The specified revisions must have exactly one common root
d66862b87ae6 histedit: select the lowest rev when looking for a root in a revset (bc)
David Soria Parra <davidsp@fb.com>
parents: 20511
diff changeset
   240
  [255]
21858
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   241
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   242
Test that trimming description using multi-byte characters
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   243
--------------------------------------------------------------------
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   244
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   245
  $ python <<EOF
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   246
  > fp = open('logfile', 'w')
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   247
  > fp.write('12345678901234567890123456789012345678901234567890' +
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   248
  >          '12345') # there are 5 more columns for 80 columns
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   249
  > 
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   250
  > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   251
  > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8'))
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   252
  > 
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   253
  > fp.close()
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   254
  > EOF
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   255
  $ echo xx >> x
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   256
  $ hg --encoding utf-8 commit --logfile logfile
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   257
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   258
  $ HGEDITOR=cat hg --encoding utf-8 histedit tip
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   259
  pick 3d3ea1f3a10b 5 1234567890123456789012345678901234567890123456789012345\xe3\x81\x82... (esc)
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   260
  
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   261
  # Edit history between 3d3ea1f3a10b and 3d3ea1f3a10b
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   262
  #
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   263
  # Commits are listed from least to most recent
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   264
  #
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   265
  # Commands:
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   266
  #  p, pick = use commit
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   267
  #  e, edit = use commit, but stop for amending
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   268
  #  f, fold = use commit, but combine it with the one above
22152
d2a5986cb89d histedit: add "roll" command to fold commit data and drop message (issue4256)
Mike Edgar <adgar@google.com>
parents: 21858
diff changeset
   269
  #  r, roll = like fold, but discard this commit's description
21858
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   270
  #  d, drop = remove commit from history
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   271
  #  m, mess = edit message without changing commit content
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   272
  #
50fd3a36d166 histedit: use 'util.ellipsis' to trim description of each changesets
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20806
diff changeset
   273
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved