Patchwork D12572: tests: demonstrate crash on partial amend with copies in changesets

login
register
mail settings
Submitter phabricator
Date April 19, 2022, 4:27 a.m.
Message ID <differential-rev-PHID-DREV-3fquvuxsjbz6o6xvyig6-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50920/
State New
Headers show

Comments

phabricator - April 19, 2022, 4:27 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  See the fix in the next patch for explanation.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D12572

AFFECTED FILES
  tests/test-copies-in-changeset.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t
--- a/tests/test-copies-in-changeset.t
+++ b/tests/test-copies-in-changeset.t
@@ -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