[Updated] D8652: tests: test more cases where a file got replaced by a copy

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Nov 3 21:31:26 UTC 2020


Closed by commit rHG4b79e92a5ef8: tests: test more cases where a file got replaced by a copy (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8652?vs=23294&id=23411

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

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

AFFECTED FILES
  tests/test-copies.t

CHANGE DETAILS

diff --git a/tests/test-copies.t b/tests/test-copies.t
--- a/tests/test-copies.t
+++ b/tests/test-copies.t
@@ -462,6 +462,73 @@
   $ hg debugpathcopies 0 5
   x -> z
 
+Create x and y, then remove y and rename x to y on one side of merge, and
+modify x on the other side. The modification to x from the second side
+should be propagated to y.
+  $ newrepo
+  $ echo original > x
+  $ hg add x
+  $ echo unrelated > y
+  $ hg add y
+  $ hg commit -m 'add x and y'
+  $ hg remove y
+  $ hg commit -m 'remove y'
+  $ hg rename x y
+  $ hg commit -m 'rename x to y'
+  $ hg checkout -q 0
+  $ echo modified > x
+  $ hg commit -m 'modify x'
+  created new head
+  $ hg l
+  @  3 modify x
+  |  x
+  | o  2 rename x to y
+  | |  x y
+  | o  1 remove y
+  |/   y
+  o  0 add x and y
+     x y
+#if filelog
+  $ hg merge 2
+  file 'x' was deleted in other [merge rev] but was modified in local [working copy].
+  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
+  What do you want to do? u
+  1 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
+  [1]
+BROKEN: should be "modified"
+  $ cat y
+  original
+#else
+  $ hg merge 2
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+BROKEN: should be "modified"
+  $ cat y
+  original
+#endif
+Same as above, but in the opposite direction
+#if filelog
+  $ hg co -qC 2
+  $ hg merge 3
+  file 'x' was deleted in local [working copy] but was modified in other [merge rev].
+  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
+  What do you want to do? u
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
+  [1]
+BROKEN: should be "modified"
+  $ cat y
+  original
+#else
+  $ hg co -qC 2
+  $ hg merge 3
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+BROKEN: should be "modified"
+  $ cat y
+  original
+#endif
 
 Create x and y, then rename x to z on one side of merge, and rename y to z and
 then delete z on the other side.



To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20201103/d1863292/attachment.html>


More information about the Mercurial-patches mailing list