tests/test-mq-guards.t
author Manuel Jacob <me@manueljacob.de>
Tue, 31 May 2022 02:19:07 +0200
changeset 49297 402f9f0f9387
parent 23749 a387b0390082
child 49621 55c6ebd11cb9
permissions -rw-r--r--
tests: remove Python 2 special cases in test-stdio.py
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     1
  $ echo "[extensions]" >> $HGRCPATH
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     2
  $ echo "mq=" >> $HGRCPATH
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     4
  $ hg init
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     5
  $ hg qinit
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     6
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     7
  $ echo x > x
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     8
  $ hg ci -Ama
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
     9
  adding x
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    10
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    11
  $ hg qnew a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    12
  $ echo a > a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    13
  $ hg add a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    14
  $ hg qrefresh
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    15
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    16
  $ hg qnew b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    17
  $ echo b > b
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    18
  $ hg add b
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    19
  $ hg qrefresh
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    20
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    21
  $ hg qnew c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    22
  $ echo c > c
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    23
  $ hg add c
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    24
  $ hg qrefresh
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    25
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    26
  $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    27
  popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    28
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    29
  popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    30
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    31
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    32
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    33
should fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    34
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    35
  $ hg qguard does-not-exist.patch +bleh
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    36
  abort: no patch named does-not-exist.patch
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
    37
  [255]
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    38
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    39
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    40
should fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    41
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    42
  $ hg qguard +fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    43
  abort: no patches applied
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
    44
  [255]
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    45
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    46
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    47
  applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    48
  now at: a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    49
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    50
should guard a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    51
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    52
  $ hg qguard +a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    53
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    54
should print +a
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    55
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    56
  $ hg qguard
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    57
  a.patch: +a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    58
  $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    59
  popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    60
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    61
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    62
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    63
should fail
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    64
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    65
  $ hg qpush a.patch
14464
00256f689f9c mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents: 13987
diff changeset
    66
  cannot push 'a.patch' - guarded by '+a'
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
    67
  [1]
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    68
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    69
  $ hg qguard a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    70
  a.patch: +a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    71
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    72
should push b.patch
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    73
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    74
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    75
  applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    76
  now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    77
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    78
  $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    79
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    80
  patch queue now empty
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    81
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    82
test selection of an empty guard
4133
a9ee6c53af8d mq: abort cleanly when invalid patch name is given to qguard
Christian Ebert <blacktrash@gmx.net>
parents: 3763
diff changeset
    83
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    84
  $ hg qselect ""
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    85
  abort: guard cannot be an empty string
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 11896
diff changeset
    86
  [255]
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    87
  $ hg qselect a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    88
  number of unguarded, unapplied patches has changed from 2 to 3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    89
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    90
should push a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    91
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    92
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    93
  applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    94
  now at: a.patch
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    95
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    96
  $ hg qguard -- c.patch -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    97
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    98
should print -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
    99
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   100
  $ hg qguard c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   101
  c.patch: -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   102
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   103
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   104
should skip c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   105
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   106
  $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   107
  applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   108
  skipping c.patch - guarded by '-a'
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   109
  now at: b.patch
16063
c36db39b3fee mq: fix qnext when all remaining patches are guarded
Patrick Mezard <pmezard@gmail.com>
parents: 15256
diff changeset
   110
  $ hg qnext
c36db39b3fee mq: fix qnext when all remaining patches are guarded
Patrick Mezard <pmezard@gmail.com>
parents: 15256
diff changeset
   111
  all patches applied
c36db39b3fee mq: fix qnext when all remaining patches are guarded
Patrick Mezard <pmezard@gmail.com>
parents: 15256
diff changeset
   112
  [1]
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
   113
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   114
should display b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   115
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   116
  $ hg qtop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   117
  b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   118
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   119
  $ hg qguard -n c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   120
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   121
should push c.patch
7398
2cd1308cb588 mq: gracefully abort qpush/qgoto to guarded patch (issue1186)
Brendan Cully <brendan@kublai.com>
parents: 6607
diff changeset
   122
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   123
  $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   124
  applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   125
  now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   126
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   127
  $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   128
  popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   129
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   130
  popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   131
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   132
  $ hg qselect -n
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   133
  guards deactivated
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   134
  number of unguarded, unapplied patches has changed from 3 to 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   135
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   136
should push all
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
   137
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   138
  $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   139
  applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   140
  applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   141
  now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   142
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   143
  $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   144
  popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   145
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   146
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   147
  $ hg qguard a.patch +1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   148
  $ hg qguard b.patch +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   149
  $ hg qselect 1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   150
  number of unguarded, unapplied patches has changed from 1 to 2
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
   151
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   152
should push a.patch, not b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   153
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   154
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   155
  applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   156
  now at: a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   157
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   158
  applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   159
  now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   160
  $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   161
  popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   162
  popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   163
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   164
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   165
  $ hg qselect 2
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
   166
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   167
should push b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   168
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   169
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   170
  applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   171
  now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   172
  $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   173
  applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   174
  now at: c.patch
16064
7e5a281a082c mq: make qprev return the previous applied patch (issue3245)
Patrick Mezard <pmezard@gmail.com>
parents: 16063
diff changeset
   175
  $ hg qprev
7e5a281a082c mq: make qprev return the previous applied patch (issue3245)
Patrick Mezard <pmezard@gmail.com>
parents: 16063
diff changeset
   176
  b.patch
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   177
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   178
Used to be an issue with holes in the patch sequence
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   179
So, put one hole on the base and ask for topmost patch.
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
   180
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   181
  $ hg qtop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   182
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   183
  $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   184
  popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   185
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   186
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   187
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   188
  $ hg qselect 1 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   189
  number of unguarded, unapplied patches has changed from 2 to 3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   190
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   191
should push a.patch, b.patch
2821
2e4ace008c94 mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
   192
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   193
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   194
  applying a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   195
  now at: a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   196
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   197
  applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   198
  now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   199
  $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   200
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   201
  popping a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   202
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   203
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   204
  $ hg qguard -- a.patch +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   205
  $ hg qselect 1 2 3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   206
  number of unguarded, unapplied patches has changed from 3 to 2
2829
05316bb57d01 mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2821
diff changeset
   207
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   208
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   209
list patches and guards
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   210
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   211
  $ hg qguard -l
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   212
  a.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   213
  b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   214
  c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   215
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   216
have at least one patch applied to test coloring
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   217
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   218
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   219
  applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   220
  now at: b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   221
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   222
list patches and guards with color
2850
851b07ec450c mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2844
diff changeset
   223
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   224
  $ hg --config extensions.color= qguard --config color.mode=ansi \
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   225
  >     -l --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   226
  \x1b[0;30;1ma.patch\x1b[0m: \x1b[0;33m+1\x1b[0m \x1b[0;33m+2\x1b[0m \x1b[0;31m-3\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   227
  \x1b[0;34;1;4mb.patch\x1b[0m: \x1b[0;33m+2\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   228
  \x1b[0;30;1mc.patch\x1b[0m: \x1b[0;32munguarded\x1b[0m (esc)
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   229
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   230
should pop b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   231
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   232
  $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   233
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   234
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   235
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   236
list series
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   237
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   238
  $ hg qseries -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   239
  0 G a.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   240
  1 U b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   241
  2 U c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   242
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   243
list guards
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   244
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   245
  $ hg qselect
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   246
  1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   247
  2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   248
  3
2829
05316bb57d01 mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2821
diff changeset
   249
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   250
should push b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   251
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   252
  $ hg qpush
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   253
  applying b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   254
  now at: b.patch
2829
05316bb57d01 mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2821
diff changeset
   255
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   256
  $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   257
  applying c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   258
  now at: c.patch
22454
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   259
  $ hg qselect -n --reapply -v
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   260
  guards deactivated
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   261
  popping guarded patches
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   262
  popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   263
  popping b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   264
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   265
  reapplying unguarded patches
22454
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   266
  skipping a.patch - guarded by '+1' '+2'
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   267
  skipping b.patch - guarded by '+2'
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   268
  skipping a.patch - guarded by '+1' '+2'
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   269
  skipping b.patch - guarded by '+2'
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   270
  applying c.patch
22454
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   271
  patching file c
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   272
  adding c
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23139
diff changeset
   273
  committing files:
22454
ac31d87608d6 mq: use "mq.applied[i].name" instead of "mq.appliedname(i)" for safety
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22453
diff changeset
   274
  c
23749
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23139
diff changeset
   275
  committing manifest
a387b0390082 localrepo: show headline notes in commitctx before showing filenames
Mads Kiilerich <madski@unity3d.com>
parents: 23139
diff changeset
   276
  committing changelog
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   277
  now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   278
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   279
guards in series file: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   280
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   281
  $ hg qselect -s
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   282
  +1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   283
  +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   284
  -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   285
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   286
should show c.patch
11819
1c00577b0298 qguard: label patch names by status when listing guards
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 11141
diff changeset
   287
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   288
  $ hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   289
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   290
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   291
  $ hg qrename a.patch new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   292
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   293
should show :
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   294
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   295
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   296
new.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   297
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   298
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   299
b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   300
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   301
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   302
c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   303
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   304
  $ hg qguard -l
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   305
  new.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   306
  b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   307
  c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   308
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   309
  $ hg qnew d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   310
  $ hg qpop
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   311
  popping d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   312
  now at: c.patch
2844
582cbc4392cb qselect: add --pop, --reapply options
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2829
diff changeset
   313
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   314
should show new.patch and b.patch as Guarded, c.patch as Applied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   315
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   316
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   317
and d.patch as Unapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   318
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   319
  $ hg qseries -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   320
  0 G new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   321
  1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   322
  2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   323
  3 U d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   324
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   325
qseries again, but with color
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   326
13987
e0f07847f8de color: add support for terminfo-based attributes and color
Danek Duvall <duvall@comfychair.org>
parents: 12942
diff changeset
   327
  $ hg --config extensions.color= --config color.mode=ansi qseries -v --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   328
  0 G \x1b[0;30;1mnew.patch\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   329
  1 G \x1b[0;30;1mb.patch\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   330
  2 A \x1b[0;34;1;4mc.patch\x1b[0m (esc)
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   331
  3 U \x1b[0;30;1md.patch\x1b[0m (esc)
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   332
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   333
  $ hg qguard d.patch +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   334
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   335
new.patch, b.patch: Guarded. c.patch: Applied. d.patch: Guarded.
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   336
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   337
  $ hg qseries -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   338
  0 G new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   339
  1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   340
  2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   341
  3 G d.patch
3685
193e9c6d1a6d Issue424: mq patch loses guard when qrenamed
Mathieu Clabaut <mathieu.clabaut@gmail.com>
parents: 2990
diff changeset
   342
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   343
  $ qappunappv()
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   344
  > {
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   345
  >     for command in qapplied "qapplied -v" qunapplied "qunapplied -v"; do
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   346
  >         echo % hg $command
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   347
  >         hg $command
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   348
  >     done
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   349
  > }
4240
943f40b4da30 Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4133
diff changeset
   350
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   351
  $ hg qpop -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   352
  popping c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   353
  patch queue now empty
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   354
  $ hg qguard -l
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   355
  new.patch: +1 +2 -3
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   356
  b.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   357
  c.patch: unguarded
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   358
  d.patch: +2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   359
  $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   360
  % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   361
  % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   362
  % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   363
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   364
  % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   365
  0 G new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   366
  1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   367
  2 U c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   368
  3 G d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   369
  $ hg qselect 1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   370
  number of unguarded, unapplied patches has changed from 1 to 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   371
  $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   372
  % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   373
  % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   374
  % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   375
  new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   376
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   377
  % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   378
  0 U new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   379
  1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   380
  2 U c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   381
  3 G d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   382
  $ hg qpush -a
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   383
  applying new.patch
14464
00256f689f9c mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents: 13987
diff changeset
   384
  skipping b.patch - guarded by '+2'
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   385
  applying c.patch
14464
00256f689f9c mq: print "'foo' 'bar'", not "['foo', 'bar']" when showing guards
Martin Geisler <mg@aragost.com>
parents: 13987
diff changeset
   386
  skipping d.patch - guarded by '+2'
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   387
  now at: c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   388
  $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   389
  % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   390
  new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   391
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   392
  % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   393
  0 A new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   394
  1 G b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   395
  2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   396
  % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   397
  % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   398
  3 G d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   399
  $ hg qselect 2
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   400
  number of unguarded, unapplied patches has changed from 0 to 1
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   401
  $ qappunappv
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   402
  % hg qapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   403
  new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   404
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   405
  % hg qapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   406
  0 A new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   407
  1 U b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   408
  2 A c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   409
  % hg qunapplied
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   410
  d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   411
  % hg qunapplied -v
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   412
  3 U d.patch
4240
943f40b4da30 Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4133
diff changeset
   413
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   414
  $ for patch in `hg qseries`; do
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   415
  >     echo % hg qapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   416
  >     hg qapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   417
  >     echo % hg qunapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   418
  >     hg qunapplied $patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   419
  > done
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   420
  % hg qapplied new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   421
  new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   422
  % hg qunapplied new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   423
  b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   424
  d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   425
  % hg qapplied b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   426
  new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   427
  % hg qunapplied b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   428
  d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   429
  % hg qapplied c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   430
  new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   431
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   432
  % hg qunapplied c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   433
  d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   434
  % hg qapplied d.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   435
  new.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   436
  c.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   437
  % hg qunapplied d.patch
4240
943f40b4da30 Tests for qapplied/qunapplied fixes (417c2068cb92 and ce6c364ebb2a)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4133
diff changeset
   438
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   439
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   440
hg qseries -m: only b.patch should be shown
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   441
the guards file was not ignored in the past
4241
7c59ade0f0d6 hg qseries -m: guards file was not ignored
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4240
diff changeset
   442
11896
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   443
  $ hg qdelete -k b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   444
  $ hg qseries -m
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   445
  b.patch
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   446
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   447
hg qseries -m with color
286693eaba47 tests: unify test-mq-guards
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 11819
diff changeset
   448
13987
e0f07847f8de color: add support for terminfo-based attributes and color
Danek Duvall <duvall@comfychair.org>
parents: 12942
diff changeset
   449
  $ hg --config extensions.color= --config color.mode=ansi qseries -m --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12316
diff changeset
   450
  \x1b[0;31;1mb.patch\x1b[0m (esc)
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   451
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   452
21024
7731a2281cf0 spelling: fixes from spell checker
Mads Kiilerich <madski@unity3d.com>
parents: 16064
diff changeset
   453
excercise corner cases in "qselect --reapply"
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   454
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   455
  $ hg qpop -a
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   456
  popping c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   457
  popping new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   458
  patch queue now empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   459
  $ hg qguard -- new.patch -not-new
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   460
  $ hg qguard -- c.patch -not-c
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   461
  $ hg qguard -- d.patch -not-d
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   462
  $ hg qpush -a
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   463
  applying new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   464
  applying c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   465
  applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   466
  patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   467
  now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   468
  $ hg qguard -l
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   469
  new.patch: -not-new
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   470
  c.patch: -not-c
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   471
  d.patch: -not-d
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   472
  $ hg qselect --reapply not-d
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   473
  popping guarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   474
  popping d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   475
  now at: c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   476
  reapplying unguarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   477
  cannot push 'd.patch' - guarded by '-not-d'
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   478
  $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   479
  0 A new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   480
  1 A c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   481
  2 G d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   482
  $ hg qselect --reapply -n
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   483
  guards deactivated
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   484
  $ hg qpush
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   485
  applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   486
  patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   487
  now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   488
  $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   489
  0 A new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   490
  1 A c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   491
  2 A d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   492
  $ hg qselect --reapply not-c
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   493
  popping guarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   494
  popping d.patch
15256
8caf7a757afa mq: fix corner cases for handling of patch 0 in qselect
Mads Kiilerich <mads@kiilerich.com>
parents: 15245
diff changeset
   495
  popping c.patch
8caf7a757afa mq: fix corner cases for handling of patch 0 in qselect
Mads Kiilerich <mads@kiilerich.com>
parents: 15245
diff changeset
   496
  now at: new.patch
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   497
  reapplying unguarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   498
  applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   499
  patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   500
  now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   501
  $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   502
  0 A new.patch
15256
8caf7a757afa mq: fix corner cases for handling of patch 0 in qselect
Mads Kiilerich <mads@kiilerich.com>
parents: 15245
diff changeset
   503
  1 G c.patch
15245
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   504
  2 A d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   505
  $ hg qselect --reapply not-new
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   506
  popping guarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   507
  popping d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   508
  popping new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   509
  patch queue now empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   510
  reapplying unguarded patches
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   511
  applying c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   512
  applying d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   513
  patch d.patch is empty
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   514
  now at: d.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   515
  $ hg qser -v
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   516
  0 G new.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   517
  1 A c.patch
aa2c35057f47 tests: exercise some corner cases for mq guard selection and --reapply
Mads Kiilerich <mads@kiilerich.com>
parents: 14464
diff changeset
   518
  2 A d.patch
22453
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   519
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   520
test that qselect shows "number of guarded, applied patches" correctly
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   521
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   522
  $ hg qimport -q -e b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   523
  adding b.patch to series file
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   524
  $ hg qguard -- b.patch -not-b
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   525
  $ hg qpop -a -q
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   526
  patch queue now empty
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   527
  $ hg qunapplied -v
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   528
  0 G new.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   529
  1 U c.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   530
  2 U d.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   531
  3 U b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   532
  $ hg qselect not-new not-c
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   533
  number of unguarded, unapplied patches has changed from 3 to 2
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   534
  $ hg qpush -q -a
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   535
  patch d.patch is empty
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   536
  now at: b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   537
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   538
  $ hg qapplied -v
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   539
  0 G new.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   540
  1 G c.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   541
  2 A d.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   542
  3 A b.patch
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   543
  $ hg qselect --none
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   544
  guards deactivated
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   545
  $ hg qselect not-new not-c not-d
fd0f0b0d316d mq: report correct numbers for changing "number of guarded, applied patches"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21024
diff changeset
   546
  number of guarded, applied patches has changed from 0 to 1
22455
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   547
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   548
test that "qselect --reapply" reapplies patches successfully when the
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   549
already applied patch becomes unguarded and it follows the already
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   550
guarded (= not yet applied) one.
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   551
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   552
  $ hg qpop -q -a
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   553
  patch queue now empty
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   554
  $ hg qselect not-new not-c
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   555
  number of unguarded, unapplied patches has changed from 1 to 2
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   556
  $ hg qpush -q -a
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   557
  patch d.patch is empty
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   558
  now at: b.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   559
  $ hg qapplied -v
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   560
  0 G new.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   561
  1 G c.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   562
  2 A d.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   563
  3 A b.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   564
  $ hg qselect -q --reapply not-c not-b
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   565
  now at: d.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   566
  cannot push 'b.patch' - guarded by '-not-b'
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   567
  $ hg qseries -v
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   568
  0 U new.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   569
  1 G c.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   570
  2 A d.patch
c89379d47e95 mq: pop correct patches when changing pushable-ness of already applied ones
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22454
diff changeset
   571
  3 G b.patch
22456
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   572
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   573
test that "qselect --reapply" checks applied patches correctly when no
23139
e53f6b72a0e4 spelling: fixes from proofreading of spell checker issues
Mads Kiilerich <madski@unity3d.com>
parents: 22456
diff changeset
   574
applied patches becomes guarded but some of unapplied ones become
22456
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   575
unguarded.
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   576
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   577
  $ hg qpop -q -a
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   578
  patch queue now empty
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   579
  $ hg qselect not-new not-c not-d
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   580
  number of unguarded, unapplied patches has changed from 2 to 1
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   581
  $ hg qpush -q -a
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   582
  now at: b.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   583
  $ hg qapplied -v
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   584
  0 G new.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   585
  1 G c.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   586
  2 G d.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   587
  3 A b.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   588
  $ hg qselect -q --reapply not-new not-c
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   589
  $ hg qseries -v
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   590
  0 G new.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   591
  1 G c.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   592
  2 U d.patch
4bbcee186fc6 mq: examine "pushable" of already applied patch correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 22455
diff changeset
   593
  3 A b.patch