tests/test-mq-merge.t
author Matt Mackall <mpm@selenic.com>
Wed, 30 Mar 2011 14:42:41 -0500
changeset 13808 58b86b9149f1
parent 13520 9510ddf87c43
child 14565 3cacc232f27f
permissions -rw-r--r--
url: fix tests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13520
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     1
Setup extension:
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     2
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     3
  $ echo "[extensions]" >> $HGRCPATH
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     4
  $ echo "mq =" >> $HGRCPATH
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     5
  $ echo "[mq]" >> $HGRCPATH
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     6
  $ echo "git = keep" >> $HGRCPATH
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     7
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     8
Test merge with mq changeset as the second parent:
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
     9
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    10
  $ hg init m
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    11
  $ cd m
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    12
  $ touch a b c
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    13
  $ hg add a
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    14
  $ hg commit -m a
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    15
  $ hg add b
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    16
  $ hg qnew -d "0 0" b
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    17
  $ hg update 0
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    18
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    19
  $ hg add c
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    20
  $ hg commit -m c
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    21
  created new head
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    22
  $ hg merge
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    23
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    24
  (branch merge, don't forget to commit)
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    25
  $ hg commit -m merge
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    26
  abort: cannot commit over an applied mq patch
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    27
  [255]
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    28
  $ cd ..
9510ddf87c43 mq: forbid commit of merge involving mq patches
Martin Geisler <mg@aragost.com>
parents: 12640
diff changeset
    29
12399
4fee1fd3de9a tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents: 12376
diff changeset
    30
Issue529: mq aborts when merging patch deleting files
4333
4f721e96f1de Add test for issue 529 - "mq aborts when merging patch deleting files".
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    31
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    32
  $ checkundo()
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    33
  > {
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    34
  >     if [ -f .hg/store/undo ]; then
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    35
  >         echo ".hg/store/undo still exists"
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    36
  >     fi
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    37
  > }
5527
0b3f910dfd17 mq: really remove undo after a qpush (and after a strip)
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4437
diff changeset
    38
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    39
Commit two dummy files in "init" changeset:
4333
4f721e96f1de Add test for issue 529 - "mq aborts when merging patch deleting files".
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    40
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    41
  $ hg init t
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    42
  $ cd t
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    43
  $ echo a > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    44
  $ echo b > b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    45
  $ hg ci -Am init
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    46
  adding a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    47
  adding b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    48
  $ hg tag -l init
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    49
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    50
Create a patch removing a:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    51
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    52
  $ hg qnew rm_a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    53
  $ hg rm a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    54
  $ hg qrefresh -m "rm a"
4333
4f721e96f1de Add test for issue 529 - "mq aborts when merging patch deleting files".
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    55
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    56
Save the patch queue so we can merge it later:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    57
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    58
  $ hg qsave -c -e
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
    59
  copy $TESTTMP/t/.hg/patches to $TESTTMP/t/.hg/patches.1
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    60
  $ checkundo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    61
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    62
Update b and commit in an "update" changeset:
4333
4f721e96f1de Add test for issue 529 - "mq aborts when merging patch deleting files".
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    63
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    64
  $ hg up -C init
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    65
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    66
  $ echo b >> b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    67
  $ hg st
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    68
  M b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    69
  $ hg ci -m update
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    70
  created new head
4333
4f721e96f1de Add test for issue 529 - "mq aborts when merging patch deleting files".
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    71
4f721e96f1de Add test for issue 529 - "mq aborts when merging patch deleting files".
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    72
# Here, qpush used to abort with :
4f721e96f1de Add test for issue 529 - "mq aborts when merging patch deleting files".
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    73
# The system cannot find the file specified => a
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    74
  $ hg manifest
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    75
  a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    76
  b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    77
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    78
  $ hg qpush -a -m
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
    79
  merging with queue at: $TESTTMP/t/.hg/patches.1
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    80
  applying rm_a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    81
  now at: rm_a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    82
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    83
  $ checkundo
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    84
  $ hg manifest
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    85
  b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    86
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    87
Ensure status is correct after merge:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    88
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    89
  $ hg qpop -a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    90
  popping rm_a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    91
  popping .hg.patches.merge.marker
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    92
  patch queue now empty
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    93
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    94
  $ cd ..
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    95
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    96
Classic MQ merge sequence *with an explicit named queue*:
4437
a210b40d0860 Make mergepatch save queue now that qpush isn't.
Brendan Cully <brendan@kublai.com>
parents: 4333
diff changeset
    97
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    98
  $ hg init t2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
    99
  $ cd t2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   100
  $ echo '[diff]' > .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   101
  $ echo 'nodates = 1' >> .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   102
  $ echo a > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   103
  $ hg ci -Am init
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   104
  adding a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   105
  $ echo b > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   106
  $ hg ci -m changea
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   107
  $ hg up -C 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   108
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   109
  $ hg cp a aa
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   110
  $ echo c >> a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   111
  $ hg qnew --git -f -e patcha
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   112
  $ echo d >> a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   113
  $ hg qnew -d '0 0' -f -e patcha2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   114
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   115
Create the reference queue:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   116
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   117
  $ hg qsave -c -e -n refqueue
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   118
  copy $TESTTMP/t2/.hg/patches to $TESTTMP/t2/.hg/refqueue
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   119
  $ hg up -C 1
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   120
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   121
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   122
Merge:
6628
f18f14bae172 test-mq-merge: test mq merge and explicit patch queue
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
   123
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   124
  $ HGMERGE=internal:other hg qpush -a -m -n refqueue
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12399
diff changeset
   125
  merging with queue at: $TESTTMP/t2/.hg/refqueue
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   126
  applying patcha
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   127
  patching file a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   128
  Hunk #1 FAILED at 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   129
  1 out of 1 hunks FAILED -- saving rejects to file a.rej
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   130
  patch failed, unable to continue (try -v)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   131
  patch failed, rejects left in working dir
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   132
  patch didn't work out, merging patcha
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   133
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   134
  0 files updated, 2 files merged, 0 files removed, 0 files unresolved
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   135
  (branch merge, don't forget to commit)
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   136
  applying patcha2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   137
  now at: patcha2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   138
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   139
Check patcha is still a git patch:
6628
f18f14bae172 test-mq-merge: test mq merge and explicit patch queue
Patrick Mezard <pmezard@gmail.com>
parents: 5527
diff changeset
   140
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   141
  $ cat .hg/patches/patcha
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   142
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   143
  # Parent d3873e73d99ef67873dac33fbcc66268d5d2b6f4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   144
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   145
  diff --git a/a b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   146
  --- a/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   147
  +++ b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   148
  @@ -1,1 +1,2 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   149
  -b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   150
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   151
  +c
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   152
  diff --git a/a b/aa
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   153
  copy from a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   154
  copy to aa
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   155
  --- a/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   156
  +++ b/aa
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   157
  @@ -1,1 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   158
  -b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   159
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   160
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   161
Check patcha2 is still a regular patch:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   162
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   163
  $ cat .hg/patches/patcha2
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   164
  # HG changeset patch
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   165
  # Parent ???????????????????????????????????????? (glob)
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   166
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   167
  
12376
97ffc68f71d3 tests: add glob matching for unified tests
Brodie Rao <brodie@bitheap.org>
parents: 12375
diff changeset
   168
  diff -r ???????????? -r ???????????? a (glob)
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   169
  --- a/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   170
  +++ b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   171
  @@ -1,2 +1,3 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   172
   a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   173
   c
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   174
  +d
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   175
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   176
  $ cd ..
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11071
diff changeset
   177