##// 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-from.out
829 lines | 12.2 KiB | text/plain | TextLexer
/ tests / test-mq-header-from.out
======= plain headers
==== init
==== qnew -U
From: test
0: [mq]: 1.patch - test
==== qref
adding 1
From: test
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - test
==== qref -u
From: mary
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - mary
==== qnew
adding 2
diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - test
0: [mq]: 1.patch - mary
==== qref -u
From: jane
diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew -U -m
From: test
Three
2: Three - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref
adding 3
From: test
Three
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Three - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -m
From: test
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Drei - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u
From: mary
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Drei - mary
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u -m
From: maria
Three (again)
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew -m
adding 4of
Four
diff -r ... 4of
--- /dev/null
+++ b/4of
@@ -0,0 +1,1 @@
+4 t
3: Four - test
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u
From: jane
Four
diff -r ... 4of
--- /dev/null
+++ b/4of
@@ -0,0 +1,1 @@
+4 t
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew with HG header
popping 5.patch
now at: 4.patch
now at: 5.patch
# HG changeset patch
# User johndoe
4: imported patch 5.patch - johndoe
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref
adding 5
# HG changeset patch
# Parent
# User johndoe
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - johndoe
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -U
# HG changeset patch
# Parent
# User test
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - test
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -u
# HG changeset patch
# Parent
# User johndeere
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew with plain header
popping 6.patch
now at: 5.patch
now at: 6.patch
From: test
5: imported patch 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref
adding 6
From: test
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -U
From: test
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -u
From: johndeere
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - johndeere
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qpop -a / qpush -a
popping 6.patch
popping 5.patch
popping 4.patch
popping 3.patch
popping 2.patch
popping 1.patch
patch queue now empty
applying 1.patch
applying 2.patch
applying 3.patch
applying 4.patch
applying 5.patch
applying 6.patch
now at: 6.patch
5: imported patch 6.patch - johndeere
4: imported patch 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: imported patch 2.patch - jane
0: imported patch 1.patch - mary
======= hg headers
==== init
==== qnew -U
# HG changeset patch
# Parent
# User test
0: [mq]: 1.patch - test
==== qref
adding 1
# HG changeset patch
# Parent
# User test
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - test
==== qref -u
# HG changeset patch
# Parent
# User mary
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - mary
==== 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 - mary
==== qref -u
# HG changeset patch
# User jane
# Parent
diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew -U -m
# HG changeset patch
# Parent
# User test
Three
2: Three - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref
adding 3
# HG changeset patch
# Parent
# User test
Three
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Three - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -m
# HG changeset patch
# Parent
# User test
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Drei - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u
# HG changeset patch
# Parent
# User mary
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Drei - mary
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u -m
# HG changeset patch
# Parent
# User maria
Three (again)
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew -m
adding 4of
# HG changeset patch
# Parent
Four
diff -r ... 4of
--- /dev/null
+++ b/4of
@@ -0,0 +1,1 @@
+4 t
3: Four - test
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u
# HG changeset patch
# User jane
# Parent
Four
diff -r ... 4of
--- /dev/null
+++ b/4of
@@ -0,0 +1,1 @@
+4 t
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew with HG header
popping 5.patch
now at: 4.patch
now at: 5.patch
# HG changeset patch
# User johndoe
4: imported patch 5.patch - johndoe
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref
adding 5
# HG changeset patch
# Parent
# User johndoe
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - johndoe
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -U
# HG changeset patch
# Parent
# User test
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - test
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -u
# HG changeset patch
# Parent
# User johndeere
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew with plain header
popping 6.patch
now at: 5.patch
now at: 6.patch
From: test
5: imported patch 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref
adding 6
From: test
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -U
From: test
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -u
From: johndeere
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - johndeere
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qpop -a / qpush -a
popping 6.patch
popping 5.patch
popping 4.patch
popping 3.patch
popping 2.patch
popping 1.patch
patch queue now empty
applying 1.patch
applying 2.patch
applying 3.patch
applying 4.patch
applying 5.patch
applying 6.patch
now at: 6.patch
5: imported patch 6.patch - johndeere
4: imported patch 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: imported patch 2.patch - jane
0: imported patch 1.patch - mary
==== init
==== qnew -U
# HG changeset patch
# Parent
# User test
0: [mq]: 1.patch - test
==== qref
adding 1
# HG changeset patch
# Parent
# User test
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - test
==== qref -u
# HG changeset patch
# Parent
# User mary
diff -r ... 1
--- /dev/null
+++ b/1
@@ -0,0 +1,1 @@
+1
0: [mq]: 1.patch - mary
==== 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 - mary
==== qref -u
# HG changeset patch
# User jane
# Parent
diff -r ... 2
--- /dev/null
+++ b/2
@@ -0,0 +1,1 @@
+2
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew -U -m
# HG changeset patch
# Parent
# User test
Three
2: Three - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref
adding 3
# HG changeset patch
# Parent
# User test
Three
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Three - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -m
# HG changeset patch
# Parent
# User test
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Drei - test
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u
# HG changeset patch
# Parent
# User mary
Drei
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Drei - mary
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u -m
# HG changeset patch
# Parent
# User maria
Three (again)
diff -r ... 3
--- /dev/null
+++ b/3
@@ -0,0 +1,1 @@
+3
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew -m
adding 4of
# HG changeset patch
# Parent
Four
diff -r ... 4of
--- /dev/null
+++ b/4of
@@ -0,0 +1,1 @@
+4 t
3: Four - test
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qref -u
# HG changeset patch
# User jane
# Parent
Four
diff -r ... 4of
--- /dev/null
+++ b/4of
@@ -0,0 +1,1 @@
+4 t
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew with HG header
popping 5.patch
now at: 4.patch
now at: 5.patch
# HG changeset patch
# User johndoe
4: imported patch 5.patch - johndoe
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref
adding 5
# HG changeset patch
# Parent
# User johndoe
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - johndoe
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -U
# HG changeset patch
# Parent
# User test
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - test
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -u
# HG changeset patch
# Parent
# User johndeere
diff -r ... 5
--- /dev/null
+++ b/5
@@ -0,0 +1,1 @@
+5
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qnew with plain header
popping 6.patch
now at: 5.patch
now at: 6.patch
From: test
5: imported patch 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref
adding 6
From: test
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -U
From: test
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - test
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== hg qref -u
From: johndeere
diff -r ... 6
--- /dev/null
+++ b/6
@@ -0,0 +1,1 @@
+6
5: [mq]: 6.patch - johndeere
4: [mq]: 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: [mq]: 2.patch - jane
0: [mq]: 1.patch - mary
==== qpop -a / qpush -a
popping 6.patch
popping 5.patch
popping 4.patch
popping 3.patch
popping 2.patch
popping 1.patch
patch queue now empty
applying 1.patch
applying 2.patch
applying 3.patch
applying 4.patch
applying 5.patch
applying 6.patch
now at: 6.patch
5: imported patch 6.patch - johndeere
4: imported patch 5.patch - johndeere
3: Four - jane
2: Three (again) - maria
1: imported patch 2.patch - jane
0: imported patch 1.patch - mary