tests/test-mq-qqueue.t
author Brodie Rao <brodie@sf.io>
Mon, 16 Sep 2013 01:08:29 -0700
changeset 20192 38fad5e76ee8
parent 17708 4f2f0f367ef6
permissions -rw-r--r--
branches: simplify with repo.branchmap().iterbranches() 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) 1069 0 1.2955 1.2955 <open> 1063 0 0.5576 0.5576 <method 'close' of 'file' objects> 4122 0 0.1993 0.0449 mercurial.repoview:161(changelog) 8240 0 0.0771 0.0299 mercurial.changelog:133(tip) 4122 0 0.0422 0.0204 mercurial.localrepo:26(__get__) 8240 0 0.0252 0.0131 <len> 4122 0 0.0060 0.0037 mercurial.repoview:112(filterrevs) 8240 0 0.0028 0.0028 <hash> 3029 0 0.2139 0.0390 mercurial.context:202(__init__) 3029 0 0.1402 0.0339 mercurial.repoview:161(changelog) 3029 0 0.0240 0.0087 mercurial.changelog:183(rev) 9087 0 0.0067 0.0067 <isinstance> 1096 0 0.0025 0.0025 <binascii.unhexlify> 4125 0 0.0015 0.0015 <len> 4229 0 0.0344 0.0344 mercurial.revlog:296(rev) 1061 0 0.0343 0.0343 <method 'seek' of 'file' objects> 1063 0 0.0339 0.0339 <method 'read' of 'file' objects> 40476 16488 0.0479 0.0311 <len> 16488 0 0.0216 0.0168 mercurial.revlog:262(__len__) 8240 0 0.0771 0.0299 mercurial.changelog:133(tip) 8240 0 0.0281 0.0203 mercurial.changelog:190(node) 8240 0 0.0191 0.0095 <len> 1342 0 0.0278 0.0278 <zlib.decompress> 1074 0 2.2143 0.0266 mercurial.changelog:270(read) 1074 0 2.1328 0.0230 mercurial.revlog:907(revision) 1073 0 0.0208 0.0108 mercurial.changelog:28(decodeextra) 2148 0 0.0072 0.0072 <method 'split' of 'str' objects> 2148 0 0.0211 0.0038 mercurial.encoding:61(tolocal) 1074 0 0.0028 0.0028 <method 'index' of 'str' objects> 1061 0 1.9811 0.0237 mercurial.revlog:817(_loadchunk) real 0m2.742s user 0m0.811s sys 0m0.188s After this change: $ time hg --profile branches > /dev/null CallCount Recursive Total(s) Inline(s) module:lineno(function) 2092 0 0.1444 0.0292 mercurial.context:202(__init__) 2092 0 0.0908 0.0216 mercurial.repoview:161(changelog) 2092 0 0.0164 0.0057 mercurial.changelog:183(rev) 6276 0 0.0045 0.0045 <isinstance> 1096 0 0.0024 0.0024 <binascii.unhexlify> 3188 0 0.0013 0.0013 <len> 2218 0 0.0230 0.0230 mercurial.revlog:296(rev) 2111 0 0.1028 0.0218 mercurial.repoview:161(changelog) 4218 0 0.0387 0.0146 mercurial.changelog:133(tip) 2111 0 0.0238 0.0104 mercurial.localrepo:26(__get__) 4218 0 0.0122 0.0062 <len> 2111 0 0.0038 0.0021 mercurial.repoview:112(filterrevs) 4218 0 0.0014 0.0014 <hash> 20240 8444 0.0233 0.0149 <len> 8444 0 0.0110 0.0084 mercurial.revlog:262(__len__) 4218 0 0.0387 0.0146 mercurial.changelog:133(tip) 4218 0 0.0144 0.0103 mercurial.changelog:190(node) 4218 0 0.0097 0.0048 <len> 2398 1 0.0271 0.0115 mercurial.localrepo:26(__get__) 2398 1 0.0146 0.0046 mercurial.scmutil:939(__get__) 2124 0 0.0009 0.0009 mercurial.localrepo:330(unfiltered) 274 0 0.0002 0.0002 mercurial.repoview:192(unfiltered) 4 0 0.1409 0.0112 mercurial.branchmap:19(read) 1096 0 0.1113 0.0028 mercurial.localrepo:407(__contains__) 1098 0 0.0020 0.0020 <method 'split' of 'str' objects> 1097 0 0.0019 0.0019 <binascii.unhexlify> 1096 0 0.0093 0.0018 mercurial.encoding:61(tolocal) 1096 0 0.0010 0.0010 <method 'append' of 'list' objects> 4349 0 0.0150 0.0105 mercurial.changelog:190(node) 4349 0 0.0045 0.0045 mercurial.revlog:317(node) real 0m0.362s user 0m0.329s sys 0m0.024s
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