Patchwork D10117: tests: demonstrate how grafted copies are counted when tracing across branches

login
register
mail settings
Submitter phabricator
Date March 6, 2021, 12:41 a.m.
Message ID <differential-rev-PHID-DREV-l4um3kefvy7ptcnkq6el-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48432/
State Superseded
Headers show

Comments

phabricator - March 6, 2021, 12:41 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This test demonstrates a regression from 1d6d1a15 <https://phab.mercurial-scm.org/rHG1d6d1a15a96344a505645991794333f26761ca79>.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-copies.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-copies.t b/tests/test-copies.t
--- a/tests/test-copies.t
+++ b/tests/test-copies.t
@@ -378,6 +378,32 @@ 
   $ hg debugpathcopies 1 3
   x -> z
 
+Copy x->y on two separate branches. Pathcopies from one branch to the other
+should not report the copy.
+  $ newrepo
+  $ echo x > x
+  $ hg ci -Aqm 'add x'
+  $ hg cp x y
+  $ hg ci -qm 'copy x to y'
+  $ hg co -q 0
+  $ hg graft 1 -q
+  $ hg l
+  @  2 copy x to y
+  |  y
+  | o  1 copy x to y
+  |/   y
+  o  0 add x
+     x
+  $ hg debugp1copies -r 1
+  x -> y
+  $ hg debugp1copies -r 2
+  x -> y
+BROKEN: These two should not report any copies
+  $ hg debugpathcopies 1 2
+  x -> y
+  $ hg debugpathcopies 2 1
+  x -> y
+
 Copy x to y on one side of merge, create y and rename to z on the other side.
   $ newrepo
   $ echo x > x