tests/test-qrecord.t
author Idan Kamara <idankk86@gmail.com>
Tue, 24 May 2011 19:17:02 +0300
changeset 14424 4eb88d296f63
parent 14415 c238b12a1ed4
child 14448 7d367e8f892d
permissions -rw-r--r--
record: check patch name is valid before prompting in qrecord
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
     1
Create configuration
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
     2
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
     3
  $ echo "[ui]" >> $HGRCPATH
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
     4
  $ echo "interactive=true" >> $HGRCPATH
13935
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
     5
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
     6
help record (no record)
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
     7
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
     8
  $ hg help record
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
     9
  record extension - commands to interactively select changes for commit/qrefresh
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    10
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    11
  use "hg help extensions" for information on enabling extensions
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    12
13936
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    13
help qrecord (no record)
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    14
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    15
  $ hg help qrecord
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    16
  'qrecord' is provided by the following extension:
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    17
  
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    18
      record  commands to interactively select changes for commit/qrefresh
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    19
  
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    20
  use "hg help extensions" for information on enabling extensions
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    21
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
    22
  $ echo "[extensions]"     >> $HGRCPATH
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
    23
  $ echo "record="          >> $HGRCPATH
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
    24
13935
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    25
help record (record)
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    26
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    27
  $ hg help record
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    28
  hg record [OPTION]... [FILE]...
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    29
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    30
  interactively select changes to commit
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    31
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    32
      If a list of files is omitted, all changes reported by "hg status" will be
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    33
      candidates for recording.
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    34
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    35
      See "hg help dates" for a list of formats valid for -d/--date.
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    36
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    37
      You will be prompted for whether to record changes to each modified file,
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    38
      and for files with multiple changes, for each change to use. For each
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    39
      query, the following responses are possible:
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    40
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    41
        y - record this change
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    42
        n - skip this change
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    43
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    44
        s - skip remaining changes to this file
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    45
        f - record remaining changes to this file
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    46
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    47
        d - done, skip remaining changes and files
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    48
        a - record all changes to all remaining files
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    49
        q - quit, recording no changes
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    50
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    51
        ? - display help
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    52
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    53
      This command is not available when committing a merge.
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    54
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    55
  options:
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    56
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    57
   -A --addremove            mark new/missing files as added/removed before
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    58
                             committing
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    59
      --close-branch         mark a branch as closed, hiding it from the branch
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    60
                             list
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    61
   -I --include PATTERN [+]  include names matching the given patterns
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    62
   -X --exclude PATTERN [+]  exclude names matching the given patterns
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    63
   -m --message TEXT         use text as commit message
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    64
   -l --logfile FILE         read commit message from file
14016
bd738875943a merge with stable
Martin Geisler <mg@aragost.com>
parents: 13950
diff changeset
    65
   -d --date DATE            record the specified date as commit date
13935
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    66
   -u --user USER            record the specified user as committer
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    67
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    68
  [+] marked option can be specified multiple times
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    69
  
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    70
  use "hg -v help record" to show global options
6e6d19738df9 record: improve help test coverage
timeless <timeless@mozdev.org>
parents: 13295
diff changeset
    71
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
    72
help (no mq, so no qrecord)
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
    73
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
    74
  $ hg help qrecord
13936
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    75
  hg qrecord [OPTION]... PATCH [FILE]...
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
    76
  
13936
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    77
  interactively record a new patch
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    78
  
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    79
      See "hg help qnew" & "hg help record" for more information and usage.
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
    80
  
13936
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    81
  use "hg -v help qrecord" to show global options
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    82
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    83
  $ hg init a
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    84
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    85
qrecord (mq not present)
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    86
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    87
  $ hg -R a qrecord
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    88
  hg qrecord: invalid arguments
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    89
  hg qrecord [OPTION]... PATCH [FILE]...
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
    90
  
13936
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    91
  interactively record a new patch
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    92
  
13950
14d0553bd48b help: do not show full help text for command on option errors
Adrian Buehlmann <adrian@cadifra.com>
parents: 13936
diff changeset
    93
  use "hg help qrecord" to show the full help text
13936
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    94
  [255]
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    95
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    96
qrecord patch (mq not present)
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    97
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    98
  $ hg -R a qrecord patch
f4e4faa92939 qrecord: provide help when mq is not enabled
timeless <timeless@mozdev.org>
parents: 13935
diff changeset
    99
  abort: 'mq' extension not loaded
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12075
diff changeset
   100
  [255]
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   101
14415
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   102
help (bad mq)
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   103
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   104
  $ echo "mq=nonexistant" >> $HGRCPATH
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   105
  $ hg help qrecord
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   106
  *** failed to import extension mq from nonexistant: [Errno 2] No such file or directory
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   107
  hg qrecord [OPTION]... PATCH [FILE]...
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   108
  
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   109
  interactively record a new patch
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   110
  
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   111
      See "hg help qnew" & "hg help record" for more information and usage.
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   112
  
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   113
  use "hg -v help qrecord" to show global options
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   114
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   115
help (mq present)
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   116
14415
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   117
  $ sed 's/mq=nonexistant/mq=/' $HGRCPATH > hgrc.tmp
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   118
  $ mv hgrc.tmp $HGRCPATH
c238b12a1ed4 extensions: raise when trying to find an extension that failed to load
Idan Kamara <idankk86@gmail.com>
parents: 14016
diff changeset
   119
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   120
  $ hg help qrecord
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   121
  hg qrecord [OPTION]... PATCH [FILE]...
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   122
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   123
  interactively record a new patch
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   124
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   125
      See "hg help qnew" & "hg help record" for more information and usage.
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   126
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   127
  options:
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   128
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   129
   -e --edit                 edit commit message
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   130
   -g --git                  use git extended diff format
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   131
   -U --currentuser          add "From: <current user>" to patch
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   132
   -u --user USER            add "From: <USER>" to patch
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   133
   -D --currentdate          add "Date: <current date>" to patch
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   134
   -d --date DATE            add "Date: <DATE>" to patch
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   135
   -I --include PATTERN [+]  include names matching the given patterns
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   136
   -X --exclude PATTERN [+]  exclude names matching the given patterns
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   137
   -m --message TEXT         use text as commit message
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   138
   -l --logfile FILE         read commit message from file
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   139
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   140
  [+] marked option can be specified multiple times
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   141
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   142
  use "hg -v help qrecord" to show global options
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   143
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   144
  $ cd a
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   145
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   146
Base commit
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   147
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   148
  $ cat > 1.txt <<EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   149
  > 1
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   150
  > 2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   151
  > 3
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   152
  > 4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   153
  > 5
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   154
  > EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   155
  $ cat > 2.txt <<EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   156
  > a
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   157
  > b
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   158
  > c
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   159
  > d
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   160
  > e
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   161
  > f
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   162
  > EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   163
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   164
  $ mkdir dir
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   165
  $ cat > dir/a.txt <<EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   166
  > hello world
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   167
  > 
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   168
  > someone
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   169
  > up
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   170
  > there
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   171
  > loves
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   172
  > me
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   173
  > EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   174
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   175
  $ hg add 1.txt 2.txt dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   176
  $ hg commit -m 'initial checkin'
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   177
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   178
Changing files
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   179
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   180
  $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   181
  $ sed -e 's/b/b b/' 2.txt > 2.txt.new
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   182
  $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   183
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   184
  $ mv -f 1.txt.new 1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   185
  $ mv -f 2.txt.new 2.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   186
  $ mv -f dir/a.txt.new dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   187
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   188
Whole diff
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   189
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   190
  $ hg diff --nodates
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   191
  diff -r 1057167b20ef 1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   192
  --- a/1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   193
  +++ b/1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   194
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   195
   1
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   196
  -2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   197
  +2 2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   198
   3
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   199
  -4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   200
  +4 4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   201
   5
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   202
  diff -r 1057167b20ef 2.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   203
  --- a/2.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   204
  +++ b/2.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   205
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   206
   a
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   207
  -b
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   208
  +b b
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   209
   c
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   210
   d
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   211
   e
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   212
  diff -r 1057167b20ef dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   213
  --- a/dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   214
  +++ b/dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   215
  @@ -1,4 +1,4 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   216
  -hello world
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   217
  +hello world!
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   218
   
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   219
   someone
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   220
   up
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   221
14424
4eb88d296f63 record: check patch name is valid before prompting in qrecord
Idan Kamara <idankk86@gmail.com>
parents: 14415
diff changeset
   222
qrecord with bad patch name, should abort before prompting
4eb88d296f63 record: check patch name is valid before prompting in qrecord
Idan Kamara <idankk86@gmail.com>
parents: 14415
diff changeset
   223
4eb88d296f63 record: check patch name is valid before prompting in qrecord
Idan Kamara <idankk86@gmail.com>
parents: 14415
diff changeset
   224
  $ hg qrecord .hg
4eb88d296f63 record: check patch name is valid before prompting in qrecord
Idan Kamara <idankk86@gmail.com>
parents: 14415
diff changeset
   225
  abort: patch name cannot begin with ".hg"
4eb88d296f63 record: check patch name is valid before prompting in qrecord
Idan Kamara <idankk86@gmail.com>
parents: 14415
diff changeset
   226
  [255]
4eb88d296f63 record: check patch name is valid before prompting in qrecord
Idan Kamara <idankk86@gmail.com>
parents: 14415
diff changeset
   227
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   228
qrecord a.patch
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   229
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   230
  $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   231
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   232
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   233
  > n
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   234
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   235
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   236
  > n
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   237
  > EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   238
  diff --git a/1.txt b/1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   239
  2 hunks, 2 lines changed
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   240
  examine changes to '1.txt'? [Ynsfdaq?] 
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   241
  @@ -1,3 +1,3 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   242
   1
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   243
  -2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   244
  +2 2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   245
   3
13295
fb446228c0d4 record: do not include files into changes count
Patrick Mezard <pmezard@gmail.com>
parents: 12934
diff changeset
   246
  record change 1/4 to '1.txt'? [Ynsfdaq?] 
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   247
  @@ -3,3 +3,3 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   248
   3
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   249
  -4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   250
  +4 4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   251
   5
13295
fb446228c0d4 record: do not include files into changes count
Patrick Mezard <pmezard@gmail.com>
parents: 12934
diff changeset
   252
  record change 2/4 to '1.txt'? [Ynsfdaq?] 
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   253
  diff --git a/2.txt b/2.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   254
  1 hunks, 1 lines changed
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   255
  examine changes to '2.txt'? [Ynsfdaq?] 
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   256
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   257
   a
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   258
  -b
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   259
  +b b
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   260
   c
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   261
   d
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   262
   e
13295
fb446228c0d4 record: do not include files into changes count
Patrick Mezard <pmezard@gmail.com>
parents: 12934
diff changeset
   263
  record change 3/4 to '2.txt'? [Ynsfdaq?] 
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   264
  diff --git a/dir/a.txt b/dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   265
  1 hunks, 1 lines changed
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   266
  examine changes to 'dir/a.txt'? [Ynsfdaq?] 
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   267
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   268
After qrecord a.patch 'tip'"
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   269
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   270
  $ hg tip -p
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   271
  changeset:   1:5d1ca63427ee
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   272
  tag:         a.patch
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   273
  tag:         qbase
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   274
  tag:         qtip
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   275
  tag:         tip
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   276
  user:        test
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   277
  date:        Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   278
  summary:     aaa
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   279
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   280
  diff -r 1057167b20ef -r 5d1ca63427ee 1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   281
  --- a/1.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   282
  +++ b/1.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   283
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   284
   1
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   285
  -2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   286
  +2 2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   287
   3
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   288
   4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   289
   5
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   290
  diff -r 1057167b20ef -r 5d1ca63427ee 2.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   291
  --- a/2.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   292
  +++ b/2.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   293
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   294
   a
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   295
  -b
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   296
  +b b
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   297
   c
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   298
   d
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   299
   e
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   300
  
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   301
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   302
After qrecord a.patch 'diff'"
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   303
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   304
  $ hg diff --nodates
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   305
  diff -r 5d1ca63427ee 1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   306
  --- a/1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   307
  +++ b/1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   308
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   309
   1
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   310
   2 2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   311
   3
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   312
  -4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   313
  +4 4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   314
   5
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   315
  diff -r 5d1ca63427ee dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   316
  --- a/dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   317
  +++ b/dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   318
  @@ -1,4 +1,4 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   319
  -hello world
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   320
  +hello world!
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   321
   
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   322
   someone
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   323
   up
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   324
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   325
qrecord b.patch
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   326
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   327
  $ hg qrecord -d '0 0' -m bbb b.patch <<EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   328
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   329
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   330
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   331
  > y
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   332
  > EOF
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   333
  diff --git a/1.txt b/1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   334
  1 hunks, 1 lines changed
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   335
  examine changes to '1.txt'? [Ynsfdaq?] 
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   336
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   337
   1
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   338
   2 2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   339
   3
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   340
  -4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   341
  +4 4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   342
   5
13295
fb446228c0d4 record: do not include files into changes count
Patrick Mezard <pmezard@gmail.com>
parents: 12934
diff changeset
   343
  record change 1/2 to '1.txt'? [Ynsfdaq?] 
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   344
  diff --git a/dir/a.txt b/dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   345
  1 hunks, 1 lines changed
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   346
  examine changes to 'dir/a.txt'? [Ynsfdaq?] 
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   347
  @@ -1,4 +1,4 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   348
  -hello world
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   349
  +hello world!
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   350
   
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   351
   someone
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   352
   up
13295
fb446228c0d4 record: do not include files into changes count
Patrick Mezard <pmezard@gmail.com>
parents: 12934
diff changeset
   353
  record change 2/2 to 'dir/a.txt'? [Ynsfdaq?] 
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   354
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   355
After qrecord b.patch 'tip'
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   356
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   357
  $ hg tip -p
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   358
  changeset:   2:b056198bf878
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   359
  tag:         b.patch
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   360
  tag:         qtip
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   361
  tag:         tip
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   362
  user:        test
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   363
  date:        Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   364
  summary:     bbb
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   365
  
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   366
  diff -r 5d1ca63427ee -r b056198bf878 1.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   367
  --- a/1.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   368
  +++ b/1.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   369
  @@ -1,5 +1,5 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   370
   1
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   371
   2 2
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   372
   3
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   373
  -4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   374
  +4 4
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   375
   5
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   376
  diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   377
  --- a/dir/a.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   378
  +++ b/dir/a.txt	Thu Jan 01 00:00:00 1970 +0000
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   379
  @@ -1,4 +1,4 @@
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   380
  -hello world
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   381
  +hello world!
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   382
   
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   383
   someone
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   384
   up
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   385
  
5933
28a79c259fcf qrecord: add tests
Kirill Smelkov <kirr@mns.spb.ru>
parents:
diff changeset
   386
12075
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   387
After qrecord b.patch 'diff'
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   388
f585c9bb85c1 tests: unify test-qrecord
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 8167
diff changeset
   389
  $ hg diff --nodates