diff tests/test-graft.t @ 44383:218feb1a7e00

graft: always allow hg graft --base . (issue6248) `hg graft --base . -r abc` is rejected before this change with a "nothing to merge" error, if `abc` does not descend from `.`. This looks like an artifact of the implementation rather than intended behavior. It makes perfect sense to apply the diff between `.` and `abc` to the working copy (i.e. degenerate into `hg revert`), regardless of what `abc` is. Differential Revision: https://phab.mercurial-scm.org/D8127
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
date Mon, 17 Feb 2020 20:30:03 -0500
parents 17e12938f8e7
children 6306baa7d19a
line wrap: on
line diff
--- a/tests/test-graft.t	Wed Feb 19 17:30:04 2020 +0100
+++ b/tests/test-graft.t	Mon Feb 17 20:30:03 2020 -0500
@@ -813,13 +813,14 @@
   note: graft of 19:9627f653b421 created no changes to commit
   grafting 0:68795b066622 "0"
 
-graft --force after backout
+graft --force after backout. Do the backout with graft too, to make
+sure we support issue6248.
 
   $ echo abc > a
   $ hg ci -m 24
-  $ hg backout 24
-  reverting a
-  changeset 25:71c4e63d4f98 backs out changeset 24:2e7ea477be26
+  $ hg graft --base . -r ".^" --no-commit
+  grafting 23:b1cac6de36a9 "0"
+  $ hg commit -m 'Backed out changeset 2e7ea477be26'
   $ hg graft 24
   skipping ancestor revision 24:2e7ea477be26
   [255]