D6749: tests: demonstrate crash when committing subset of copies to changeset

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Sep 5 19:15:25 UTC 2019


Closed by commit rHG170b070ec6a5: tests: demonstrate crash when committing subset of copies to changeset (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6749?vs=16282&id=16378

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6749/new/

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

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

CHANGE DETAILS

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
@@ -10,6 +10,7 @@
   > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
   > [extensions]
   > rebase =
+  > split =
   > EOF
 
 Check that copies are recorded correctly
@@ -185,3 +186,33 @@
     a
   R a
   $ cd ..
+
+Test splitting a commit
+
+  $ hg init split
+  $ cd split
+  $ echo a > a
+  $ echo b > b
+  $ hg ci -Aqm 'add a and b'
+  $ echo a2 > a
+  $ hg mv b c
+  $ hg ci -m 'modify a, move b to c'
+  $ (hg --config ui.interactive=yes split 2>&1 | grep mercurial.error) <<EOF
+  > y
+  > y
+  > n
+  > y
+  > EOF
+  mercurial.error.ProgrammingError: some copy targets missing from file list
+  $ cd ..
+
+Test committing half a rename
+
+  $ hg init partial
+  $ cd partial
+  $ echo a > a
+  $ hg ci -Aqm 'add a'
+  $ hg mv a b
+  $ hg ci -m 'remove a' a 2>&1 | grep mercurial.error
+  mercurial.error.ProgrammingError: some copy targets missing from file list
+  $ cd ..



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


More information about the Mercurial-devel mailing list