tests/test-histedit-commute.t
author timeless <timeless@mozdev.org>
Wed, 23 Dec 2015 21:20:08 +0000
changeset 27674 78d86664e3a2
parent 27629 e7ff83b2bcfe
child 27712 bb810c8b3eca
permissions -rw-r--r--
histedit: prefer edit commit, edit message, use commit Selecting editing commits, rewording commit messages, and selecting commits are key actions, we will prefer them more generally in a future commit, this pulls them ahead before that to make the diffs easier to read. The remaining commands are left alphabetically sorted
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     1
  $ . "$TESTDIR/histedit-helpers.sh"
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     2
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     3
  $ cat >> $HGRCPATH <<EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     4
  > [extensions]
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     5
  > histedit=
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     6
  > EOF
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
     7
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     8
  $ initrepo ()
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
     9
  > {
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    10
  >     hg init r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    11
  >     cd r
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    12
  >     for x in a b c d e f ; do
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    13
  >         echo $x > $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    14
  >         hg add $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    15
  >         hg ci -m $x
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    16
  >     done
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    17
  > }
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    18
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    19
  $ initrepo
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
    20
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    21
log before edit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    22
  $ hg log --graph
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    23
  @  changeset:   5:652413bf663e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    24
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    25
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    26
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    27
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    28
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    29
  o  changeset:   4:e860deea161a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    30
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    31
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    32
  |  summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    33
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    34
  o  changeset:   3:055a42cdd887
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    35
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    36
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    37
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    38
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    39
  o  changeset:   2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    40
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    41
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    42
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    43
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    44
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    45
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    46
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    47
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    48
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    49
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    50
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    51
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    52
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    53
  
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    54
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    55
show the edit commands offered
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    56
  $ HGEDITOR=cat hg histedit 177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    57
  pick 177f92b77385 2 c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    58
  pick 055a42cdd887 3 d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    59
  pick e860deea161a 4 e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    60
  pick 652413bf663e 5 f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    61
  
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    62
  # Edit history between 177f92b77385 and 652413bf663e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    63
  #
20503
23dc77874191 histedit: clarify description of fold command
Adrian Zgorzałek <adek@fb.com>
parents: 20117
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: 20117
diff changeset
    65
  #
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    66
  # Commands:
27674
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
    67
  #
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
    68
  #  e, edit = use commit, but stop for amending
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
    69
  #  m, mess = edit commit message without changing commit content
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    70
  #  p, pick = use commit
27674
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
    71
  #  d, drop = remove commit from history
20511
5840da876235 histedit: shorten new fold message
Matt Mackall <mpm@selenic.com>
parents: 20503
diff changeset
    72
  #  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: 21950
diff changeset
    73
  #  r, roll = like fold, but discard this commit's description
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    74
  #
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    75
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
    76
edit the history
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
    77
(use a hacky editor to check histedit-last-edit.txt backup)
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
    78
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
    79
  $ EDITED="$TESTTMP/editedhistory"
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
    80
  $ cat > $EDITED <<EOF
27546
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    81
  > edit 177f92b77385 c
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    82
  > pick e860deea161a e
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    83
  > pick 652413bf663e f
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    84
  > pick 055a42cdd887 d
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    85
  > EOF
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    86
  $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    87
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
27629
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27546
diff changeset
    88
  Editing (177f92b77385), you may commit or record as needed now.
e7ff83b2bcfe histedit: list action when intervention is required
timeless <timeless@mozdev.org>
parents: 27546
diff changeset
    89
  (hg histedit --continue to resume)
27546
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    90
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    91
rules should end up in .hg/histedit-last-edit.txt:
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    92
  $ cat .hg/histedit-last-edit.txt
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    93
  edit 177f92b77385 c
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    94
  pick e860deea161a e
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    95
  pick 652413bf663e f
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    96
  pick 055a42cdd887 d
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    97
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    98
  $ hg histedit --abort
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
    99
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
c00924c54607 histedit: limit cleanup of histedit-last-edit.txt to success
timeless <timeless@mozdev.org>
parents: 27545
diff changeset
   100
  $ cat > $EDITED <<EOF
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   101
  > pick 177f92b77385 c
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   102
  > pick e860deea161a e
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   103
  > pick 652413bf663e f
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   104
  > pick 055a42cdd887 d
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   105
  > EOF
17086
5f2cacb715dc tests: make histedit tests more resilient to filesystem variation
Mads Kiilerich <mads@kiilerich.com>
parents: 17085
diff changeset
   106
  $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   107
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   108
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   109
log after edit
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   110
  $ hg log --graph
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   111
  @  changeset:   5:07114f51870f
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   112
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   113
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   114
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   115
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   116
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   117
  o  changeset:   4:8ade9693061e
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   118
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   119
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   120
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   121
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   122
  o  changeset:   3:d8249471110a
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   123
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   124
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   125
  |  summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   126
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   127
  o  changeset:   2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   128
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   129
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   130
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   131
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   132
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   133
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   134
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   135
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   136
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   137
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   138
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   139
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   140
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   141
  
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   142
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   143
put things back
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   144
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   145
  $ hg histedit 177f92b77385 --commands - 2>&1 << EOF | fixbundle
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   146
  > pick 177f92b77385 c
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   147
  > pick 07114f51870f d
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   148
  > pick d8249471110a e
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   149
  > pick 8ade9693061e f
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   150
  > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   151
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   152
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   153
  $ hg log --graph
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   154
  @  changeset:   5:7eca9b5b1148
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   155
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   156
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   157
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   158
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   159
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   160
  o  changeset:   4:915da888f2de
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   161
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   162
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   163
  |  summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   164
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   165
  o  changeset:   3:10517e47bbbb
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   166
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   167
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   168
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   169
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   170
  o  changeset:   2:177f92b77385
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   171
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   172
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   173
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   174
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   175
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   176
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   177
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   178
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   179
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   180
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   181
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   182
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   183
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   184
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   185
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   186
slightly different this time
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   187
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   188
  $ hg histedit 177f92b77385 --commands - << EOF 2>&1 | fixbundle
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   189
  > pick 10517e47bbbb d
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   190
  > pick 7eca9b5b1148 f
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   191
  > pick 915da888f2de e
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   192
  > pick 177f92b77385 c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   193
  > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   194
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   195
  $ hg log --graph
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   196
  @  changeset:   5:38b92f448761
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   197
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   198
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   199
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   200
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   201
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   202
  o  changeset:   4:de71b079d9ce
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   203
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   204
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   205
  |  summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   206
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   207
  o  changeset:   3:be9ae3a309c6
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   208
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   209
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   210
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   211
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   212
  o  changeset:   2:799205341b6b
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   213
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   214
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   215
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   216
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   217
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   218
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   219
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   220
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   221
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   222
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   223
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   224
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   225
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   226
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   227
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   228
keep prevents stripping dead revs
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   229
  $ hg histedit 799205341b6b --keep --commands - 2>&1 << EOF | fixbundle
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   230
  > pick 799205341b6b d
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   231
  > pick be9ae3a309c6 f
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   232
  > pick 38b92f448761 c
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   233
  > pick de71b079d9ce e
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   234
  > EOF
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   235
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   236
  $ hg log --graph
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   237
  @  changeset:   7:803ef1c6fcfd
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   238
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   239
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   240
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   241
  |  summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   242
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   243
  o  changeset:   6:ece0b8d93dda
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   244
  |  parent:      3:be9ae3a309c6
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   245
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   246
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   247
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   248
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   249
  | o  changeset:   5:38b92f448761
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   250
  | |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   251
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   252
  | |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   253
  | |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   254
  | o  changeset:   4:de71b079d9ce
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   255
  |/   user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   256
  |    date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   257
  |    summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   258
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   259
  o  changeset:   3:be9ae3a309c6
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   260
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   261
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   262
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   263
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   264
  o  changeset:   2:799205341b6b
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   265
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   266
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   267
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   268
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   269
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   270
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   271
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   272
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   273
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   274
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   275
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   276
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   277
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   278
  
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   279
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   280
try with --rev
19019
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   281
  $ hg histedit --commands - --rev -2 2>&1 <<EOF | fixbundle
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   282
  > pick de71b079d9ce e
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   283
  > pick 38b92f448761 c
53060cc1b601 histedit-test: generalise --commands "-" usage
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 18437
diff changeset
   284
  > EOF
27545
a67d2e059a51 histedit: use parse-error exception for parsing
timeless <timeless@mozdev.org>
parents: 27406
diff changeset
   285
  hg: parse error: may not use "pick" with changesets other than the ones listed
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   286
  $ hg log --graph
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   287
  @  changeset:   7:803ef1c6fcfd
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   288
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   289
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   290
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   291
  |  summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   292
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   293
  o  changeset:   6:ece0b8d93dda
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   294
  |  parent:      3:be9ae3a309c6
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   295
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   296
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   297
  |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   298
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   299
  | o  changeset:   5:38b92f448761
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   300
  | |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   301
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   302
  | |  summary:     c
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   303
  | |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   304
  | o  changeset:   4:de71b079d9ce
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   305
  |/   user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   306
  |    date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   307
  |    summary:     e
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   308
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   309
  o  changeset:   3:be9ae3a309c6
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   310
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   311
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   312
  |  summary:     f
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   313
  |
18437
358c23e8f1c6 histedit: record histedit source (issue3681)
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 17087
diff changeset
   314
  o  changeset:   2:799205341b6b
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   315
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   316
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   317
  |  summary:     d
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   318
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   319
  o  changeset:   1:d2ae7f538514
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   320
  |  user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   321
  |  date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   322
  |  summary:     b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   323
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   324
  o  changeset:   0:cb9a9f314b8b
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   325
     user:        test
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   326
     date:        Thu Jan 01 00:00:00 1970 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   327
     summary:     a
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   328
  
21950
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   329
Verify that revsetalias entries work with histedit:
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   330
  $ cat >> $HGRCPATH <<EOF
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   331
  > [revsetalias]
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   332
  > grandparent(ARG) = p1(p1(ARG))
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   333
  > EOF
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   334
  $ echo extra commit >> c
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   335
  $ hg ci -m 'extra commit to c'
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   336
  $ HGEDITOR=cat hg histedit 'grandparent(.)'
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   337
  pick ece0b8d93dda 6 c
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   338
  pick 803ef1c6fcfd 7 e
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   339
  pick 9c863c565126 8 extra commit to c
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   340
  
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   341
  # Edit history between ece0b8d93dda and 9c863c565126
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   342
  #
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   343
  # Commits are listed from least to most recent
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   344
  #
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   345
  # Commands:
27674
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
   346
  #
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
   347
  #  e, edit = use commit, but stop for amending
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
   348
  #  m, mess = edit commit message without changing commit content
21950
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   349
  #  p, pick = use commit
27674
78d86664e3a2 histedit: prefer edit commit, edit message, use commit
timeless <timeless@mozdev.org>
parents: 27629
diff changeset
   350
  #  d, drop = remove commit from history
21950
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   351
  #  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: 21950
diff changeset
   352
  #  r, roll = like fold, but discard this commit's description
21950
af44c7a1e55e histedit: respect revsetalias entries (issue4311)
Augie Fackler <raf@durin42.com>
parents: 20511
diff changeset
   353
  #
17064
168cc52ad7c2 histedit: new extension for interactive history editing
Augie Fackler <raf@durin42.com>
parents:
diff changeset
   354
17085
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   355
should also work if a commit message is missing
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   356
  $ BUNDLE="$TESTDIR/missing-comment.hg"
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   357
  $ hg init missing
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   358
  $ cd missing
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   359
  $ hg unbundle $BUNDLE
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   360
  adding changesets
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   361
  adding manifests
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   362
  adding file changes
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   363
  added 3 changesets with 3 changes to 1 files
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   364
  (run 'hg update' to get a working copy)
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   365
  $ hg co tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   366
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   367
  $ hg log --graph
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   368
  @  changeset:   2:bd22688093b3
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   369
  |  tag:         tip
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   370
  |  user:        Robert Altman <robert.altman@telventDTN.com>
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   371
  |  date:        Mon Nov 28 16:40:04 2011 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   372
  |  summary:     Update file.
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   373
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   374
  o  changeset:   1:3b3e956f9171
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   375
  |  user:        Robert Altman <robert.altman@telventDTN.com>
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   376
  |  date:        Mon Nov 28 16:37:57 2011 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   377
  |
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   378
  o  changeset:   0:141947992243
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   379
     user:        Robert Altman <robert.altman@telventDTN.com>
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   380
     date:        Mon Nov 28 16:35:28 2011 +0000
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   381
     summary:     Checked in text file
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   382
  
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   383
  $ hg histedit 0
35729bdd59b6 tests: convert histedit tests to .t
Mads Kiilerich <mads@kiilerich.com>
parents: 17064
diff changeset
   384
  $ cd ..
23889
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   385
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   386
  $ cd ..
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   387
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   388
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   389
Test to make sure folding renames doesn't cause bogus conflicts (issue4251):
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   390
  $ hg init issue4251
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   391
  $ cd issue4251
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   392
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   393
  $ mkdir initial-dir
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   394
  $ echo foo > initial-dir/initial-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   395
  $ hg add initial-dir/initial-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   396
  $ hg commit -m "initial commit"
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   397
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   398
Move the file to a new directory, and in the same commit, change its content:
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   399
  $ mkdir another-dir
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   400
  $ hg mv initial-dir/initial-file another-dir/
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   401
  $ echo changed > another-dir/initial-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   402
  $ hg commit -m "moved and changed"
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   403
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   404
Rename the file:
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   405
  $ hg mv another-dir/initial-file another-dir/renamed-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   406
  $ hg commit -m "renamed"
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   407
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   408
Now, let's try to fold the second commit into the first:
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   409
  $ cat > editor.sh <<EOF
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   410
  > #!/bin/sh
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   411
  > cat > \$1 <<ENDOF
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   412
  > pick b0f4233702ca 0 initial commit
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   413
  > fold 5e8704a8f2d2 1 moved and changed
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   414
  > pick 40e7299e8fa7 2 renamed
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   415
  > ENDOF
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   416
  > EOF
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   417
23910
759df5197e9a test-histedit-commute: call helper script with sh
Matt Mackall <mpm@selenic.com>
parents: 23889
diff changeset
   418
  $ HGEDITOR="sh ./editor.sh" hg histedit 0
23889
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   419
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
23921
387d6cbbb514 tests: add "(glob)" to output in test-histedit-commute.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 23910
diff changeset
   420
  adding another-dir/initial-file (glob)
387d6cbbb514 tests: add "(glob)" to output in test-histedit-commute.t for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 23910
diff changeset
   421
  removing initial-dir/initial-file (glob)
23889
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   422
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   423
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   424
  saved backup bundle to $TESTTMP/issue4251/.hg/strip-backup/*-backup.hg (glob)
27349
5b68f72c2ba9 tests: relax histedit issue4251 and issue3893 backups
timeless <timeless@mozdev.org>
parents: 27082
diff changeset
   425
  saved backup bundle to $TESTTMP/issue4251/.hg/strip-backup/*-backup.hg (glob)
23889
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   426
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   427
  $ hg --config diff.git=yes export 0
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   428
  # HG changeset patch
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   429
  # User test
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   430
  # Date 0 0
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   431
  #      Thu Jan 01 00:00:00 1970 +0000
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   432
  # Node ID fffadc26f8f85623ce60b028a3f1ccc3730f8530
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   433
  # Parent  0000000000000000000000000000000000000000
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   434
  pick b0f4233702ca 0 initial commit
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   435
  fold 5e8704a8f2d2 1 moved and changed
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   436
  pick 40e7299e8fa7 2 renamed
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   437
  
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   438
  diff --git a/another-dir/initial-file b/another-dir/initial-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   439
  new file mode 100644
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   440
  --- /dev/null
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   441
  +++ b/another-dir/initial-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   442
  @@ -0,0 +1,1 @@
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   443
  +changed
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   444
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   445
  $ hg --config diff.git=yes export 1
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   446
  # HG changeset patch
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   447
  # User test
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   448
  # Date 0 0
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   449
  #      Thu Jan 01 00:00:00 1970 +0000
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   450
  # Node ID 9b730d82b00af8a2766facebfa47cc124405a118
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   451
  # Parent  fffadc26f8f85623ce60b028a3f1ccc3730f8530
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   452
  renamed
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   453
  
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   454
  diff --git a/another-dir/initial-file b/another-dir/renamed-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   455
  rename from another-dir/initial-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   456
  rename to another-dir/renamed-file
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   457
3831e9b3750a histedit: add a test to show that issue4251 is fixed (issue4251)
Augie Fackler <raf@durin42.com>
parents: 22152
diff changeset
   458
  $ cd ..