##// END OF EJS Templates
mq: add parent node IDs to MQ patches on qrefresh/qnew...
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.

File last commit:

r10397:8cb81d75 default
r10397:8cb81d75 default
Show More
test-mq-header-date.out
698 lines | 10.2 KiB | text/plain | TextLexer
/ tests / test-mq-header-date.out
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 ======= plain headers
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 ==== init
==== qnew -d
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 3 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
0: [mq]: 1.patch - test - 3.00
==== qref
adding 1
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 3 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - test - 3.00
==== qref -d
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 4 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - test - 4.00
==== qnew
adding 2
diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - test
0: [mq]: 1.patch - test
==== qref -d
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 5 0
Yann E. MORIN
mq: add the date with qrefresh, even if missing (issue1768)...
r9337
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - test
0: [mq]: 1.patch - test
Mads Kiilerich
mq: qpop now tells which patches are popped...
r9110 popping 2.patch
Martin Geisler
mq: lowercase output...
r7627 now at: 1.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 ==== qnew -d -m
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 6 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
Three
Bernhard Leiner
mq: make qnew patch format consistent with qrefresh (issue1457)
r7614
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 1: Three - test - 6.00
0: [mq]: 1.patch - test - 4.00
==== qref
adding 3
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 6 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
Three
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Three - test - 6.00
0: [mq]: 1.patch - test - 4.00
==== qref -m
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 6 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Drei - test - 6.00
0: [mq]: 1.patch - test - 4.00
==== qref -d
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 7 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Drei - test - 7.00
0: [mq]: 1.patch - test - 4.00
==== qref -d -m
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 8 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
Three (again)
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== qnew -m
adding 4
Four
diff -r ... 4
--- /dev/null
+++ b/4
@@ -0,0 +1,1 @@
+4
2: Four - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -d
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 9 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 Four
diff -r ... 4
--- /dev/null
+++ b/4
@@ -0,0 +1,1 @@
+4
2: Four - test
1: Three (again) - test
0: [mq]: 1.patch - test
Mads Kiilerich
mq: qpop now tells which patches are popped...
r9110 popping 4.patch
Martin Geisler
mq: lowercase output...
r7627 now at: 3.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 ==== qnew with HG header
Mads Kiilerich
mq: qpop now tells which patches are popped...
r9110 popping 5.patch
Martin Geisler
mq: lowercase output...
r7627 now at: 3.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 # HG changeset patch
# Date 10 0
2: imported patch 5.patch - test - 10.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== hg qref
adding 5
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 # Date 10 0
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
2: [mq]: 5.patch - test - 10.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== hg qref -d
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 # Date 11 0
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 ==== qnew with plain header
popping 6.patch
now at: 5.patch
now at: 6.patch
Date: 12 0
3: imported patch 6.patch - test
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== hg qref
adding 6
Date: 12 0
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - test - 12.00
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== hg qref -d
Date: 13 0
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - test - 13.00
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
popping 6.patch
now at: 5.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 ==== qnew -u
adding 6
From: jane
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - jane
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -d
Yann E. MORIN
mq: add the date with qrefresh, even if missing (issue1768)...
r9337 Date: 12 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 From: jane
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - jane
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
Mads Kiilerich
mq: qpop now tells which patches are popped...
r9110 popping 6.patch
Martin Geisler
mq: lowercase output...
r7627 now at: 5.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 ==== qnew -d
adding 7
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 13 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
diff -r ... 7
--- /dev/null
+++ b/7
@@ -0,0 +1,1 @@
+7
3: [mq]: 7.patch - test
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -u
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 From: john
Date: 13 0
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
diff -r ... 7
--- /dev/null
+++ b/7
@@ -0,0 +1,1 @@
+7
3: [mq]: 7.patch - john - 13.00
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== qnew
adding 8
diff -r ... 8
--- /dev/null
+++ b/8
@@ -0,0 +1,1 @@
+8
4: [mq]: 8.patch - test
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -u -d
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 14 0
From: john
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788
diff -r ... 8
--- /dev/null
+++ b/8
@@ -0,0 +1,1 @@
+8
4: [mq]: 8.patch - john
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
Mads Kiilerich
mq: qpop now tells which patches are popped...
r9110 popping 8.patch
Martin Geisler
mq: lowercase output...
r7627 now at: 7.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 ==== qnew -m
adding 9
Nine
diff -r ... 9
--- /dev/null
+++ b/9
@@ -0,0 +1,1 @@
+9
4: Nine - test
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -u -d
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 Date: 15 0
From: john
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 Nine
diff -r ... 9
--- /dev/null
+++ b/9
@@ -0,0 +1,1 @@
+9
4: Nine - john
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
Mads Kiilerich
mq: qpop now tells which patches are popped...
r9110 popping 9.patch
Martin Geisler
mq: lowercase output...
r7627 now at: 7.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 ==== qpop -a / qpush -a
Mads Kiilerich
mq: qpop now tells which patches are popped...
r9110 popping 7.patch
popping 5.patch
popping 3.patch
popping 1.patch
Martin Geisler
mq: lowercase output...
r7627 patch queue now empty
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 applying 1.patch
applying 3.patch
applying 5.patch
applying 7.patch
Martin Geisler
mq: lowercase output...
r7627 now at: 7.patch
Peter Arrenbrecht
mq: add --currentdate and --date options to qnew and qrefresh...
r5788 3: imported patch 7.patch - john - 13.00
2: imported patch 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: imported patch 1.patch - test - 4.00
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 ======= hg headers
==== init
==== qnew -d
# HG changeset patch
# Parent
# Date 3 0
0: [mq]: 1.patch - test - 3.00
==== qref
adding 1
# HG changeset patch
# Parent
# Date 3 0
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - test - 3.00
==== qref -d
# HG changeset patch
# Parent
# Date 4 0
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - test - 4.00
==== qnew
adding 2
# HG changeset patch
# Parent
diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - test
0: [mq]: 1.patch - test
==== qref -d
# HG changeset patch
# Date 5 0
# Parent
diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - test
0: [mq]: 1.patch - test
popping 2.patch
now at: 1.patch
==== qnew -d -m
# HG changeset patch
# Parent
# Date 6 0
Three
1: Three - test - 6.00
0: [mq]: 1.patch - test - 4.00
==== qref
adding 3
# HG changeset patch
# Parent
# Date 6 0
Three
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Three - test - 6.00
0: [mq]: 1.patch - test - 4.00
==== qref -m
# HG changeset patch
# Parent
# Date 6 0
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Drei - test - 6.00
0: [mq]: 1.patch - test - 4.00
==== qref -d
# HG changeset patch
# Parent
# Date 7 0
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Drei - test - 7.00
0: [mq]: 1.patch - test - 4.00
==== qref -d -m
# HG changeset patch
# Parent
# Date 8 0
Three (again)
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== qnew -m
adding 4
# HG changeset patch
# Parent
Four
diff -r ... 4
--- /dev/null
+++ b/4
@@ -0,0 +1,1 @@
+4
2: Four - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -d
# HG changeset patch
# Date 9 0
# Parent
Four
diff -r ... 4
--- /dev/null
+++ b/4
@@ -0,0 +1,1 @@
+4
2: Four - test
1: Three (again) - test
0: [mq]: 1.patch - test
popping 4.patch
now at: 3.patch
==== qnew with HG header
popping 5.patch
now at: 3.patch
# HG changeset patch
# Date 10 0
2: imported patch 5.patch - test - 10.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== hg qref
adding 5
# HG changeset patch
# Parent
# Date 10 0
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
2: [mq]: 5.patch - test - 10.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== hg qref -d
# HG changeset patch
# Parent
# Date 11 0
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== qnew with plain header
popping 6.patch
now at: 5.patch
now at: 6.patch
Date: 12 0
3: imported patch 6.patch - test
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== hg qref
adding 6
Date: 12 0
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - test - 12.00
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== hg qref -d
Date: 13 0
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - test - 13.00
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
popping 6.patch
now at: 5.patch
==== qnew -u
adding 6
# HG changeset patch
# Parent
# User jane
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - jane
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -d
# HG changeset patch
# Date 12 0
# Parent
# User jane
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
3: [mq]: 6.patch - jane
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
popping 6.patch
now at: 5.patch
==== qnew -d
adding 7
# HG changeset patch
# Parent
# Date 13 0
diff -r ... 7
--- /dev/null
+++ b/7
@@ -0,0 +1,1 @@
+7
3: [mq]: 7.patch - test
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -u
# HG changeset patch
# User john
# Parent
# Date 13 0
diff -r ... 7
--- /dev/null
+++ b/7
@@ -0,0 +1,1 @@
+7
3: [mq]: 7.patch - john - 13.00
2: [mq]: 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: [mq]: 1.patch - test - 4.00
==== qnew
adding 8
# HG changeset patch
# Parent
diff -r ... 8
--- /dev/null
+++ b/8
@@ -0,0 +1,1 @@
+8
4: [mq]: 8.patch - test
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -u -d
# HG changeset patch
# Date 14 0
# User john
# Parent
diff -r ... 8
--- /dev/null
+++ b/8
@@ -0,0 +1,1 @@
+8
4: [mq]: 8.patch - john
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
popping 8.patch
now at: 7.patch
==== qnew -m
adding 9
# HG changeset patch
# Parent
Nine
diff -r ... 9
--- /dev/null
+++ b/9
@@ -0,0 +1,1 @@
+9
4: Nine - test
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
==== qref -u -d
# HG changeset patch
# Date 15 0
# User john
# Parent
Nine
diff -r ... 9
--- /dev/null
+++ b/9
@@ -0,0 +1,1 @@
+9
4: Nine - john
3: [mq]: 7.patch - john
2: [mq]: 5.patch - test
1: Three (again) - test
0: [mq]: 1.patch - test
popping 9.patch
now at: 7.patch
==== qpop -a / qpush -a
popping 7.patch
popping 5.patch
popping 3.patch
popping 1.patch
patch queue now empty
applying 1.patch
applying 3.patch
applying 5.patch
applying 7.patch
now at: 7.patch
3: imported patch 7.patch - john - 13.00
2: imported patch 5.patch - test - 11.00
1: Three (again) - test - 8.00
0: imported patch 1.patch - test - 4.00