Patchwork D6360: tests: demonstrate loss of changeset copy metadata on rebase

login
register
mail settings
Submitter phabricator
Date May 15, 2019, 6:02 p.m.
Message ID <917e881a3ce7953e15e88d8a8bf8d2f6@localhost.localdomain>
Download mbox | patch
Permalink /patch/40047/
State Not Applicable
Headers show

Comments

phabricator - May 15, 2019, 6:02 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG83b225fbd788: tests: demonstrate loss of changeset copy metadata on rebase (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6360?vs=15053&id=15101

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

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

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: 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
@@ -7,6 +7,8 @@ 
   > changesetcopies = log -r . -T 'files: {files}
   >   {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}'
   > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}'
+  > [extensions]
+  > rebase =
   > EOF
 
 Check that copies are recorded correctly
@@ -133,3 +135,24 @@ 
   a -> k
 
   $ cd ..
+
+Test rebasing a commit with copy information
+
+  $ hg init rebase-rename
+  $ cd rebase-rename
+  $ echo a > a
+  $ hg ci -Aqm 'add a'
+  $ echo a2 > a
+  $ hg ci -m 'modify a'
+  $ hg co -q 0
+  $ hg mv a b
+  $ hg ci -qm 'rename a to b'
+  $ hg rebase -d 1 --config rebase.experimental.inmemory=yes
+  rebasing 2:55d0b405c1b2 "rename a to b" (tip)
+  merging a and b to b
+  saved backup bundle to $TESTTMP/rebase-rename/.hg/strip-backup/55d0b405c1b2-78df867e-rebase.hg
+BROKEN: should show the rename
+  $ hg st --change . --copies
+  A b
+  R a
+  $ cd ..