changeset 49066:65eda809b943 stable

tests: demonstrate crash on partial amend with copies in changesets See the fix in the next patch for explanation. Differential Revision: https://phab.mercurial-scm.org/D12572
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 18 Apr 2022 20:39:31 -0700
parents 532b649c1deb
children 770e1352e9f9
files tests/test-copies-in-changeset.t
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-copies-in-changeset.t	Wed Apr 13 12:14:17 2022 -0700
+++ b/tests/test-copies-in-changeset.t	Mon Apr 18 20:39:31 2022 -0700
@@ -325,6 +325,15 @@
   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-*-amend.hg (glob)
   $ hg showcopies
   a -> l
+
+No crash on partial amend
+  $ hg st --change .
+  A l
+  $ echo modified >> a
+  $ hg rm l
+  $ hg commit --amend a 2>&1 | grep AttributeError
+  AttributeError: 'NoneType' object has no attribute 'renamed' (known-bad-output !)
+
   $ cd ..
 
 Test rebasing a commit with copy information