tests/test-mq-qqueue.t
author Brodie Rao <brodie@sf.io>
Fri, 15 Nov 2013 23:18:08 -0500
changeset 20182 04036798ebed
parent 17708 4f2f0f367ef6
permissions -rw-r--r--
branches: avoid unnecessary changectx.branch() calls This requires reading from the changelog, which can be costly over NFS. Note that this does not totally remove reading from the changelog; we still do that when calling changectx.closesbranch(). That call will be removed in a later patch. Running hg branches on the PyPy repo (with 996) over a busy NFS server, before this change: $ time hg --profile branches > /dev/null CallCount Recursive Total(s) Inline(s) module:lineno(function) 2042 0 2.2827 2.2827 <open> 2036 0 0.9840 0.9840 <method 'close' of 'file' objects> 2036 0 0.0464 0.0464 <method 'read' of 'file' objects> 5233 0 0.1985 0.0453 mercurial.repoview:161(changelog) 10462 0 0.0791 0.0314 mercurial.changelog:133(tip) 5233 0 0.0388 0.0176 mercurial.localrepo:26(__get__) 10462 0 0.0250 0.0126 <len> 5233 0 0.0059 0.0039 mercurial.repoview:112(filterrevs) 10462 0 0.0029 0.0029 <hash> 2034 0 0.0444 0.0444 <method 'seek' of 'file' objects> 5340 0 0.0390 0.0390 mercurial.revlog:296(rev) 2582 0 0.0371 0.0371 <zlib.decompress> 3155 0 0.1963 0.0366 mercurial.context:202(__init__) 3155 0 0.1238 0.0306 mercurial.repoview:161(changelog) 3155 0 0.0261 0.0080 mercurial.changelog:183(rev) 9465 0 0.0061 0.0061 <isinstance> 1096 0 0.0023 0.0023 <binascii.unhexlify> 4251 0 0.0014 0.0014 <len> 2059 0 3.7341 0.0332 mercurial.changelog:270(read) 2059 0 3.6304 0.0307 mercurial.revlog:907(revision) 2057 0 0.0262 0.0137 mercurial.changelog:28(decodeextra) 4118 0 0.0094 0.0094 <method 'split' of 'str' objects> 4118 0 0.0270 0.0048 mercurial.encoding:61(tolocal) 2059 0 0.0040 0.0040 <method 'index' of 'str' objects> 10462 0 0.0791 0.0314 mercurial.changelog:133(tip) 10462 0 0.0289 0.0207 mercurial.changelog:190(node) 10462 0 0.0188 0.0091 <len> 52433 20932 0.0478 0.0310 <len> 20932 0 0.0221 0.0168 mercurial.revlog:262(__len__) 2059 0 3.6304 0.0307 mercurial.revlog:907(revision) real 0m4.361s user 0m0.986s sys 0m0.237s After this change: $ time hg --profile branches > /dev/null CallCount Recursive Total(s) Inline(s) module:lineno(function) 1069 0 1.1098 1.1098 <open> 1063 0 0.4865 0.4865 <method 'close' of 'file' objects> 4122 0 0.1811 0.0404 mercurial.repoview:161(changelog) 8240 0 0.0712 0.0272 mercurial.changelog:133(tip) 4122 0 0.0378 0.0177 mercurial.localrepo:26(__get__) 8240 0 0.0221 0.0115 <len> 4122 0 0.0057 0.0033 mercurial.repoview:112(filterrevs) 8240 0 0.0025 0.0025 <hash> 3029 0 0.1979 0.0371 mercurial.context:202(__init__) 3029 0 0.1278 0.0310 mercurial.repoview:161(changelog) 3029 0 0.0230 0.0081 mercurial.changelog:183(rev) 9087 0 0.0061 0.0061 <isinstance> 1096 0 0.0026 0.0026 <binascii.unhexlify> 4125 0 0.0014 0.0014 <len> 4229 0 0.0337 0.0337 mercurial.revlog:296(rev) 1061 0 0.0296 0.0296 <method 'seek' of 'file' objects> 1063 0 0.0292 0.0292 <method 'read' of 'file' objects> 8240 0 0.0712 0.0272 mercurial.changelog:133(tip) 8240 0 0.0271 0.0196 mercurial.changelog:190(node) 8240 0 0.0169 0.0083 <len> 40476 16488 0.0422 0.0271 <len> 16488 0 0.0193 0.0152 mercurial.revlog:262(__len__) 1342 0 0.0241 0.0241 <zlib.decompress> 9445 0 0.0336 0.0224 mercurial.changelog:190(node) 9445 0 0.0112 0.0112 mercurial.revlog:317(node) 1074 0 1.9102 0.0224 mercurial.changelog:270(read) 1074 0 1.8397 0.0202 mercurial.revlog:907(revision) 1073 0 0.0187 0.0099 mercurial.changelog:28(decodeextra) 2148 0 0.0061 0.0061 <method 'split' of 'str' objects> 2148 0 0.0184 0.0034 mercurial.encoding:61(tolocal) real 0m2.402s user 0m0.735s sys 0m0.177s
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     1
  $ echo "[extensions]" >> $HGRCPATH
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     2
  $ echo "mq=" >> $HGRCPATH
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
     3
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     4
  $ hg init foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     5
  $ cd foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     6
  $ echo a > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     7
  $ hg ci -qAm a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     8
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
     9
Default queue:
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    10
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    11
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    12
  patches (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    13
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    14
  $ echo b > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    15
  $ hg qnew -fgDU somestuff
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    16
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    17
Applied patches in default queue:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    18
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    19
  $ hg qap
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    20
  somestuff
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    21
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    22
Try to change patch (create succeeds, switch fails):
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    23
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    24
  $ hg qqueue foo --create
17708
4f2f0f367ef6 mq: improve qqueue message with patches applied (issue3036)
Bryan O'Sullivan <bryano@fb.com>
parents: 12324
diff changeset
    25
  abort: new queue created, but cannot make active as patches are applied
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    26
  [255]
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    27
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    28
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    29
  foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    30
  patches (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    31
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    32
Empty default queue:
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    33
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    34
  $ hg qpop
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    35
  popping somestuff
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    36
  patch queue now empty
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    37
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    38
Switch queue:
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    39
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    40
  $ hg qqueue foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    41
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    42
  foo (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    43
  patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    44
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    45
List queues, quiet:
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    46
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    47
  $ hg qqueue --quiet
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    48
  foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    49
  patches
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    50
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    51
Fail creating queue with already existing name:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    52
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    53
  $ hg qqueue --create foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    54
  abort: queue "foo" already exists
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    55
  [255]
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    56
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    57
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    58
  foo (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    59
  patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    60
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    61
Create new queue for rename:
11767
9b771b4ce2f3 mq/qqueue: --list does not print (active) with --quiet
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11272
diff changeset
    62
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    63
  $ hg qqueue --create bar
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    64
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    65
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    66
  bar (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    67
  foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    68
  patches
11271
d1aca0863a9d mq: prevent the creation of a queue whose name is already taken
Cédric Duval <cedricduval@free.fr>
parents: 11270
diff changeset
    69
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    70
Rename queue, same name:
11939
7d2ea5ce4aac mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11767
diff changeset
    71
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    72
  $ hg qqueue --rename bar
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    73
  abort: can't rename "bar" to its current name
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    74
  [255]
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    75
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    76
Rename queue to existing:
11939
7d2ea5ce4aac mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11767
diff changeset
    77
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    78
  $ hg qqueue --rename foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    79
  abort: queue "foo" already exists
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    80
  [255]
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    81
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    82
Rename queue:
11939
7d2ea5ce4aac mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11767
diff changeset
    83
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    84
  $ hg qqueue --rename buz
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    85
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    86
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    87
  buz (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    88
  foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    89
  patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    90
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    91
Switch back to previous queue:
11939
7d2ea5ce4aac mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11767
diff changeset
    92
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    93
  $ hg qqueue foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    94
  $ hg qqueue --delete buz
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    95
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    96
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    97
  foo (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    98
  patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
    99
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   100
Create queue for purge:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   101
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   102
  $ hg qqueue --create purge-me
11939
7d2ea5ce4aac mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11767
diff changeset
   103
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   104
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   105
  foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   106
  patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   107
  purge-me (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   108
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   109
Create patch for purge:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   110
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   111
  $ hg qnew patch-purge-me
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   112
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   113
  $ ls -1d .hg/patches-purge-me 2>/dev/null || true
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   114
  .hg/patches-purge-me
11967
6e3875a80533 mq/qqueue: add --purge option to delete a queue and its patch dir
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11939
diff changeset
   115
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   116
  $ hg qpop -a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   117
  popping patch-purge-me
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   118
  patch queue now empty
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   119
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   120
Purge queue:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   121
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   122
  $ hg qqueue foo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   123
  $ hg qqueue --purge purge-me
11967
6e3875a80533 mq/qqueue: add --purge option to delete a queue and its patch dir
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11939
diff changeset
   124
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   125
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   126
  foo (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   127
  patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   128
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   129
  $ ls -1d .hg/patches-purge-me 2>/dev/null || true
11967
6e3875a80533 mq/qqueue: add --purge option to delete a queue and its patch dir
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11939
diff changeset
   130
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   131
Unapplied patches:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   132
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   133
  $ hg qun
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   134
  $ echo c > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   135
  $ hg qnew -fgDU otherstuff
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   136
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   137
Fail switching back:
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
   138
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   139
  $ hg qqueue patches
17708
4f2f0f367ef6 mq: improve qqueue message with patches applied (issue3036)
Bryan O'Sullivan <bryano@fb.com>
parents: 12324
diff changeset
   140
  abort: new queue created, but cannot make active as patches are applied
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   141
  [255]
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
   142
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   143
Fail deleting current:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   144
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   145
  $ hg qqueue foo --delete
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   146
  abort: cannot delete currently active queue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   147
  [255]
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
   148
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   149
Switch back and delete foo:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   150
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   151
  $ hg qpop -a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   152
  popping otherstuff
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   153
  patch queue now empty
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   154
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   155
  $ hg qqueue patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   156
  $ hg qqueue foo --delete
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   157
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   158
  patches (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   159
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   160
Tricky cases:
11270
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
   161
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   162
  $ hg qqueue store --create
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   163
  $ hg qnew journal
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   164
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   165
  $ hg qqueue
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   166
  patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   167
  store (active)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   168
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   169
  $ hg qpop -a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   170
  popping journal
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   171
  patch queue now empty
11270
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
   172
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   173
  $ hg qqueue patches
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   174
  $ hg qun
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   175
  somestuff
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   176
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   177
Invalid names:
11270
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
   178
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   179
  $ hg qqueue test/../../bar --create
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   180
  abort: invalid queue name, may not contain the characters ":\/."
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   181
  [255]
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   182
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   183
  $ hg qqueue . --create
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   184
  abort: invalid queue name, may not contain the characters ":\/."
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   185
  [255]
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   186
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   187
  $ cd ..
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11967
diff changeset
   188