tests: demonstrate crash on partial amend with copies in changesets stable
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 18 Apr 2022 20:39:31 -0700
branchstable
changeset 49066 65eda809b943
parent 49060 532b649c1deb
child 49067 770e1352e9f9
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
tests/test-copies-in-changeset.t
--- 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