tests/test-commit-interactive.t
author Laurent Charignon <lcharignon@fb.com>
Thu, 23 Apr 2015 16:59:11 -0700
branchstable
changeset 24844 6c6aee6d395b
parent 24837 edf907bd8144
child 24845 8133494accf1
permissions -rw-r--r--
record: remove useless line in test Remove a useless line in test to make the next patch cleaner.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
     1
Set up a repo
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     2
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
     3
  $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
     4
  > [ui]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
     5
  > interactive = true
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
     6
  > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
     7
  > record =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 23054
diff changeset
     8
  > EOF
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
     9
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    10
  $ hg init a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    11
  $ cd a
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    12
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    13
Select no files
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    14
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    15
  $ touch empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    16
  $ hg add empty-rw
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    17
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
    18
  $ hg commit -i empty-rw<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    19
  > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    20
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    21
  diff --git a/empty-rw b/empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    22
  new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    23
  examine changes to 'empty-rw'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    24
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    25
  no changes to record
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    26
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    27
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    28
  changeset:   -1:000000000000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    29
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    30
  user:        
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    31
  date:        Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    32
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    33
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    34
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    35
Select files but no hunks
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    36
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
    37
  $ hg commit -i  empty-rw<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    38
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    39
  > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    40
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    41
  diff --git a/empty-rw b/empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    42
  new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    43
  examine changes to 'empty-rw'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    44
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    45
  abort: empty commit message
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
    46
  [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    47
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    48
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    49
  changeset:   -1:000000000000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    50
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    51
  user:        
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    52
  date:        Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    53
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    54
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    55
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    56
Record empty file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    57
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
    58
  $ hg commit -i -d '0 0' -m empty empty-rw<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    59
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    60
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    61
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    62
  diff --git a/empty-rw b/empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    63
  new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    64
  examine changes to 'empty-rw'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    65
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    66
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    67
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    68
  changeset:   0:c0708cf4e46e
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    69
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    70
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    71
  date:        Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    72
  summary:     empty
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    73
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    74
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    75
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    76
Summary shows we updated to the new cset
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    77
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    78
  $ hg summary
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    79
  parent: 0:c0708cf4e46e tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    80
   empty
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    81
  branch: default
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    82
  commit: (clean)
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    83
  update: (current)
10964
aa0426c79664 test-record: add hg summary to verify we update dirstate
Augie Fackler <durin42@gmail.com>
parents: 8811
diff changeset
    84
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    85
Rename empty file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    86
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    87
  $ hg mv empty-rw empty-rename
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
    88
  $ hg commit -i -d '1 0' -m rename<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    89
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    90
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    91
  diff --git a/empty-rw b/empty-rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    92
  rename from empty-rw
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    93
  rename to empty-rename
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    94
  examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
    95
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
    96
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    97
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    98
  changeset:   1:d695e8dcb197
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
    99
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   100
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   101
  date:        Thu Jan 01 00:00:01 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   102
  summary:     rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   103
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   104
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   105
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   106
Copy empty file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   107
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   108
  $ hg cp empty-rename empty-copy
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   109
  $ hg commit -i -d '2 0' -m copy<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   110
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   111
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   112
  diff --git a/empty-rename b/empty-copy
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   113
  copy from empty-rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   114
  copy to empty-copy
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   115
  examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   116
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   117
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   118
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   119
  changeset:   2:1d4b90bea524
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   120
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   121
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   122
  date:        Thu Jan 01 00:00:02 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   123
  summary:     copy
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   124
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   125
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   126
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   127
Delete empty file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   128
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   129
  $ hg rm empty-copy
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   130
  $ hg commit -i -d '3 0' -m delete<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   131
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   132
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   133
  diff --git a/empty-copy b/empty-copy
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   134
  deleted file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   135
  examine changes to 'empty-copy'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   136
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   137
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   138
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   139
  changeset:   3:b39a238f01a1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   140
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   141
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   142
  date:        Thu Jan 01 00:00:03 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   143
  summary:     delete
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   144
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   145
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   146
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   147
Add binary file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   148
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   149
  $ hg bundle --base -2 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   150
  1 changesets found
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   151
  $ hg add tip.bundle
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   152
  $ hg commit -i -d '4 0' -m binary<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   153
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   154
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   155
  diff --git a/tip.bundle b/tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   156
  new file mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   157
  this is a binary file
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   158
  examine changes to 'tip.bundle'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   159
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   160
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   161
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   162
  changeset:   4:ad816da3711e
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   163
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   164
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   165
  date:        Thu Jan 01 00:00:04 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   166
  summary:     binary
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   167
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   168
  diff -r b39a238f01a1 -r ad816da3711e tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   169
  Binary file tip.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   170
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   171
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   172
Change binary file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   173
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   174
  $ hg bundle --base -2 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   175
  1 changesets found
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   176
  $ hg commit -i -d '5 0' -m binary-change<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   177
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   178
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   179
  diff --git a/tip.bundle b/tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   180
  this modifies a binary file (all or nothing)
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   181
  examine changes to 'tip.bundle'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   182
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   183
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   184
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   185
  changeset:   5:dccd6f3eb485
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   186
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   187
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   188
  date:        Thu Jan 01 00:00:05 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   189
  summary:     binary-change
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   190
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   191
  diff -r ad816da3711e -r dccd6f3eb485 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   192
  Binary file tip.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   193
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   194
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   195
Rename and change binary file
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   196
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   197
  $ hg mv tip.bundle top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   198
  $ hg bundle --base -2 top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   199
  1 changesets found
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   200
  $ hg commit -i -d '6 0' -m binary-change-rename<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   201
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   202
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   203
  diff --git a/tip.bundle b/top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   204
  rename from tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   205
  rename to top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   206
  this modifies a binary file (all or nothing)
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   207
  examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   208
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   209
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   210
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   211
  changeset:   6:7fa44105f5b3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   212
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   213
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   214
  date:        Thu Jan 01 00:00:06 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   215
  summary:     binary-change-rename
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   216
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   217
  diff -r dccd6f3eb485 -r 7fa44105f5b3 tip.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   218
  Binary file tip.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   219
  diff -r dccd6f3eb485 -r 7fa44105f5b3 top.bundle
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   220
  Binary file top.bundle has changed
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   221
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   222
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   223
Add plain file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   224
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   225
  $ for i in 1 2 3 4 5 6 7 8 9 10; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   226
  >     echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   227
  > done
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   228
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   229
  $ hg add plain
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   230
  $ hg commit -i -d '7 0' -m plain plain<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   231
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   232
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   233
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   234
  new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   235
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   236
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   237
  $ hg tip -p
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   238
  changeset:   7:11fb457c1be4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   239
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   240
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   241
  date:        Thu Jan 01 00:00:07 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   242
  summary:     plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   243
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   244
  diff -r 7fa44105f5b3 -r 11fb457c1be4 plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   245
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   246
  +++ b/plain	Thu Jan 01 00:00:07 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   247
  @@ -0,0 +1,10 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   248
  +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   249
  +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   250
  +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   251
  +4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   252
  +5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   253
  +6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   254
  +7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   255
  +8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   256
  +9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   257
  +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   258
  
17446
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   259
Modify end of plain file with username unset
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   260
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   261
  $ echo 11 >> plain
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   262
  $ unset HGUSER
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   263
  $ hg commit -i --config ui.username= -d '8 0' -m end plain
20579
625533523c9e tests: fix up config --edit breakage
Matt Mackall <mpm@selenic.com>
parents: 20266
diff changeset
   264
  abort: no username supplied
20580
b75a23eec9c9 ui: fix extra space in username abort
Matt Mackall <mpm@selenic.com>
parents: 20579
diff changeset
   265
  (use "hg config --edit" to set your username)
17446
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   266
  [255]
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   267
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   268
18266
09a2b6741695 record: use patch.diffopts to account for user diffopts
Denis Laxalde <denis@laxalde.org>
parents: 17446
diff changeset
   269
Modify end of plain file, also test that diffopts are accounted for
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   270
17446
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   271
  $ HGUSER="test"
3de04c07966a record: checks for valid username before starting recording process (issue3456)
Sumeet <sumeet@fb.com>
parents: 16913
diff changeset
   272
  $ export HGUSER
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   273
  $ hg commit -i --config diff.showfunc=true -d '8 0' -m end plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   274
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   275
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   276
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   277
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   278
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   279
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   280
  
18266
09a2b6741695 record: use patch.diffopts to account for user diffopts
Denis Laxalde <denis@laxalde.org>
parents: 17446
diff changeset
   281
  @@ -8,3 +8,4 @@ 7
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   282
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   283
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   284
   10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   285
  +11
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   286
  record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   287
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   288
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   289
Modify end of plain file, no EOL
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   290
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   291
  $ hg tip --template '{node}' >> plain
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   292
  $ hg commit -i -d '9 0' -m noeol plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   293
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   294
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   295
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   296
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   297
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   298
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   299
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   300
  @@ -9,3 +9,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   301
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   302
   10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   303
   11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   304
  +7264f99c5f5ff3261504828afa4fb4d406c3af54
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   305
  \ No newline at end of file
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   306
  record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   307
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   308
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   309
Modify end of plain file, add EOL
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   310
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   311
  $ echo >> plain
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   312
  $ echo 1 > plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   313
  $ hg add plain2
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   314
  $ hg commit -i -d '10 0' -m eol plain plain2 <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   315
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   316
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   317
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   318
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   319
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   320
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   321
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   322
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   323
  @@ -9,4 +9,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   324
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   325
   10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   326
   11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   327
  -7264f99c5f5ff3261504828afa4fb4d406c3af54
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   328
  \ No newline at end of file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   329
  +7264f99c5f5ff3261504828afa4fb4d406c3af54
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   330
  record change 1/2 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   331
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   332
  diff --git a/plain2 b/plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   333
  new file mode 100644
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   334
  examine changes to 'plain2'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   335
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   336
Modify beginning, trim end, record both, add another file to test
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   337
changes numbering
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   338
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   339
  $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   340
  $ for i in 2 2 3 4 5 6 7 8 9 10; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   341
  >   echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   342
  > done
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   343
  $ echo 2 >> plain2
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   344
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   345
  $ hg commit -i -d '10 0' -m begin-and-end plain plain2 <<EOF
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   346
  > y
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   347
  > y
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   348
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   349
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   350
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   351
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   352
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   353
  2 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   354
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   355
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   356
  @@ -1,4 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   357
  -1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   358
  +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   359
   2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   360
   3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   361
   4
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   362
  record change 1/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   363
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   364
  @@ -8,5 +8,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   365
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   366
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   367
   10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   368
  -11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   369
  -7264f99c5f5ff3261504828afa4fb4d406c3af54
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   370
  record change 2/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   371
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   372
  diff --git a/plain2 b/plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   373
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   374
  examine changes to 'plain2'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   375
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   376
  @@ -1,1 +1,2 @@
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   377
   1
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   378
  +2
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   379
  record change 3/3 to 'plain2'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   380
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   381
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   382
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   383
  changeset:   11:21df83db12b8
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   384
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   385
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   386
  date:        Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   387
  summary:     begin-and-end
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   388
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   389
  diff -r ddb8b281c3ff -r 21df83db12b8 plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   390
  --- a/plain	Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   391
  +++ b/plain	Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   392
  @@ -1,4 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   393
  -1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   394
  +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   395
   2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   396
   3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   397
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   398
  @@ -8,5 +8,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   399
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   400
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   401
   10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   402
  -11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   403
  -7264f99c5f5ff3261504828afa4fb4d406c3af54
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   404
  diff -r ddb8b281c3ff -r 21df83db12b8 plain2
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   405
  --- a/plain2	Thu Jan 01 00:00:10 1970 +0000
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   406
  +++ b/plain2	Thu Jan 01 00:00:10 1970 +0000
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   407
  @@ -1,1 +1,2 @@
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   408
   1
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   409
  +2
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   410
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   411
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   412
Trim beginning, modify end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   413
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   414
  $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   415
  > for i in 4 5 6 7 8 9 10.new; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   416
  >   echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   417
  > done
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   418
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   419
Record end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   420
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   421
  $ hg commit -i -d '11 0' -m end-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   422
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   423
  > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   424
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   425
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   426
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   427
  2 hunks, 4 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   428
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   429
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   430
  @@ -1,9 +1,6 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   431
  -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   432
  -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   433
  -3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   434
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   435
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   436
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   437
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   438
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   439
   9
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   440
  record change 1/2 to 'plain'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   441
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   442
  @@ -4,7 +1,7 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   443
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   444
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   445
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   446
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   447
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   448
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   449
  -10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   450
  +10.new
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   451
  record change 2/2 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   452
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   453
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   454
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   455
  changeset:   12:99337501826f
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   456
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   457
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   458
  date:        Thu Jan 01 00:00:11 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   459
  summary:     end-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   460
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   461
  diff -r 21df83db12b8 -r 99337501826f plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   462
  --- a/plain	Thu Jan 01 00:00:10 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   463
  +++ b/plain	Thu Jan 01 00:00:11 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   464
  @@ -7,4 +7,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   465
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   466
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   467
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   468
  -10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   469
  +10.new
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   470
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   471
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   472
Record beginning
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   473
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   474
  $ hg commit -i -d '12 0' -m begin-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   475
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   476
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   477
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   478
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   479
  1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   480
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   481
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   482
  @@ -1,6 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   483
  -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   484
  -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   485
  -3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   486
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   487
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   488
   6
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   489
  record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   490
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   491
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   492
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   493
  changeset:   13:bbd45465d540
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   494
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   495
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   496
  date:        Thu Jan 01 00:00:12 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   497
  summary:     begin-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   498
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   499
  diff -r 99337501826f -r bbd45465d540 plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   500
  --- a/plain	Thu Jan 01 00:00:11 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   501
  +++ b/plain	Thu Jan 01 00:00:12 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   502
  @@ -1,6 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   503
  -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   504
  -2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   505
  -3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   506
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   507
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   508
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   509
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   510
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   511
Add to beginning, trim from end
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   512
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   513
  $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   514
  $ for i in 1 2 3 4 5 6 7 8 9; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   515
  >  echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   516
  > done
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   517
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   518
Record end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   519
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   520
  $ hg commit -i --traceback -d '13 0' -m end-again plain<<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   521
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   522
  > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   523
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   524
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   525
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   526
  2 hunks, 4 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   527
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   528
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   529
  @@ -1,6 +1,9 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   530
  +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   531
  +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   532
  +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   533
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   534
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   535
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   536
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   537
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   538
   9
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   539
  record change 1/2 to 'plain'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   540
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   541
  @@ -1,7 +4,6 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   542
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   543
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   544
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   545
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   546
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   547
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   548
  -10.new
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   549
  record change 2/2 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   550
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   551
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   552
Add to beginning, middle, end
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   553
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   554
  $ rm plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   555
  $ for i in 1 2 3 4 5 5.new 5.reallynew 6 7 8 9 10 11; do
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   556
  >   echo $i >> plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   557
  > done
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   558
23435
486a1fe09422 record: don't honor format-changing diffopts (issue4459)
Siddharth Agarwal <sid0@fb.com>
parents: 23172
diff changeset
   559
Record beginning, middle, and test that format-breaking diffopts are ignored
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   560
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   561
  $ hg commit -i --config diff.noprefix=True -d '14 0' -m middle-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   562
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   563
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   564
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   565
  > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   566
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   567
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   568
  3 hunks, 7 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   569
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   570
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   571
  @@ -1,2 +1,5 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   572
  +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   573
  +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   574
  +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   575
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   576
   5
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   577
  record change 1/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   578
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   579
  @@ -1,6 +4,8 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   580
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   581
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   582
  +5.new
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   583
  +5.reallynew
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   584
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   585
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   586
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   587
   9
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   588
  record change 2/3 to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   589
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   590
  @@ -3,4 +8,6 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   591
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   592
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   593
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   594
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   595
  +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   596
  +11
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   597
  record change 3/3 to 'plain'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   598
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   599
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   600
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   601
  changeset:   15:f34a7937ec33
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   602
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   603
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   604
  date:        Thu Jan 01 00:00:14 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   605
  summary:     middle-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   606
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   607
  diff -r 82c065d0b850 -r f34a7937ec33 plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   608
  --- a/plain	Thu Jan 01 00:00:13 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   609
  +++ b/plain	Thu Jan 01 00:00:14 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   610
  @@ -1,5 +1,10 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   611
  +1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   612
  +2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   613
  +3
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   614
   4
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   615
   5
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   616
  +5.new
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   617
  +5.reallynew
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   618
   6
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   619
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   620
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   621
  
5037
b2607267236d Add record extension, giving darcs-like interactive hunk picking
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff changeset
   622
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   623
Record end
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   624
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   625
  $ hg commit -i -d '15 0' -m end-only plain <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   626
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   627
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   628
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   629
  diff --git a/plain b/plain
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   630
  1 hunks, 2 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   631
  examine changes to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   632
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   633
  @@ -9,3 +9,5 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   634
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   635
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   636
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   637
  +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   638
  +11
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   639
  record this change to 'plain'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   640
  
5128
c9126c24e098 record: work properly if invoked in a subdirectory
Bryan O'Sullivan <bos@serpentine.com>
parents: 5037
diff changeset
   641
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   642
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   643
  changeset:   16:f9900b71a04c
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   644
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   645
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   646
  date:        Thu Jan 01 00:00:15 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   647
  summary:     end-only
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   648
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   649
  diff -r f34a7937ec33 -r f9900b71a04c plain
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   650
  --- a/plain	Thu Jan 01 00:00:14 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   651
  +++ b/plain	Thu Jan 01 00:00:15 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   652
  @@ -9,3 +9,5 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   653
   7
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   654
   8
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   655
   9
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   656
  +10
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   657
  +11
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   658
  
5128
c9126c24e098 record: work properly if invoked in a subdirectory
Bryan O'Sullivan <bos@serpentine.com>
parents: 5037
diff changeset
   659
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   660
  $ mkdir subdir
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   661
  $ cd subdir
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   662
  $ echo a > a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   663
  $ hg ci -d '16 0' -Amsubdir
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   664
  adding subdir/a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   665
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   666
  $ echo a >> a
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   667
  $ hg commit -i -d '16 0' -m subdir-change a <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   668
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   669
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   670
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   671
  diff --git a/subdir/a b/subdir/a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   672
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   673
  examine changes to 'subdir/a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   674
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   675
  @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   676
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   677
  +a
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   678
  record this change to 'subdir/a'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   679
  
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   680
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   681
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   682
  changeset:   18:61be427a9deb
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   683
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   684
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   685
  date:        Thu Jan 01 00:00:16 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   686
  summary:     subdir-change
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   687
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   688
  diff -r a7ffae4d61cb -r 61be427a9deb subdir/a
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   689
  --- a/subdir/a	Thu Jan 01 00:00:16 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   690
  +++ b/subdir/a	Thu Jan 01 00:00:16 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   691
  @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   692
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   693
  +a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   694
  
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   695
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   696
  $ echo a > f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   697
  $ echo b > f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   698
  $ hg add f1 f2
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   699
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   700
  $ hg ci -mz -d '17 0'
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   701
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   702
  $ echo a >> f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   703
  $ echo b >> f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   704
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   705
Help, quit
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   706
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   707
  $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   708
  > ?
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   709
  > q
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   710
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   711
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   712
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   713
  examine changes to 'subdir/f1'? [Ynesfdaq?] ?
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   714
  
20266
061766323061 record: use "ui.extractchoices()" to get the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20171
diff changeset
   715
  y - yes, record this change
061766323061 record: use "ui.extractchoices()" to get the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20171
diff changeset
   716
  n - no, skip this change
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
   717
  e - edit this change manually
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   718
  s - skip remaining changes to this file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   719
  f - record remaining changes to this file
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   720
  d - done, skip remaining changes and files
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   721
  a - record all changes to all remaining files
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   722
  q - quit, recording no changes
20266
061766323061 record: use "ui.extractchoices()" to get the list of available responses
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20171
diff changeset
   723
  ? - ? (display help)
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   724
  examine changes to 'subdir/f1'? [Ynesfdaq?] q
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   725
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   726
  abort: user quit
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
   727
  [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   728
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   729
Skip
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   730
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   731
  $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   732
  > s
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   733
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   734
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   735
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   736
  examine changes to 'subdir/f1'? [Ynesfdaq?] s
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   737
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   738
  diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   739
  1 hunks, 1 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
   740
  examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
   741
  [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   742
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   743
No
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   744
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   745
  $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   746
  > n
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   747
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   748
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   749
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   750
  examine changes to 'subdir/f1'? [Ynesfdaq?] n
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   751
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   752
  diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   753
  1 hunks, 1 lines changed
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
   754
  examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
   755
  [255]
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   756
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   757
f, quit
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   758
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   759
  $ hg commit -i <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   760
  > f
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   761
  > q
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   762
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   763
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   764
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   765
  examine changes to 'subdir/f1'? [Ynesfdaq?] f
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   766
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   767
  diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   768
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   769
  examine changes to 'subdir/f2'? [Ynesfdaq?] q
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   770
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   771
  abort: user quit
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
   772
  [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   773
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   774
s, all
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   775
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   776
  $ hg commit -i -d '18 0' -mx <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   777
  > s
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   778
  > a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   779
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   780
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   781
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   782
  examine changes to 'subdir/f1'? [Ynesfdaq?] s
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   783
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   784
  diff --git a/subdir/f2 b/subdir/f2
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   785
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   786
  examine changes to 'subdir/f2'? [Ynesfdaq?] a
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   787
  
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   788
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   789
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   790
  changeset:   20:b3df3dda369a
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   791
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   792
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   793
  date:        Thu Jan 01 00:00:18 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   794
  summary:     x
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   795
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   796
  diff -r 6e02d6c9906d -r b3df3dda369a subdir/f2
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   797
  --- a/subdir/f2	Thu Jan 01 00:00:17 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   798
  +++ b/subdir/f2	Thu Jan 01 00:00:18 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   799
  @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   800
   b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   801
  +b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   802
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   803
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   804
f
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   805
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   806
  $ hg commit -i -d '19 0' -my <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   807
  > f
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   808
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   809
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   810
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   811
  examine changes to 'subdir/f1'? [Ynesfdaq?] f
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   812
  
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   813
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   814
  $ hg tip -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   815
  changeset:   21:38ec577f126b
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   816
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   817
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   818
  date:        Thu Jan 01 00:00:19 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   819
  summary:     y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   820
  
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   821
  diff -r b3df3dda369a -r 38ec577f126b subdir/f1
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   822
  --- a/subdir/f1	Thu Jan 01 00:00:18 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   823
  +++ b/subdir/f1	Thu Jan 01 00:00:19 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   824
  @@ -1,1 +1,2 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   825
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   826
  +a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   827
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   828
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   829
#if execbit
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   830
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   831
Preserve chmod +x
5154
67afecb8d6cc record: improve docs, improve prompts
Bryan O'Sullivan <bos@serpentine.com>
parents: 5128
diff changeset
   832
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   833
  $ chmod +x f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   834
  $ echo a >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   835
  $ hg commit -i -d '20 0' -mz <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   836
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   837
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   838
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   839
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   840
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   841
  old mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   842
  new mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   843
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   844
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   845
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   846
  @@ -1,2 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   847
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   848
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   849
  +a
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   850
  record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   851
  
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
   852
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   853
  $ hg tip --config diff.git=True -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   854
  changeset:   22:3261adceb075
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   855
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   856
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   857
  date:        Thu Jan 01 00:00:20 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   858
  summary:     z
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   859
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   860
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   861
  old mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   862
  new mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   863
  --- a/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   864
  +++ b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   865
  @@ -1,2 +1,3 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   866
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   867
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   868
  +a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   869
  
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
   870
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   871
Preserve execute permission on original
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   872
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   873
  $ echo b >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   874
  $ hg commit -i -d '21 0' -maa <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   875
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   876
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   877
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   878
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   879
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   880
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   881
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   882
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   883
  @@ -1,3 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   884
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   885
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   886
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   887
  +b
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   888
  record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   889
  
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
   890
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   891
  $ hg tip --config diff.git=True -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   892
  changeset:   23:b429867550db
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   893
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   894
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   895
  date:        Thu Jan 01 00:00:21 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   896
  summary:     aa
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   897
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   898
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   899
  --- a/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   900
  +++ b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   901
  @@ -1,3 +1,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   902
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   903
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   904
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   905
  +b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   906
  
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
   907
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   908
Preserve chmod -x
7718
6fa7b6fb90a9 record: do not lose permission changes on commit
Steve Borho <steve@borho.org>
parents: 5154
diff changeset
   909
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   910
  $ chmod -x f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   911
  $ echo c >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   912
  $ hg commit -i -d '22 0' -mab <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   913
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   914
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   915
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   916
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   917
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   918
  old mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   919
  new mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   920
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   921
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   922
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   923
  @@ -2,3 +2,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   924
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   925
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   926
   b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   927
  +c
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   928
  record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
   929
  
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents: 7718
diff changeset
   930
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   931
  $ hg tip --config diff.git=True -p
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
   932
  changeset:   24:0b082130c20a
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   933
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   934
  user:        test
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   935
  date:        Thu Jan 01 00:00:22 1970 +0000
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   936
  summary:     ab
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   937
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   938
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   939
  old mode 100755
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   940
  new mode 100644
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   941
  --- a/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   942
  +++ b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   943
  @@ -2,3 +2,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   944
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   945
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   946
   b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   947
  +c
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   948
  
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
   949
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   950
#else
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   951
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   952
Slightly bogus tests to get almost same repo structure as when x bit is used
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   953
- but with different hashes.
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   954
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   955
Mock "Preserve chmod +x"
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   956
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   957
  $ echo a >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   958
  $ hg commit -i -d '20 0' -mz <<EOF
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   959
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   960
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   961
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   962
  > EOF
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   963
  diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   964
  1 hunks, 1 lines changed
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   965
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   966
  
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   967
  @@ -1,2 +1,3 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   968
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   969
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   970
  +a
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   971
  record this change to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   972
  
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   973
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   974
  $ hg tip --config diff.git=True -p
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   975
  changeset:   22:0d463bd428f5
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   976
  tag:         tip
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   977
  user:        test
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   978
  date:        Thu Jan 01 00:00:20 1970 +0000
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   979
  summary:     z
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   980
  
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   981
  diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   982
  --- a/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   983
  +++ b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   984
  @@ -1,2 +1,3 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   985
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   986
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   987
  +a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   988
  
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   989
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   990
Mock "Preserve execute permission on original"
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   991
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   992
  $ echo b >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
   993
  $ hg commit -i -d '21 0' -maa <<EOF
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   994
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   995
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   996
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   997
  > EOF
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   998
  diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
   999
  1 hunks, 1 lines changed
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1000
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1001
  
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1002
  @@ -1,3 +1,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1003
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1004
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1005
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1006
  +b
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1007
  record this change to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1008
  
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1009
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1010
  $ hg tip --config diff.git=True -p
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1011
  changeset:   23:0eab41a3e524
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1012
  tag:         tip
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1013
  user:        test
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1014
  date:        Thu Jan 01 00:00:21 1970 +0000
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1015
  summary:     aa
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1016
  
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1017
  diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1018
  --- a/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1019
  +++ b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1020
  @@ -1,3 +1,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1021
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1022
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1023
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1024
  +b
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1025
  
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1026
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1027
Mock "Preserve chmod -x"
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1028
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1029
  $ chmod -x f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1030
  $ echo c >> f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1031
  $ hg commit -i -d '22 0' -mab <<EOF
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1032
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1033
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1034
  > y
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1035
  > EOF
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1036
  diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1037
  1 hunks, 1 lines changed
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1038
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1039
  
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1040
  @@ -2,3 +2,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1041
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1042
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1043
   b
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1044
  +c
23054
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1045
  record this change to 'subdir/f1'? [Ynesfdaq?] y
40c01f95449b tests: adjust expected prompt choice outputs in test-record.t for Windows
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
  1046
  
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1047
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1048
  $ hg tip --config diff.git=True -p
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1049
  changeset:   24:f4f718f27b7c
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1050
  tag:         tip
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1051
  user:        test
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1052
  date:        Thu Jan 01 00:00:22 1970 +0000
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1053
  summary:     ab
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1054
  
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1055
  diff --git a/subdir/f1 b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1056
  --- a/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1057
  +++ b/subdir/f1
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1058
  @@ -2,3 +2,4 @@
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1059
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1060
   a
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1061
   b
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1062
  +c
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1063
  
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1064
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1065
#endif
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1066
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1067
  $ cd ..
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1068
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1069
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1070
Abort early when a merge is in progress
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1071
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1072
  $ hg up 4
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
  1073
  1 files updated, 0 files merged, 6 files removed, 0 files unresolved
11237
feb2a58fc592 record: check that we are not committing a merge before patch selection
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8811
diff changeset
  1074
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1075
  $ touch iwillmergethat
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1076
  $ hg add iwillmergethat
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1077
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1078
  $ hg branch thatbranch
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1079
  marked working directory as branch thatbranch
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 13295
diff changeset
  1080
  (branches are permanent and global, did you want a bookmark?)
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1081
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1082
  $ hg ci -m'new head'
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1083
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1084
  $ hg up default
13292
d32e09769048 test-record: test peculiar changes numbering
Patrick Mezard <pmezard@gmail.com>
parents: 13023
diff changeset
  1085
  6 files updated, 0 files merged, 2 files removed, 0 files unresolved
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1086
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1087
  $ hg merge thatbranch
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1088
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1089
  (branch merge, don't forget to commit)
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1090
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1091
  $ hg commit -i -m'will abort'
13023
3e2281b85990 record: quote command in use hg commit message
timeless <timeless@gmail.com>
parents: 12843
diff changeset
  1092
  abort: cannot partially commit a merge (use "hg commit" instead)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12074
diff changeset
  1093
  [255]
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1094
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1095
  $ hg up -C
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1096
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1097
18954
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
  1098
Editing patch (and ignoring trailing text)
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1099
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16899
diff changeset
  1100
  $ cat > editor.sh << '__EOF__'
19080
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
  1101
  > sed -e 7d -e '5s/^-/ /' -e '/^# ---/i\
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
  1102
  > trailing\nditto' "$1" > tmp
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
  1103
  > mv tmp "$1"
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1104
  > __EOF__
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1105
  $ cat > editedfile << '__EOF__'
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1106
  > This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1107
  > This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1108
  > This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1109
  > __EOF__
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1110
  $ hg add editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1111
  $ hg commit -medit-patch-1
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1112
  $ cat > editedfile << '__EOF__'
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1113
  > This line has changed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1114
  > This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1115
  > This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1116
  > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1117
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i -d '23 0' -medit-patch-2 <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1118
  > y
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1119
  > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1120
  > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1121
  diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1122
  1 hunks, 2 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1123
  examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1124
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1125
  @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1126
  -This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1127
  -This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1128
  +This line has changed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1129
  +This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1130
   This is the third line
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1131
  record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1132
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1133
  $ cat editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1134
  This line has changed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1135
  This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1136
  This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1137
  $ hg cat -r tip editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1138
  This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1139
  This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1140
  This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1141
  $ hg revert editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1142
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1143
Trying to edit patch for whole file
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1144
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1145
  $ echo "This is the fourth line" >> editedfile
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1146
  $ hg commit -i <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1147
  > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1148
  > q
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1149
  > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1150
  diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1151
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1152
  examine changes to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1153
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1154
  cannot edit patch for whole file
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1155
  examine changes to 'editedfile'? [Ynesfdaq?] q
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1156
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1157
  abort: user quit
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1158
  [255]
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1159
  $ hg revert editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1160
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1161
Removing changes from patch
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1162
16338
118eb4575ea2 tests: fix one more sed -i
Matt Mackall <mpm@selenic.com>
parents: 16332
diff changeset
  1163
  $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
118eb4575ea2 tests: fix one more sed -i
Matt Mackall <mpm@selenic.com>
parents: 16332
diff changeset
  1164
  $ mv tmp editedfile
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1165
  $ echo "This line has been added" >> editedfile
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16899
diff changeset
  1166
  $ cat > editor.sh << '__EOF__'
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
  1167
  > sed -e 's/^[-+]/ /' "$1" > tmp
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
  1168
  > mv tmp "$1"
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1169
  > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1170
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1171
  > y
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1172
  > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1173
  > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1174
  diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1175
  1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1176
  examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1177
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1178
  @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1179
  -This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1180
  -This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1181
  -This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1182
  +This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1183
  +This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1184
  +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1185
  record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1186
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1187
  no changes to record
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1188
  $ cat editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1189
  This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1190
  This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1191
  This line has been added
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1192
  $ hg cat -r tip editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1193
  This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1194
  This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1195
  This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1196
  $ hg revert editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1197
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1198
Invalid patch
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1199
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
  1200
  $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
  1201
  $ mv tmp editedfile
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1202
  $ echo "This line has been added" >> editedfile
16901
5b89700cce30 tests: consistently use a HGEDITOR pattern that works with msys on windows
Mads Kiilerich <mads@kiilerich.com>
parents: 16899
diff changeset
  1203
  $ cat > editor.sh << '__EOF__'
16332
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
  1204
  > sed s/This/That/ "$1" > tmp
42e95631887d tests: remove sed -i from test-record
Matt Mackall <mpm@selenic.com>
parents: 16328
diff changeset
  1205
  > mv tmp "$1"
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1206
  > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1207
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1208
  > y
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1209
  > e
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1210
  > EOF
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1211
  diff --git a/editedfile b/editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1212
  1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1213
  examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1214
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1215
  @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1216
  -This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1217
  -This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1218
  -This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1219
  +This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1220
  +This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1221
  +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1222
  record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1223
  
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1224
  patching file editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1225
  Hunk #1 FAILED at 0
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1226
  1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1227
  abort: patch failed to apply
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1228
  [255]
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1229
  $ cat editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1230
  This change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1231
  This is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1232
  This line has been added
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1233
  $ hg cat -r tip editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1234
  This is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1235
  This change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1236
  This is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1237
  $ cat editedfile.rej
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1238
  --- editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1239
  +++ editedfile
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1240
  @@ -1,3 +1,3 @@
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1241
  -That is the first line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1242
  -That change will be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1243
  -That is the third line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1244
  +That change will not be committed
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1245
  +That is the second line
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1246
  +That line has been added
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1247
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1248
Malformed patch - error handling
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1249
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1250
  $ cat > editor.sh << '__EOF__'
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1251
  > sed -e '/^@/p' "$1" > tmp
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1252
  > mv tmp "$1"
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1253
  > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1254
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1255
  > y
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1256
  > e
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1257
  > EOF
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1258
  diff --git a/editedfile b/editedfile
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1259
  1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1260
  examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1261
  
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1262
  @@ -1,3 +1,3 @@
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1263
  -This is the first line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1264
  -This change will be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1265
  -This is the third line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1266
  +This change will not be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1267
  +This is the second line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1268
  +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1269
  record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1270
  
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1271
  abort: error parsing patch: unhandled transition: range -> range
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1272
  [255]
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1273
18954
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
  1274
random text in random positions is still an error
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
  1275
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1276
  $ cat > editor.sh << '__EOF__'
19080
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
  1277
  > sed -e '/^@/i\
5e4491c114b2 check-code: add a rule against a GNU sed-ism
Kevin Bullock <kbullock@ringworld.org>
parents: 18954
diff changeset
  1278
  > other' "$1" > tmp
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1279
  > mv tmp "$1"
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1280
  > __EOF__
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1281
  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit -i <<EOF
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1282
  > y
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1283
  > e
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1284
  > EOF
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1285
  diff --git a/editedfile b/editedfile
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1286
  1 hunks, 3 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1287
  examine changes to 'editedfile'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1288
  
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1289
  @@ -1,3 +1,3 @@
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1290
  -This is the first line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1291
  -This change will be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1292
  -This is the third line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1293
  +This change will not be committed
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1294
  +This is the second line
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1295
  +This line has been added
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1296
  record this change to 'editedfile'? [Ynesfdaq?] e
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1297
  
18954
b1639e98e8a1 record: ignore trailing content when parsing patches - introduce 'other' lines
Mads Kiilerich <mads@kiilerich.com>
parents: 18953
diff changeset
  1298
  abort: error parsing patch: unhandled transition: file -> other
18953
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1299
  [255]
e4ae397595e8 record: abort on malformed patches instead of crashing
Mads Kiilerich <madski@unity3d.com>
parents: 18266
diff changeset
  1300
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1301
  $ hg up -C
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1302
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1303
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1304
With win32text
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1305
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1306
  $ echo '[extensions]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1307
  $ echo 'win32text = ' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1308
  $ echo '[decode]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1309
  $ echo '** = cleverdecode:' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1310
  $ echo '[encode]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1311
  $ echo '** = cleverencode:' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1312
  $ echo '[patch]' >> .hg/hgrc
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1313
  $ echo 'eol = crlf' >> .hg/hgrc
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents: 7718
diff changeset
  1314
12843
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
  1315
Ignore win32text deprecation warning for now:
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
  1316
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
  1317
  $ echo '[win32text]' >> .hg/hgrc
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
  1318
  $ echo 'warn = no' >> .hg/hgrc
8aeb6184b008 tests: test/silence win32text deprecation warning
Martin Geisler <mg@lazybytes.net>
parents: 12328
diff changeset
  1319
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1320
  $ echo d >> subdir/f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1321
  $ hg commit -i -d '24 0' -mw1 <<EOF
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1322
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1323
  > y
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1324
  > EOF
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1325
  diff --git a/subdir/f1 b/subdir/f1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1326
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1327
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1328
  
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1329
  @@ -3,3 +3,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1330
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1331
   b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1332
   c
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1333
  +d
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1334
  record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1335
  
8811
8b35b08724eb Make mq, record and transplant honor patch.eol
Patrick Mezard <pmezard@gmail.com>
parents: 7718
diff changeset
  1336
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1337
  $ hg tip -p
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1338
  changeset:   28:* (glob)
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1339
  tag:         tip
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1340
  user:        test
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1341
  date:        Thu Jan 01 00:00:24 1970 +0000
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1342
  summary:     w1
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1343
  
16899
8149ff405c78 tests: convert some 'hghave execbit' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 16338
diff changeset
  1344
  diff -r ???????????? -r ???????????? subdir/f1 (glob)
16324
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1345
  --- a/subdir/f1	Thu Jan 01 00:00:23 1970 +0000
46b991a1f428 record: allow splitting of hunks by manually editing patches
A. S. Budden <abudden@gmail.com>
parents: 15623
diff changeset
  1346
  +++ b/subdir/f1	Thu Jan 01 00:00:24 1970 +0000
12074
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1347
  @@ -3,3 +3,4 @@
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1348
   a
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1349
   b
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1350
   c
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1351
  +d
35c143e85b1b tests: unify test-record
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11238
diff changeset
  1352
  
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
  1353
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
  1354
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1355
Test --user when ui.username not set
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1356
  $ unset HGUSER
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1357
  $ echo e >> subdir/f1
24279
7cf9a9e0cf89 record: add new tests for commit interactive (same tests as record)
Laurent Charignon <lcharignon@fb.com>
parents: 24235
diff changeset
  1358
  $ hg commit -i  --config ui.username= -d '8 0' --user xyz -m "user flag" <<EOF
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1359
  > y
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1360
  > y
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1361
  > EOF
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1362
  diff --git a/subdir/f1 b/subdir/f1
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1363
  1 hunks, 1 lines changed
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1364
  examine changes to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1365
  
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1366
  @@ -4,3 +4,4 @@
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1367
   b
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1368
   c
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1369
   d
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1370
  +e
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1371
  record this change to 'subdir/f1'? [Ynesfdaq?] y
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 20580
diff changeset
  1372
  
20171
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1373
  $ hg log --template '{author}\n' -l 1
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1374
  xyz
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1375
  $ HGUSER="test"
a765611e06dc record: --user/-u now works with record when ui.username not set (issue3857)
Prasoon Shukla <prasoon92.iitr@gmail.com>
parents: 19080
diff changeset
  1376
  $ export HGUSER
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16901
diff changeset
  1377
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
  1378
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1379
Moving files
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
  1380
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1381
  $ hg update -C .
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1382
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1383
  $ hg mv plain plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1384
  $ echo somechange >> plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1385
  $ hg commit -i -d '23 0' -mmoving_files << EOF
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
  1386
  > y
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1387
  > y
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
  1388
  > EOF
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1389
  diff --git a/plain b/plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1390
  rename from plain
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1391
  rename to plain3
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1392
  1 hunks, 1 lines changed
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1393
  examine changes to 'plain' and 'plain3'? [Ynesfdaq?] y
24235
79fceed67676 record: allow editing new files (issue4304)
Laurent Charignon <lcharignon@fb.com>
parents: 23435
diff changeset
  1394
  
24837
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1395
  @@ -11,3 +11,4 @@
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1396
   9
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1397
   10
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1398
   11
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1399
  +somechange
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1400
  record this change to 'plain3'? [Ynesfdaq?] y
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1401
  
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1402
  $ hg tip
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1403
  changeset:   30:542e1f362a22
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1404
  tag:         tip
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1405
  user:        test
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1406
  date:        Thu Jan 01 00:00:23 1970 +0000
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1407
  summary:     moving_files
edf907bd8144 record: fix record with change on moved file crashes (issue4619)
Laurent Charignon <lcharignon@fb.com>
parents: 24279
diff changeset
  1408
  
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16901
diff changeset
  1409
  $ cd ..