Mercurial > hg
diff tests/test-mq-header-from.out @ 10397:8cb81d75730c
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.
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Sun, 07 Feb 2010 10:47:54 -0500 |
parents | dd6f605b15c0 |
children |
line wrap: on
line diff
--- a/tests/test-mq-header-from.out Mon Feb 08 19:44:04 2010 +0100 +++ b/tests/test-mq-header-from.out Sun Feb 07 10:47:54 2010 -0500 @@ -1,3 +1,4 @@ +======= plain headers ==== init ==== qnew -U From: test @@ -32,9 +33,7 @@ 1: [mq]: 2.patch - test 0: [mq]: 1.patch - mary ==== qref -u -# HG changeset patch -# User jane - +From: jane diff -r ... 2 --- /dev/null @@ -105,14 +104,295 @@ 1: [mq]: 2.patch - jane 0: [mq]: 1.patch - mary ==== qnew -m -adding 4 +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 ... 4 +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/4 ++++ 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 @@ -+4 ++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 @@ -120,14 +400,14 @@ ==== qref -u # HG changeset patch # User jane - +# Parent Four -diff -r ... 4 +diff -r ... 4of --- /dev/null -+++ b/4 ++++ b/4of @@ -0,0 +1,1 @@ -+4 ++4 t 3: Four - jane 2: Three (again) - maria 1: [mq]: 2.patch - jane @@ -146,6 +426,7 @@ ==== hg qref adding 5 # HG changeset patch +# Parent # User johndoe diff -r ... 5 @@ -160,6 +441,7 @@ 0: [mq]: 1.patch - mary ==== hg qref -U # HG changeset patch +# Parent # User test diff -r ... 5 @@ -174,6 +456,7 @@ 0: [mq]: 1.patch - mary ==== hg qref -u # HG changeset patch +# Parent # User johndeere diff -r ... 5 @@ -186,7 +469,63 @@ 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 @@ -198,9 +537,293 @@ applying 3.patch applying 4.patch applying 5.patch -now at: 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