diff tests/test-mq.t @ 16634:435375cc0ca0 stable

mq: backup local changes in qpush --force qpush help says the following about --force: 1- When -f/--force is applied, all local changes in patched files will be lost. 2- Apply on top of local changes In practice, qpush --force will attempt to apply the patch on top of local changes, and on success will merge them in the pushed patch. On failure, patched files will contain a mix of local changes (where the patch could not apply) and a mix of patch changes (were it applied). So, local changes are less lost than entangled with a mass of other changes. This patch makes qpush --force backup all locally modified files touched by the next patch being applied. When multiple patches are being pushed, this logic is repeated for each patch. Note that modified but successfully patched files are preserved as well.
author Patrick Mezard <patrick@mezard.eu>
date Fri, 11 May 2012 16:18:47 +0200
parents 41b41adba08a
children 4ae3ba9e4d7a
line wrap: on
line diff
--- a/tests/test-mq.t	Fri May 11 16:17:02 2012 +0200
+++ b/tests/test-mq.t	Fri May 11 16:18:47 2012 +0200
@@ -1356,11 +1356,15 @@
 
 apply force, should discard changes in hello, but not bye
 
-  $ hg qpush -f
+  $ hg qpush -f --verbose
   applying empty
+  saving current version of hello.txt as hello.txt.orig
+  patching file hello.txt
+  hello.txt
   now at: empty
   $ hg st
   M bye.txt
+  ? hello.txt.orig
   $ hg diff --config diff.nodates=True
   diff -r ba252371dbc1 bye.txt
   --- a/bye.txt