tests/test-mq-git.t
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Thu, 11 Nov 2010 02:10:37 +0900
branchstable
changeset 12972 7916a84c0758
parent 12324 b701610f6c56
child 22520 9d4ebb75de53
permissions -rw-r--r--
log: fix log -rREV FILE when REV isnt the last filerev (issue2492) Regression from 99cafcae25d9. That previous commit is not supposed to affect log calls without --follow, so we step out of this codepath if follow is not True, and it's enough to fix the regression. When --follow is given, we fix the issue by taking into account changesets that have a rev > maxrev to build the filegraph: even if those files are not included in the final result, it's still needed to walk correctly the graph from the end of the filelog to minrev, to track accurately renames.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10190
9c2c94934f0d mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
# Test the plumbing of mq.git option
9c2c94934f0d mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     2
# Automatic upgrade itself is tested elsewhere.
9c2c94934f0d mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     3
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
     4
  $ echo "[extensions]" >> $HGRCPATH
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
     5
  $ echo "mq=" >> $HGRCPATH
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
     6
  $ echo "[diff]" >> $HGRCPATH
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
     7
  $ echo "nodates=1" >> $HGRCPATH
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
     8
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
     9
  $ hg init repo-auto
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    10
  $ cd repo-auto
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    11
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    12
git=auto: regular patch creation:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    13
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    14
  $ echo a > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    15
  $ hg add a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    16
  $ hg qnew -d '0 0' -f adda
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    17
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    18
  $ cat .hg/patches/adda
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    19
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    20
  # Parent 0000000000000000000000000000000000000000
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    21
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    22
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    23
  diff -r 000000000000 -r ef8dafc9fa4c a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    24
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    25
  +++ b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    26
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    27
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    28
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    29
git=auto: git patch creation with copy:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    30
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    31
  $ hg cp a b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    32
  $ hg qnew -d '0 0' -f copy
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    33
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    34
  $ cat .hg/patches/copy
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    35
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    36
  # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    37
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    38
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    39
  diff --git a/a b/b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    40
  copy from a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    41
  copy to b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    42
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    43
git=auto: git patch when using --git:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    44
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    45
  $ echo regular > regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    46
  $ hg add regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    47
  $ hg qnew -d '0 0' --git -f git
10190
9c2c94934f0d mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    48
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    49
  $ cat .hg/patches/git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    50
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    51
  # Parent 99586d5f048c399e20f81cee41fbb3809c0e735d
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    52
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    53
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    54
  diff --git a/regular b/regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    55
  new file mode 100644
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    56
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    57
  +++ b/regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    58
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    59
  +regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    60
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    61
git=auto: regular patch after qrefresh without --git:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    62
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    63
  $ hg qrefresh -d '0 0'
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    64
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    65
  $ cat .hg/patches/git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    66
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    67
  # Parent 99586d5f048c399e20f81cee41fbb3809c0e735d
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    68
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    69
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    70
  diff -r 99586d5f048c regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    71
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    72
  +++ b/regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    73
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    74
  +regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    75
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    76
  $ cd ..
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    77
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    78
  $ hg init repo-keep
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    79
  $ cd repo-keep
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    80
  $ echo '[mq]' > .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    81
  $ echo 'git = KEEP' >> .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    82
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    83
git=keep: git patch with --git:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    84
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    85
  $ echo a > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    86
  $ hg add a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    87
  $ hg qnew -d '0 0' -f --git git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    88
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    89
  $ cat .hg/patches/git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    90
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    91
  # Parent 0000000000000000000000000000000000000000
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    92
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    93
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    94
  diff --git a/a b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    95
  new file mode 100644
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    96
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    97
  +++ b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    98
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
    99
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   100
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   101
git=keep: git patch after qrefresh without --git:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   102
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   103
  $ echo a >> a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   104
  $ hg qrefresh -d '0 0'
10190
9c2c94934f0d mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   105
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   106
  $ cat .hg/patches/git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   107
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   108
  # Parent 0000000000000000000000000000000000000000
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   109
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   110
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   111
  diff --git a/a b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   112
  new file mode 100644
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   113
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   114
  +++ b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   115
  @@ -0,0 +1,2 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   116
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   117
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   118
  $ cd ..
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   119
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   120
  $ hg init repo-yes
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   121
  $ cd repo-yes
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   122
  $ echo '[mq]' > .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   123
  $ echo 'git = yes' >> .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   124
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   125
git=yes: git patch:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   126
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   127
  $ echo a > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   128
  $ hg add a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   129
  $ hg qnew -d '0 0' -f git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   130
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   131
  $ cat .hg/patches/git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   132
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   133
  # Parent 0000000000000000000000000000000000000000
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   134
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   135
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   136
  diff --git a/a b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   137
  new file mode 100644
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   138
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   139
  +++ b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   140
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   141
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   142
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   143
git=yes: git patch after qrefresh:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   144
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   145
  $ echo a >> a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   146
  $ hg qrefresh -d '0 0'
10190
9c2c94934f0d mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   147
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   148
  $ cat .hg/patches/git
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   149
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   150
  # Parent 0000000000000000000000000000000000000000
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   151
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   152
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   153
  diff --git a/a b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   154
  new file mode 100644
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   155
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   156
  +++ b/a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   157
  @@ -0,0 +1,2 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   158
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   159
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   160
  $ cd ..
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   161
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   162
  $ hg init repo-no
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   163
  $ cd repo-no
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   164
  $ echo '[diff]' > .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   165
  $ echo 'git = True' >> .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   166
  $ echo '[mq]' > .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   167
  $ echo 'git = False' >> .hg/hgrc
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   168
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   169
git=no: regular patch with copy:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   170
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   171
  $ echo a > a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   172
  $ hg add a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   173
  $ hg qnew -d '0 0' -f adda
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   174
  $ hg cp a b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   175
  $ hg qnew -d '0 0' -f regular
10190
9c2c94934f0d mq: upgrade to git patch when necessary (issue767)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   176
12324
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   177
  $ cat .hg/patches/regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   178
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   179
  # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   180
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   181
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   182
  diff -r ef8dafc9fa4c -r a70404f79ba3 b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   183
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   184
  +++ b/b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   185
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   186
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   187
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   188
git=no: regular patch after qrefresh with copy:
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   189
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   190
  $ hg cp a c
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   191
  $ hg qrefresh -d '0 0'
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   192
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   193
  $ cat .hg/patches/regular
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   194
  # HG changeset patch
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   195
  # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   196
  # Date 0 0
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   197
  
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   198
  diff -r ef8dafc9fa4c b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   199
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   200
  +++ b/b
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   201
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   202
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   203
  diff -r ef8dafc9fa4c c
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   204
  --- /dev/null
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   205
  +++ b/c
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   206
  @@ -0,0 +1,1 @@
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   207
  +a
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   208
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   209
  $ cd ..
b701610f6c56 tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents: 10397
diff changeset
   210