tests/test-mq-qfold.out
author Steve Losh <steve@stevelosh.com>
Sun, 07 Feb 2010 10:47:54 -0500
changeset 10397 8cb81d75730c
parent 10186 296a0b14a686
permissions -rw-r--r--
mq: add parent node IDs to MQ patches on qrefresh/qnew The goal of this patch is to add the IDs of the parents of applied MQ patches into the patch file headers whenever qnew or qrefresh are run. This will serve as a reminder of when the patches last applied cleanly and will let us do more intelligent things in the future, such as: * Resolve conflicts found when qpushing to a new location by merging instead of simply showing rejects. * Display better diffs of versioned MQ patches because we can tell how the patched files have changed in the meantime. Here are the new rules this patch introduces. They are checked in this order: * If a patch currently has old, plain-style patch headers ("From:" and "Date:") do not change the style or add any new headers. * If the 'mq.plain' configuration setting is true, only plain-style headers will be used for all MQ patches. * qnew will initialize new patches with HG-style headers and fill in the "# Parent" header with the appropriate parent node. * qrefresh will refresh the "# Parent" header with the current parent of the current patch.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8426
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
% init
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     2
adding a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     3
% fold in the middle of the queue
9110
561ff8d9e4f0 mq: qpop now tells which patches are popped
Mads Kiilerich <mads@kiilerich.com>
parents: 8426
diff changeset
     4
popping p3
561ff8d9e4f0 mq: qpop now tells which patches are popped
Mads Kiilerich <mads@kiilerich.com>
parents: 8426
diff changeset
     5
popping p2
8426
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     6
now at: p1
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     7
--- a/a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     8
+++ b/a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     9
@@ -1,1 +1,2 @@
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    10
 a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    11
+a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    12
p1
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    13
p3
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    14
--- a/a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    15
+++ b/a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    16
@@ -1,1 +1,3 @@
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    17
 a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    18
+a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    19
+b
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    20
% fold with local changes
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    21
abort: local changes found, refresh first
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    22
--- a/a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    23
+++ b/a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    24
@@ -1,1 +1,3 @@
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    25
 a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    26
+a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    27
+b
10186
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    28
reverting a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    29
% fold git patch into a regular patch, expect git patch
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    30
popping git
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    31
now at: regular
10397
8cb81d75730c mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents: 10186
diff changeset
    32
# HG changeset patch
8cb81d75730c mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents: 10186
diff changeset
    33
# Parent 
8cb81d75730c mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents: 10186
diff changeset
    34
10186
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    35
diff --git a/a b/a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    36
--- a/a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    37
+++ b/a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    38
@@ -1,3 +1,4 @@
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    39
 a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    40
 a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    41
 b
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    42
+a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    43
diff --git a/a b/aa
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    44
copy from a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    45
copy to aa
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    46
--- a/a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    47
+++ b/aa
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    48
@@ -1,3 +1,4 @@
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    49
 a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    50
 a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    51
 b
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    52
+a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    53
popping regular
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    54
now at: p1
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    55
% fold regular patch into a git patch, expect git patch
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    56
popping regular
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    57
now at: git
10397
8cb81d75730c mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents: 10186
diff changeset
    58
# HG changeset patch
8cb81d75730c mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents: 10186
diff changeset
    59
# Parent 
8cb81d75730c mq: add parent node IDs to MQ patches on qrefresh/qnew
Steve Losh <steve@stevelosh.com>
parents: 10186
diff changeset
    60
10186
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    61
diff --git a/a b/aa
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    62
copy from a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    63
copy to aa
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    64
--- a/a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    65
+++ b/aa
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    66
@@ -1,3 +1,4 @@
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    67
 a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    68
 a
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    69
 b
296a0b14a686 mq: preserve --git flag when folding patches
Patrick Mezard <pmezard@gmail.com>
parents: 9110
diff changeset
    70
+b