mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
eea597d740
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.
71 lines
787 B
Plaintext
71 lines
787 B
Plaintext
% init
|
|
adding a
|
|
% fold in the middle of the queue
|
|
popping p3
|
|
popping p2
|
|
now at: p1
|
|
--- a/a
|
|
+++ b/a
|
|
@@ -1,1 +1,2 @@
|
|
a
|
|
+a
|
|
p1
|
|
p3
|
|
--- a/a
|
|
+++ b/a
|
|
@@ -1,1 +1,3 @@
|
|
a
|
|
+a
|
|
+b
|
|
% fold with local changes
|
|
abort: local changes found, refresh first
|
|
--- a/a
|
|
+++ b/a
|
|
@@ -1,1 +1,3 @@
|
|
a
|
|
+a
|
|
+b
|
|
reverting a
|
|
% fold git patch into a regular patch, expect git patch
|
|
popping git
|
|
now at: regular
|
|
# HG changeset patch
|
|
# Parent
|
|
|
|
diff --git a/a b/a
|
|
--- a/a
|
|
+++ b/a
|
|
@@ -1,3 +1,4 @@
|
|
a
|
|
a
|
|
b
|
|
+a
|
|
diff --git a/a b/aa
|
|
copy from a
|
|
copy to aa
|
|
--- a/a
|
|
+++ b/aa
|
|
@@ -1,3 +1,4 @@
|
|
a
|
|
a
|
|
b
|
|
+a
|
|
popping regular
|
|
now at: p1
|
|
% fold regular patch into a git patch, expect git patch
|
|
popping regular
|
|
now at: git
|
|
# HG changeset patch
|
|
# Parent
|
|
|
|
diff --git a/a b/aa
|
|
copy from a
|
|
copy to aa
|
|
--- a/a
|
|
+++ b/aa
|
|
@@ -1,3 +1,4 @@
|
|
a
|
|
a
|
|
b
|
|
+b
|