##// 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-git.out
110 lines | 2.0 KiB | text/plain | TextLexer
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 % git=auto: regular patch creation
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent 0000000000000000000000000000000000000000
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff -r 000000000000 -r ef8dafc9fa4c a
--- /dev/null
+++ b/a
@@ -0,0 +1,1 @@
+a
% git=auto: git patch creation with copy
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff --git a/a b/b
copy from a
copy to b
% git=auto: git patch when using --git
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent 2962f232b49d41ebc26c591ec8d556724be213ab
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff --git a/regular b/regular
new file mode 100644
--- /dev/null
+++ b/regular
@@ -0,0 +1,1 @@
+regular
% git=auto: regular patch after qrefresh without --git
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent 2962f232b49d41ebc26c591ec8d556724be213ab
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff -r 2962f232b49d regular
--- /dev/null
+++ b/regular
@@ -0,0 +1,1 @@
+regular
% git=keep: git patch with --git
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent 0000000000000000000000000000000000000000
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff --git a/a b/a
new file mode 100644
--- /dev/null
+++ b/a
@@ -0,0 +1,1 @@
+a
% git=keep: git patch after qrefresh without --git
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent 0000000000000000000000000000000000000000
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff --git a/a b/a
new file mode 100644
--- /dev/null
+++ b/a
@@ -0,0 +1,2 @@
+a
+a
% git=yes: git patch
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent 0000000000000000000000000000000000000000
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff --git a/a b/a
new file mode 100644
--- /dev/null
+++ b/a
@@ -0,0 +1,1 @@
+a
% git=yes: git patch after qrefresh
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent 0000000000000000000000000000000000000000
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff --git a/a b/a
new file mode 100644
--- /dev/null
+++ b/a
@@ -0,0 +1,2 @@
+a
+a
% git=no: regular patch with copy
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff -r ef8dafc9fa4c -r 110cde11d262 b
--- /dev/null
+++ b/b
@@ -0,0 +1,1 @@
+a
% git=no: regular patch after qrefresh with copy
# HG changeset patch
Steve Losh
mq: add parent node IDs to MQ patches on qrefresh/qnew...
r10397 # Parent ef8dafc9fa4caff80f6e243eb0171bcd60c455b4
Patrick Mezard
mq: upgrade to git patch when necessary (issue767)
r10190 # Date 0 0
diff -r ef8dafc9fa4c b
--- /dev/null
+++ b/b
@@ -0,0 +1,1 @@
+a
diff -r ef8dafc9fa4c c
--- /dev/null
+++ b/c
@@ -0,0 +1,1 @@
+a