tests/test-mq-qrefresh-interactive.t
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 27 Feb 2018 14:42:30 +0530
changeset 36457 0e8b76644e20
parent 30152 d65e246100ed
child 42566 f802a75da585
permissions -rw-r--r--
py3: convert os.devnull to bytes using pycompat.bytestr os.devnull returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D2477
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     1
Create configuration
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     3
  $ echo "[ui]" >> $HGRCPATH
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     4
  $ echo "interactive=true" >> $HGRCPATH
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     5
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     6
help qrefresh (no record)
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     7
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     8
  $ echo "[extensions]" >> $HGRCPATH
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     9
  $ echo "mq=" >> $HGRCPATH
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    10
  $ hg help qrefresh
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    11
  hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    12
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    13
  update the current patch
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    14
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    15
      If any file patterns are provided, the refreshed patch will contain only
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    16
      the modifications that match those patterns; the remaining modifications
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    17
      will remain in the working directory.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    18
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    19
      If -s/--short is specified, files currently included in the patch will be
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    20
      refreshed just like matched files and remain in the patch.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    21
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    22
      If -e/--edit is specified, Mercurial will start your configured editor for
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    23
      you to enter a message. In case qrefresh fails, you will find a backup of
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    24
      your message in ".hg/last-message.txt".
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    25
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    26
      hg add/remove/copy/rename work as usual, though you might want to use git-
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    27
      style patches (-g/--git or [diff] git=1) to track copies and renames. See
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    28
      the diffs help topic for more information on the git diff format.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    29
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    30
      Returns 0 on success.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    31
  
22117
c1d93edcf004 help: fold repeatable option message into option table header
Matt Mackall <mpm@selenic.com>
parents: 22110
diff changeset
    32
  options ([+] can be repeated):
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    33
  
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    34
   -e --edit                invoke editor on commit messages
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    35
   -g --git                 use git extended diff format
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    36
   -s --short               refresh only files already in the patch and
15145
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    37
                            specified files
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    38
   -U --currentuser         add/update author field in patch with current user
15145
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    39
   -u --user USER           add/update author field in patch with given user
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    40
   -D --currentdate         add/update date field in patch with current date
15145
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    41
   -d --date DATE           add/update date field in patch with given date
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    42
   -I --include PATTERN [+] include names matching the given patterns
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    43
   -X --exclude PATTERN [+] exclude names matching the given patterns
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    44
   -m --message TEXT        use text as commit message
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    45
   -l --logfile FILE        read commit message from file
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    46
  
22110
26f7c8033bed help: tweak --verbose command help hint
Matt Mackall <mpm@selenic.com>
parents: 21952
diff changeset
    47
  (some details hidden, use --verbose to show complete help)
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    48
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    49
help qrefresh (record)
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    50
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    51
  $ echo "record=" >> $HGRCPATH
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    52
  $ hg help qrefresh
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    53
  hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    54
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    55
  update the current patch
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    56
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    57
      If any file patterns are provided, the refreshed patch will contain only
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    58
      the modifications that match those patterns; the remaining modifications
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    59
      will remain in the working directory.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    60
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    61
      If -s/--short is specified, files currently included in the patch will be
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    62
      refreshed just like matched files and remain in the patch.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    63
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    64
      If -e/--edit is specified, Mercurial will start your configured editor for
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    65
      you to enter a message. In case qrefresh fails, you will find a backup of
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    66
      your message in ".hg/last-message.txt".
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    67
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    68
      hg add/remove/copy/rename work as usual, though you might want to use git-
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    69
      style patches (-g/--git or [diff] git=1) to track copies and renames. See
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    70
      the diffs help topic for more information on the git diff format.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    71
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    72
      Returns 0 on success.
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    73
  
22117
c1d93edcf004 help: fold repeatable option message into option table header
Matt Mackall <mpm@selenic.com>
parents: 22110
diff changeset
    74
  options ([+] can be repeated):
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    75
  
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    76
   -e --edit                invoke editor on commit messages
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    77
   -g --git                 use git extended diff format
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    78
   -s --short               refresh only files already in the patch and
15145
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    79
                            specified files
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    80
   -U --currentuser         add/update author field in patch with current user
15145
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    81
   -u --user USER           add/update author field in patch with given user
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    82
   -D --currentdate         add/update date field in patch with current date
15145
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    83
   -d --date DATE           add/update date field in patch with given date
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    84
   -I --include PATTERN [+] include names matching the given patterns
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    85
   -X --exclude PATTERN [+] exclude names matching the given patterns
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    86
   -m --message TEXT        use text as commit message
ff26712a0c50 help: use RST to format option lists
Matt Mackall <mpm@selenic.com>
parents: 14426
diff changeset
    87
   -l --logfile FILE        read commit message from file
30152
d65e246100ed help: backout f3c4edfd35e1 (mark boolean flags with [no-] in help) for now
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30024
diff changeset
    88
   -i --interactive         interactively select changes to refresh
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    89
  
22110
26f7c8033bed help: tweak --verbose command help hint
Matt Mackall <mpm@selenic.com>
parents: 21952
diff changeset
    90
  (some details hidden, use --verbose to show complete help)
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    91
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    92
  $ hg init a
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    93
  $ cd a
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    94
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    95
Base commit
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    96
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    97
  $ cat > 1.txt <<EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    98
  > 1
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    99
  > 2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   100
  > 3
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   101
  > 4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   102
  > 5
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   103
  > EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   104
  $ cat > 2.txt <<EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   105
  > a
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   106
  > b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   107
  > c
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   108
  > d
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   109
  > e
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   110
  > f
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   111
  > EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   112
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   113
  $ mkdir dir
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   114
  $ cat > dir/a.txt <<EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   115
  > hello world
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   116
  > 
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   117
  > someone
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   118
  > up
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   119
  > there
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   120
  > loves
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   121
  > me
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   122
  > EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   123
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   124
  $ hg add 1.txt 2.txt dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   125
  $ hg commit -m aaa
25797
cc9fb45986d4 record: omit meaningless 'qnew' suggestion at 'hg qnew -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   126
  $ hg qrecord --config ui.interactive=false patch
cc9fb45986d4 record: omit meaningless 'qnew' suggestion at 'hg qnew -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   127
  abort: running non-interactively, use qnew instead
cc9fb45986d4 record: omit meaningless 'qnew' suggestion at 'hg qnew -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   128
  [255]
cc9fb45986d4 record: omit meaningless 'qnew' suggestion at 'hg qnew -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   129
  $ hg qnew -i --config ui.interactive=false patch
cc9fb45986d4 record: omit meaningless 'qnew' suggestion at 'hg qnew -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   130
  abort: running non-interactively
cc9fb45986d4 record: omit meaningless 'qnew' suggestion at 'hg qnew -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22589
diff changeset
   131
  [255]
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   132
  $ hg qnew -d '0 0' patch
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   133
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   134
Changing files
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   135
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   136
  $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   137
  $ sed -e 's/b/b b/' 2.txt > 2.txt.new
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   138
  $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   139
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   140
  $ mv -f 1.txt.new 1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   141
  $ mv -f 2.txt.new 2.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   142
  $ mv -f dir/a.txt.new dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   143
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   144
Whole diff
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   145
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   146
  $ hg diff --nodates
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   147
  diff -r ed27675cb5df 1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   148
  --- a/1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   149
  +++ b/1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   150
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   151
   1
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   152
  -2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   153
  +2 2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   154
   3
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   155
  -4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   156
  +4 4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   157
   5
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   158
  diff -r ed27675cb5df 2.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   159
  --- a/2.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   160
  +++ b/2.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   161
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   162
   a
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   163
  -b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   164
  +b b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   165
   c
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   166
   d
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   167
   e
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   168
  diff -r ed27675cb5df dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   169
  --- a/dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   170
  +++ b/dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   171
  @@ -1,4 +1,4 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   172
  -hello world
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   173
  +hello world!
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   174
   
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   175
   someone
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   176
   up
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   177
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   178
partial qrefresh
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   179
25798
08f2177b15c7 record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25797
diff changeset
   180
  $ hg qrefresh -i --config ui.interactive=false
08f2177b15c7 record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25797
diff changeset
   181
  abort: running non-interactively
08f2177b15c7 record: omit meaningless 'qrefresh' suggestion at 'hg qrefresh -i'
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25797
diff changeset
   182
  [255]
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   183
  $ hg qrefresh -i -d '0 0' <<EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   184
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   185
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   186
  > n
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   187
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   188
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   189
  > n
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   190
  > EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   191
  diff --git a/1.txt b/1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   192
  2 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: 22117
diff changeset
   193
  examine changes to '1.txt'? [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: 22117
diff changeset
   194
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   195
  @@ -1,3 +1,3 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   196
   1
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   197
  -2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   198
  +2 2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   199
   3
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22117
diff changeset
   200
  record change 1/4 to '1.txt'? [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: 22117
diff changeset
   201
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   202
  @@ -3,3 +3,3 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   203
   3
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   204
  -4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   205
  +4 4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   206
   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: 22117
diff changeset
   207
  record change 2/4 to '1.txt'? [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: 22117
diff changeset
   208
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   209
  diff --git a/2.txt b/2.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   210
  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: 22117
diff changeset
   211
  examine changes to '2.txt'? [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: 22117
diff changeset
   212
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   213
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   214
   a
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   215
  -b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   216
  +b b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   217
   c
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   218
   d
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   219
   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: 22117
diff changeset
   220
  record change 3/4 to '2.txt'? [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: 22117
diff changeset
   221
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   222
  diff --git a/dir/a.txt b/dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   223
  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: 22117
diff changeset
   224
  examine changes to 'dir/a.txt'? [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: 22117
diff changeset
   225
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   226
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   227
After partial qrefresh 'tip'
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   228
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   229
  $ hg tip -p
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   230
  changeset:   1:0738af1a8211
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   231
  tag:         patch
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   232
  tag:         qbase
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   233
  tag:         qtip
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   234
  tag:         tip
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   235
  user:        test
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   236
  date:        Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   237
  summary:     [mq]: patch
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   238
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   239
  diff -r 1fd39ab63a33 -r 0738af1a8211 1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   240
  --- a/1.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   241
  +++ b/1.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   242
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   243
   1
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   244
  -2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   245
  +2 2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   246
   3
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   247
   4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   248
   5
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   249
  diff -r 1fd39ab63a33 -r 0738af1a8211 2.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   250
  --- a/2.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   251
  +++ b/2.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   252
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   253
   a
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   254
  -b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   255
  +b b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   256
   c
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   257
   d
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   258
   e
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   259
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   260
After partial qrefresh 'diff'
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   261
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   262
  $ hg diff --nodates
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   263
  diff -r 0738af1a8211 1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   264
  --- a/1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   265
  +++ b/1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   266
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   267
   1
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   268
   2 2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   269
   3
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   270
  -4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   271
  +4 4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   272
   5
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   273
  diff -r 0738af1a8211 dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   274
  --- a/dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   275
  +++ b/dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   276
  @@ -1,4 +1,4 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   277
  -hello world
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   278
  +hello world!
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   279
   
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   280
   someone
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   281
   up
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   282
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   283
qrefresh interactively everything else
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   284
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   285
  $ hg qrefresh -i -d '0 0' <<EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   286
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   287
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   288
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   289
  > y
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   290
  > EOF
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   291
  diff --git a/1.txt b/1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   292
  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: 22117
diff changeset
   293
  examine changes to '1.txt'? [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: 22117
diff changeset
   294
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   295
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   296
   1
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   297
   2 2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   298
   3
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   299
  -4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   300
  +4 4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   301
   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: 22117
diff changeset
   302
  record change 1/2 to '1.txt'? [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: 22117
diff changeset
   303
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   304
  diff --git a/dir/a.txt b/dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   305
  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: 22117
diff changeset
   306
  examine changes to 'dir/a.txt'? [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: 22117
diff changeset
   307
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   308
  @@ -1,4 +1,4 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   309
  -hello world
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   310
  +hello world!
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   311
   
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   312
   someone
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   313
   up
22589
9ab18a912c44 ui: show prompt choice if input is not a tty but is forced to be interactive
Mads Kiilerich <madski@unity3d.com>
parents: 22117
diff changeset
   314
  record change 2/2 to 'dir/a.txt'? [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: 22117
diff changeset
   315
  
14426
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   316
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   317
After final qrefresh 'tip'
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   318
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   319
  $ hg tip -p
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   320
  changeset:   1:2c3f66afeed9
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   321
  tag:         patch
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   322
  tag:         qbase
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   323
  tag:         qtip
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   324
  tag:         tip
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   325
  user:        test
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   326
  date:        Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   327
  summary:     [mq]: patch
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   328
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   329
  diff -r 1fd39ab63a33 -r 2c3f66afeed9 1.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   330
  --- a/1.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   331
  +++ b/1.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   332
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   333
   1
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   334
  -2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   335
  +2 2
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   336
   3
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   337
  -4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   338
  +4 4
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   339
   5
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   340
  diff -r 1fd39ab63a33 -r 2c3f66afeed9 2.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   341
  --- a/2.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   342
  +++ b/2.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   343
  @@ -1,5 +1,5 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   344
   a
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   345
  -b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   346
  +b b
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   347
   c
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   348
   d
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   349
   e
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   350
  diff -r 1fd39ab63a33 -r 2c3f66afeed9 dir/a.txt
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   351
  --- a/dir/a.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   352
  +++ b/dir/a.txt	Thu Jan 01 00:00:00 1970 +0000
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   353
  @@ -1,4 +1,4 @@
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   354
  -hello world
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   355
  +hello world!
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   356
   
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   357
   someone
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   358
   up
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   359
  
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   360
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   361
After qrefresh 'diff'
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   362
1df64ccef23e record: add qrefresh -i/--interactive
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
   363
  $ hg diff --nodates
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
   364
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16324
diff changeset
   365
  $ cd ..